Validate
Validate the locator.
Start validate
You can start "validate" from the locator viewer tab in Visual Studio Code.
Locator validation
Single locator
Click the button Validate
, and get the validation result referring to Validation result.
Single locator with variables
- Capture a locator, and modify the locator with variables, for more about variables, please refer to Parametric Locator.
- Click the button Validate, and a pop-up window will show as below:
- Input the value of the variable, and click the button
Continue
- Get validation result referring to Validation result
Single locator with mutiple windows
- If a single locator is found in multiple windows, click the button
Validate
, a pop-up window will show as below: - Get a correct window by selecting the index of window, and click the button
Continue
- Get validation result referring to Validation result
Mutiple similar locators
- Capture a locator, and modify the locator with wildcard as follows:
- Select the index of the element, then click the button
OK
- Get validation result referring to Validation result
Validation result
When validation is successful, the UI element will be highlighted, and locator viewer tab in Visual Studio Code will show as below:
When validation fails, the locator viewer tab in Visual Studio Code will show as below: