Automation IDs
Enable automation IDs for testing.
To enable Automation IDs, enable
Advanced mode
in the IDE settings,
and in the Web Presentation Engine, select Enable automation IDs
. When
enabled, the Web Presentation Engine adds
data-automationid="<BrowsePath>"
on the <div>
element of each UI component. The attribute value is the browse path of the component, that
represents the position of the component in the UI hierarchy. For example
data-automationid="NewHMIProject136/UI/MainWindow/ScrollView1/Rectangle1"
.You should use
data-automationid
as the primary selector in end-to-end or
integration tests. It is more stable than text, CSS classes, or DOM structures that may change
due to refactoring.
TIP:
- Do not usedata-automationidfor CSS or application logic.
- Do not enable the feature in production. It is intended for testing sessions only.
automation IDs
testing
Provide Feedback