Work with Page States

A page state is a container for one or more validation checks. A validation check occurs before or after an action in a robot. All the validation conditions must be met for an action to proceed.

You have a couple options for creating a page state for an action:

  • While you're building a robot

    The instructions for adding each action specify how to add page states. See Add Validation to a Robot Action.

  • At any time, typically before you build a robot

    Use the instructions on this page to create a page state. Later, when you build a robot, apply the page state to a robot action and specify whether the validation occurs before or after the action.

To learn more about page states and other robot resources, see Alternatives to Hard Coding Data.

Create a Page State

These instructions help you create a page state at any time.

  1. Open a robot.
    1. In the navigation pane, select Projects.
    2. Select the project name.
    3. In the left toolbar, select Robot Robot.
    4. In the Robots box, select the robot to open.

      The canvas appears.

  2. In the toolbar, select Page states Page states.

    The Page states panel appears.

  3. Select Create (if no page states have been created) or Create Create (if at least one page state exists).

    The Page state panel appears.

  4. In the Name field, enter a name for the page state, such as Verify that I'm on the order page.
  5. Add one or more conditions to the page state.
    1. Next to Conditions, select Create Install icon.
    2. Fill in the following fields.
      Field Description
      Name

      Enter a name for the validation condition, such as Submit button enabled.

      Message

      Enter the message that appears when the validation condition isn't met before the timeout period elapses. For example, The Submit button did not become enabled within the specified 30-second timeout period. If the condition times out, the robot fails, and this message appears in the activity stream.

      Strategy

      Select Element: Add validation that is related to the visibility or enabled state of a UI element.

      State

      Select one of the following options:

      • Visible: The validation condition checks whether a UI element appears before the action proceeds.
      • Enabled: The validation condition checks whether a UI element is clickable before the action proceeds.
      Timeout (seconds)

      Enter the maximum amount of time to wait for the condition to become true. The action runs as soon as the condition becomes true. When a robot instance runs, and the time elapses before the condition becomes true, the robot instance fails.

    3. Next to Selectors, click Create +, and identify the UI control for the validation.

      For example, if the validation ensures that a button is visible, target the button.

      1. In another browser window or tab, open the application where the robot works.

      2. In the Page state panel, click within the Value field, and select Target a page element Target a page element.

        The Target a page element panel appears.
      3. In the panel, from the Select browser tab to target drop-down, select the application where the robot works, and select Go. You might need to scroll down to find the application.

        The application opens.

      4. In the application where the robot works, point to the UI control that you're adding validation to, but don't select it yet.

        For example, if the field is shaded purple and the magnifying lens icon appears, don't click yet. The recorder is still collecting information.

        A User ID field is shaded purple, and a magnifying lens icon appears above it

      5. Wait for the shading to turn green and the mouse icon to change to a hand, and then select the UI element.

        A User ID field is shaded green, and a target icon appears above it

        For more tips, see Quick Start for Building Robots.

        The recorder enters a value in the Value field in the Page state panel.

        Tip:

        Your settings determine whether Oracle Integration reuses targets for previously selected UI controls. You can override these settings, if needed. Reusing a target offers benefits. For example, you can update a target one time, and all actions that use the target get the update.
    4. Select OK in the Page state panel.
    5. If needed, repeat the previous steps to add more page states or validation conditions.
    6. After you finish adding page states and validation, select OK in the Page states panel.
  6. Above the canvas, select Save.

Update a Page State

You can update a page state at any time from the canvas, without opening the robot actions that use its validation checks.

  1. Open a robot.
    1. In the navigation pane, select Projects.
    2. Select the project name.
    3. In the left toolbar, select Robot Robot.
    4. In the Robots box, select the robot to open.

      The canvas appears.

  2. In the toolbar, select Page states Page states.

    The Page states panel appears.

  3. Select a page state from the list, and select Edit Edit icon.

    The Page state panel appears.

  4. Select a condition from the list, and select Edit Edit icon.
  5. Update the fields as necessary, and select Back.
  6. Click OK.
  7. Above the canvas, select Save.