How to find existing Web Locators?

Before creating a Web Locator, we should always see if there is an existing one that can be used. This will keep the number of locators manageable, and eliminate duplicate efforts.

It is important for the team to define the set of web page names that will be used on a project. This will help guide the team members to follow the same naming practice.

There are two ways to find Web Locators.

1. Search when creating a test step

  • When creating a new test step, click on the drop-down list.
  • Select the command
  • In the Locator field, do a partial search. This field uses the Key format for the Web Locator name: <web page>.<type>.<alias>  For example these are valid search terms for this field:
    • google*
    • *button
    • *text
    • *username

mceclip0.png

2. Use the Filter on the Web Locators tab.

  • Click on Artifacts > Web Locators
  • This returns a list of all Web Locators in the system and can be sorted by any column
  • Click on Add Filter

mceclip1.png

  • Check the checkbox for the type of search desired, then fill in the value field. Wildcards can be used in the Value field.

mceclip2.png

  • Click Apply
  • The result list of matching Web Locators is returned
  • For example, the Type [Web Page] was used with search parameter [*ref_app] to locate all web locators on the page [ref_app]. The result is below:

mceclip3.png

 

Was this article helpful?
0 out of 0 found this helpful
Have more questions? Submit a request

Comments

Please sign in to leave a comment.