Test ID
Locate elements using custom Test ID attributes added specifically for testing.
Test ID selectors target elements using attributes specifically added for testing purposes. These selectors are recommended because they are stable, not tied to styling or layout, and do not change as easily as class names or visible text. They’re ideal for creating reliable, long-lasting tests.
DoesQA searches for the following test-ids matching the given text:
Examples:
[data-testid="login-button"]
[data-test="product-card-1"]
[data-test-id="cart-item-count"]
[data-qa="error-message"]
Last updated