In this tutorial, we’ll edit register trace by adding a check step between steps and changing the check’s attributes.
Edit / maintain register trace by adding steps
Change step locators (html locators)
Set step timeout
Note: the editor is only available in Firefox.
1. Add a Step Between Steps
Now we have the “Register” trace opened which we created earlier. Click the plus sign between the step 0 and step 1 to move the Pointer to between the steps.
2. Add check
Now the Pointer has moved between the steps. Add a check by selecting check mode on the Pointer (1) and click “REGISTER” on the Virtual Browser (2).
3. Opening Locators & Check Value
Click the locators from the newly created check step by hovering the mouse over it to open the locators for this step.
The locators are pointing to the element on your web page which contains “REGISTER” string. Editor automatically generates the unique locators it can find when adding a step. You can add, edit or remove locators for a step here. A step uses all its defined locators one by one until it finds a match (at least one locator matches) on the web page.
5. Changing Check Value
The check can verify that the target element exists or that it has the correct content. By default it will verify the text content.
Let’s change the value from “REGISTER” to “CREATE ACCOUNT”, so we can see what happens when a check cannot find what it’s looking for. Any changes to values will be automatically saved.
6. Step Timeout
The timeout setting defines how long will the trace poll for success of this step - how long to look for the “CREATE ACCOUNT” string.
Change the timeout to 3 seconds by using the slider (1) to make the trace fail quicker.
Click Chrome to run the trace with Chrome (2).
7. Step Fail View
When a step fails, an error message is shown after the step (1).
If the locators matched an element on the web page but the content was not expected, the area for the content is highlighted (2).
Let’s fix this step by opening the locators.
8. Step Fail View
Now, instead of changing the text value from “CREATE ACCOUNT” back to “REGISTER”, we are going to select “Element Exists” (1). If any of the locators matched an element on the web page, this check will be successful. This setting is helpful if the site is changing often and we don’t want to be updating the traces when the content changes.
Run with Chrome to make sure the trace passes (2).