Skip to main content

Validate

Validate the locator.

Start validate

You can start "validate" from the locator viewer tab in Visual Studio Code.
vscode validate

Locator validation

Single locator

Click the button Validate, and get the validation result referring to Validation result.

Single locator with variables

  1. Capture a locator, and modify the locator with variables, for more about variables, please refer to Parametric Locator.
    locator variables
  2. Click the button Validate, and a pop-up window will show as below:
    validate variable window
  3. Input the value of the variable, and click the button Continue
  4. Get validation result referring to Validation result

Single locator with mutiple windows

  1. If a single locator is found in multiple windows, click the button Validate, a pop-up window will show as below:
    validate muti windows
  2. Get a correct window by selecting the index of window, and click the button Continue
  3. Get validation result referring to Validation result

Mutiple similar locators

  1. Capture a locator, and modify the locator with wildcard as follows: locator wildcard
  2. Select the index of the element, then click the button OK
    validate muti locators
  3. 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:
    validate success

  • When validation fails, the locator viewer tab in Visual Studio Code will show as below:
    validate fail