A Web Locator references an element on a web page. Web Locators are used by Subject7 to interact with elements.
1. After creating a new test case, click (Hide Test case Info) and select the command to use from the drop-down list.
2. Next to the Locator field, click Add or View. This is where the Web Locator is created. Alternatively, you can go to Artifacts > Web Locators and define a locator there.
3. The three mandatory fields when creating a Web Locator are:
- Web Page: The web page on which the element is located.
- Type: Type defines the type of element. For example: select, button, text, radio, etc.
- Alias: A name for the element
These three fields make up the compete key for the locator. For example, a locator for the username on Google's login page might look like this:
google.text.username
It's important to remember that this name is only a name, and does not tell Subject7 how to find the element on the web page. There are a number of fields that can be used to locate an element, and only one is required. The fields that can be used are:
- Web ID
- Name
- Css Selector
- XPath
Once finished, click Save. The user is returned to the test case, with the new locator added.
Comments
Please sign in to leave a comment.