--- title: Custom UI test steps description: Test customized user interfaces such as UI pages and UI macros by retrieving their HTML and JavaScript page components and identifying the test actions they support. locale: en-US canonical_url: https://www.servicenow.com/docs/r/australia/application-development/automated-test-framework-atf/custom-ui-test-steps.html release: australia product: Automated Test Framework \(ATF\) classification: automated-test-framework-atf topic_type: concept last_updated: "2026-03-12" reading_time_minutes: 10 breadcrumb: [UI test steps, Building and running automated tests with the Automated Test Framework, Automated Test Framework \(ATF\) test building and execution, Automated Test Framework \(ATF\), Testing and debugging applications, Building applications] --- # Custom UI test steps Test customized user interfaces such as UI pages and UI macros by retrieving their HTML and JavaScript page components and identifying the test actions they support. **Note:** For new test development, use the Run UI Test Script test step instead of Custom UI test steps. Custom UI test steps require the Automated Test Framework to retrieve and identify the testable components from a target web page. **Note:** Next UI Experience pages are not supported by the Custom UI test steps, including but not limited to Configurable Workspaces \(except for Form steps\) and UI Builder. ## Testable components Testable page components consist of standard HTML and JavaScript with these characteristics. - **Are set or clicked by user interaction** Testable page components allow users to set a value or click them. - **Are accessible from the Document Object Model \(DOM\)** Testable page components are accessible from the DOM and support JavaScript manipulation of the DOM. Custom UI test steps cannot access page components in the shadow DOM. - **Are accessible to JavaScript** Testable page components are accessible to JavaScript. Custom UI test steps cannot access page components that interact directly with the operating system such as file fields or display non-HTML content such as Excel or PDF files. New browser tabs or windows are not supported by Custom UI test steps. - **Are not excluded from custom UI testing** Testable page components are not excluded from custom UI testing. Automated Test Framework excludes page components that are already testable by other test step categories and also excludes page components associated with ServiceNow AI Platform features. - **Are accessible to the Page Inspector** Testable page components must return results when viewed from the [Page Inspector](https://raw.githubusercontent.com/ServiceNow/ServiceNowDocs/australia/markdown/australia/application-development/automated-test-framework-atf/atf-page-inspector.md). Test designers can use the Page Inspector to identify the testable components of a page. Examples of testable page components include these UI elements. - Buttons - Links - Page text - UI controls - UI macros - ui\_date - ui\_date\_time - ui\_reference - UI pages - Wizards Examples of untestable page components include these UI elements. |Reason untestable|Untestable page components| |-----------------|--------------------------| |Are not settable or clickable|Hidden controls| |HTML comments| |HTML layout elements such as div, section, and span.| |HTML script elements| |Are inaccessible from DOM|Dashboards| |Images| |Lists| |Reports| |Shadow DOM| |Are inaccessible to JavaScript|Excel files| |File fields| |PDF files| |Are ServiceNow AI Platform features|Flow Designer| |Studio| |Upgrade Monitor| |Are testable by other test step categories|Form field labels| |Form field values| |Service Catalog| |Workspaces| ## Control component discovery with allowed and not allowed lists Use sn-atf-blacklist and sn-atf-whitelist to control how the Custom UI page crawler discovers page components. Apply sn-atf-blacklist to exclude a component and all of its descendants from crawler processing. Apply sn-atf-whitelist within a blacklisted hierarchy to override the inherited exclusion and resume processing for a specific component subtree. For example, when a parent component is not allowed, all nested components are ignored by the page crawler. If a nested component is allowed, that component and its descendants are processed even though they remain within the not allowed parent hierarchy. ## Settable page components A settable component is a UI element that has a dynamic value such as a text input field. Settable components support these test actions and test steps. |Page Inspector actions|Custom UI test steps| |----------------------|--------------------| |Set Component Value|Set Component Values \(Custom UI\)| |Get Component Value|Assert Text on Page \(Custom UI\)| |Component Value Validation \(Custom UI\)| |Is Component Disabled|Component State Validation \(Custom UI\)| Settable components have a data type that determines what values a Custom UI test step can set. For example, a page component intended to display a reference to a particular record can have a reference data type to only display Sys ID values. Automated Test Framework allows UI developers to specify a data type to use during custom UI testing. UI developers can assign page components a data type to ensure that a test step sets a valid value. These data types are supported. - Date - Date Time - Reference See [Override component data type](https://raw.githubusercontent.com/ServiceNow/ServiceNowDocs/australia/markdown/australia/application-development/automated-test-framework-atf/override-component-data-type.md) for more information. ## Clickable page components A clickable component is a UI element that users can interact with by clicking, such as inputs of type check box or radio. Clickable components support these test actions. |Page Inspector actions|Custom UI test steps| |----------------------|--------------------| |Click On Component|Click Component \(Custom UI\)| |Get Component Value|Assert Text on Page \(Custom UI\)| |Component Value Validation \(Custom UI\)| |Is Component Disabled|Component State Validation \(Custom UI\)| Clickable components do not have a data type since they do not have dynamic values. ## Retrieved page components Automated Test Framework stores a list of the retrieved page components for each custom UI page you test. Custom UI test steps display the list of retrieved components from the **Component** and **Component values** fields. By default, the list of page components is static and is only updated when Test designers manually click **Retrieve Components**. Administrators can enable the system property **sn\_atf.page\_data\_capture.enabled** to refresh the list of page components every time a Custom UI test step is run. Enabling this property during test design ensures that your test designers always have access to the most current list of page components. Disabling this property after test design is complete allows your tests to run faster because test steps can use the previously retrieved list of page components. The ServiceNow AI Platform treats the list of retrieved page components as data and does not include them in update sets or applications files. When transferring tests from one instance to another, test designers must manually retrieve page components again. ## Design considerations Follow these design considerations when testing custom UI pages and page components. - **Use the page inspector to identify testable page components** The page inspector determines which page components are available for custom UI testing. Page components that are unavailable to the page inspector are unavailable to custom UI testing. - **Navigate to the custom UI you want to test** Use existing test steps to navigate to the target custom UI. For example, to test a Knowledge Base article, use the existing test steps to navigate to a module or to open an existing record. Most custom UI testing requires using existing test step categories as part of the test. - **Use the component area to identify page components** The component area describes the HTML layout element containing the component such as a `