Override component test actions
-
- UpdatedJan 30, 2025
- 6 minutes to read
- Yokohama
- Automated Test Framework
Change the testing properties of a particular page component using HTML attributes that are specific to Automated Test Framework.
Before you begin
About this task
When Automated Test Framework retrieves a component, it determines which interactions it supports, such as whether it is a settable or clickable component. If the component is settable, Automated Test Framework determines the field type that can be set. If Automated Test Framework incorrectly determines your custom component's actions or field types, or your component contains multiple DOM elements that should be treated as one entity, explicitly set them using HTML attributes that are specific to Automated Test Framework.
Using sn-atf-clickable and sn-atf-settable attributes
Use sn-atf-clickable
and sn-atf-settable
attributes
to specify that an element and its child elements should be treated as a custom clickable or
custom settable component.
Before you begin
Procedure
Example
Using sn-atf-class attribute
Use the sn-atf-class
attribute to specify the JavaScript object to
use when testing a custom clickable or settable component. Write a custom JavaScript object
to specify the test actions available for a custom component.
Before you begin
About this task
sn-atf-class
attribute. Set the value of the attribute to
the name of the JavaScript object containing the component test actions. Testable custom
components must be either clickable or settable, and this classification determines the
functions and properties your JavaScript object requires. See Custom UI test steps for testable page component
requirements.Procedure
Example
Reference and record picker
Use custom UI steps to manipulate the values of the
sn-reference-picker
and sn-record-picker
angular directives.
The value on a reference picker returns the sys_id
of the chosen record. The
value on a record picker returns the value field chosen for that record picker. Both elements
can be set by selecting a record to set as their value.