Pre-General Availability: 2024-09-02

Work with Page States

You create and update a page state on the canvas and within a robot.

If you prefer to prebuild as many components as you can before you start building a robot, you might prefer creating page states from the canvas and then selecting them as appropriate for each robot action.

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

Create a Page State

A page state is a container for one or more validation checks. A validation check occurs before or after an action in a robot. You create a page state, including its validation checks, on the canvas.

You can also create and update a page state when you add an action to a robot. See Add Validation to a Robot Action.

When you create a page state on the canvas, Oracle Integration doesn't apply its validation checks to a robot action. Later, when you select the page state for a robot action, you specify whether the validation must occur before or after the action occurs.

All the validation conditions must be met for an action to proceed.

  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 Install icon.

    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 one of the following options:

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

      • Fixed Time: Add a predetermined wait period.

      Caution: The Fixed Time validation introduces explicit slowness. Consider your requirements carefully before adding this validation, and use it sparingly.

      State

      (Visible only if you select Element for the Strategy)

      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 timeout period for the validation.

      • If you selected Element for the Strategy: Enter the maximum amount of time to wait for the condition to become true. The action runs as soon as the condition becomes true; this value is simply the maximum amount of time to wait before the robot instance fails.
      • If you selected Fixed Time for the Strategy: Enter the specific wait time that the robot waits every time it runs.
    3. If you selected Element for the Strategy): Next to Selectors, click Create +, and identify the UI control for the validation.

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

      1. In another browser window, open the application that the robot needs to work in.
      2. In the Page state panel, click within the Value field, and select Target a page element Target a page element.
      3. In the application that the browser needs to work in, point to the UI control that you're adding validation to, but don't select the UI control yet.

        For example, do not select the UI element while the magnifying lens icon appears and the field is shaded purple. The recorder is still collecting information about the UI element.

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

      4. After the icon changes to a target, the shading turns green, and the mouse icon changes to a hand, 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 this setting, if needed. Reusing a target offers benefits. For example, you can update a target one time, and all robots that use the target get the update.
    4. Select OK in the Page state panel, and then select OK in the Page states panel.
    5. If needed, repeat the previous steps to add more page states or validation conditions.
  6. Above the canvas, select Save.

Update a Page State

You can update a page state at any time from the canvas, without having to open 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 OK.
  6. Above the canvas, select Save.