Enable a developer setting to inspect UI pages that open within the platform. Use the Manual Page Inspector to inspect pages that open in a new tab, such as Service Portal pages.

Before you begin

Role required: admin

About this task

Identify the HTML and JavaScript page components in your user interfaces that are available for custom UI testing. Enable automated testing by ensuring that your user interfaces only contain testable page components.

Procedure

  1. Enable the Page Inspector depending on the type of custom UI page you need to inspect.
    Note that some custom UI pages open in a new tab and can be inspected only manually.
    OptionProcedure
    Inspect page opening in the ServiceNow AI Platform.
    1. Navigate to the record or URL for the page you would like to inspect.
    2. Open System Settings and select the Developer tab.
    3. Enable Automated Test Framework Page Inspector.

    The page opens in the Page Inspector and the inspect icon appears in the banner frame.

    Inspect page opening in a new tab, such as a Service Portal page.
    1. Navigate to Automated Test Framework > Manual Page Inspector.
    2. Set the Page Type and select the page. If the page type is Service Portal, select the portal in which the page opens.
    3. Click Inspect.

    The page opens in the page inspector.

  2. Select a component to inspect.
    • Drag the inspect icon (inspect icon) from the Page Inspector pane to a component on the page.
    • Select an available component from the Page Inspector pane.
    The Page Inspector retrieves the list of testable page components when you first load a page. Testable components consist of standard HTML and JavaScript that are accessible to the Automated Test Framework. Test designers can use these components as part of custom UI testing.
  3. View component information and perform actions available in the Action field.
    Performing available actions helps you manually confirm which test steps are available to a component. For example, when you select Click On Component, the Page Inspector selects the component and displays the resulting page.

What to do next

Create a custom UI test