Skip to content

Understanding of options available while updating locators in QaSCRIBE

Every application is unique in regards to how the UI is laid out wherein there is no commonality in how the locators are defined. It is very much possible for the UI to have duplicate locators OR locators that are duplicated but one of them is hidden state etc. To account for such cases, QaSCRIBE provides multiple options while you use QaSCRIBE to maintain test automation.

You will see these options when you choose Magic Wand icon and also once the validation is performed. You are recommended to read these and understand how they impact the test script before you attempt to perform these actions.

Before performing Locator Validations

When you click on Magic Wand at any instruction, you see a popup with multiple options. You need to choose an option before you can proceed.


  • Identify invalid locators that can't individually match any element (visible/hidden) on the UI: When you select this option, it identifies the invalid/stale locators which do not match any UI elements.

  • Identify the locators that individually match hidden (invisible) elements on the UI: On selecting this option, it identifies the locators of the invisible/hidden UI elements.

  • Identify the locators that individually match more than one visible/hidden element on the UI: When you select this option, it identifies the locators that match more than one visible/hidden UI elements.

  • Identify all the above: On selecting this option, it finds the locators with all the above-mentioned combinations.

You can set the default option whether the prompt to be shown or not by setting it in the 'My Project Settings for Test Scripts module'.

You can see the different icons shown on performing the validity check and are described as shown below:



  • For the locators that are unique and valid, you can see the 'Magic Wand' icon shown for such locators.
  •                                                                  
  • If any of the locators individually match more than one visible and/or hidden elements on the UI, those locators within the locator drop-down is visually identified by a yellow sad face icon with a count of the elements that are matched as a superscript.
  •                                                                 
  • It is also possible for a locator to match (one or more) visible element(s) and one or more invisible element(s). In this case, a yellow sad face is shown indicating that the same locator also found a visible element. And, the eye icon with a cross mark, as shown above, represents that they are hidden elements available for the same locator.
  •                                                                
  • If any of the locators can't match any visible or hidden elements on the UI, those locators within the auto-expanded drop-down of locators are visually identified by a red frustrated face icon.
  •                                                                

You can control the selection of the options you make while using QaSCRIBE (performing the Locator Validity check, Magic Wand usage to update/delete/add the locators available and during Locators Replacement) by having the default settings made in the 'My Project Settings for Test Scripts module.

To know more about how to set the default settings for your project, please click here.

After performing Locator Validations

On performing the Locator Validity check, you identify the invalid (or) invisible/hidden (or) stale locators along with valid, visible and unique locators for the elements that are identified with the 'Magic Wand' icon. When you click on this 'Magic Wand', it allows you to add/update/delete the locators of the elements as per the selected options in the popup.

The corresponding actions would be performed based on the options selected in the popup. Also, please note that the option selected in the 'Deleting & Reordering of Invalid Locators' will be performed only after performing the actions for the option selected in the 'Updates to existing locators' column. For any of the options selected under the 'Addition of new locators' column would check for the valid locators and then only those will be added in the locator dropdown.

Let us go through about the options in each column in detail:

Updates to existing Locators

  • Only those locators that failed a validity check: On selecting this option and clicking on the 'Continue' button, the invalid/hidden locators would be updated.
  • All locators beyond than the locator on which magic wand is used:  On selecting this option and clicking on the 'Continue' button, all the locators (except the one on which the magic wand has applied) are validated and are updated accordingly.
  • All locators beyond this locator that are identifying a different element than the locator on which magic wand is used: On selecting this option and clicking on the 'Continue' button, the locators which are finding the different elements are validated and updated.

Deleting & Reordering of Invalid Locators

  • Push all invalid locators that cannot be updated by the magic wand to the bottom of the list but don't delete any: On selecting this option and clicking on the 'Continue' button, all the invalid locators are pushed to the bottom of the list in the locators dropdown and are retained.
  • Retain the current order as is but don't delete any: This option will retain the locators without making any changes.
  • Auto-delete any locators that failed validity checks that cannot be updated by the magic wand: On selecting this option and clicking on the 'Continue' button, the invalid/hidden locators would be deleted.

Addition of new locators

  • Add new locators, if any, of types that did not exist previously but exist now, to the bottom of the list: When you select this option, if there are any type(s) like id, CSS, XPath is missing in the available list of locators would be added to the bottom of the list in the locator dropdown.
  • Don't auto-add any new locators, if any, of types that did not exist previously but exist now: On selecting this option, none of the new locators would be added even if there are any new types like id, CSS, XPath available for the element. 

Feedback and Knowledge Base