As part of explaining all the new features in the latest Selenium IDE, I will explain one of the new feature ‘Fallback Locators Strategy’ in the latest Selenium IDE’s.
Let’s get started.
New Selenium IDE – Fallback Locators Strategy
Follow the below steps for understanding the one of the new feature ‘Fallback locators strategy’ in the latest Selenium IDE’s:
1) Open any browser say Chrome having the latest Selenium IDE installed and click on ‘Selenium IDE’ option as shown below:
2) Click on ‘Create a new project’ option as shown below:
3) In the displayed ‘Name your new project’ dialog, enter any project name say ‘Project1’ and click on ‘OK’ button as shown below:
4) Enter the URL say http://omayo.blogspot.com/ into the ‘Playback base URL’ field and click on ‘Record’ button as shown below:
5) Once the Test is recorded, click on ‘Stop Recording’ button as shown below:
6) In the displayed ‘Name your new Test’ dialog, enter any Test name say ‘Test1’ and click on ‘OK’ button as shown below:
7) Click on any step say ‘Step5’, click on ‘Target’ field and observe that the Selenium IDE has captured multiple locators for the ‘Search’ button UI element on the page as shown below:
From the above captured multiple locators for the ‘Search’ button on the page, the first locator will be used for locating the ‘Search’ button during the execution of the Test.
If the first locator fails to locate the ‘Search’ UI element on the page, the Selenium IDE uses Fallback Locator Strategy to locate the ‘Search’ button using the next locator from the multiple captured locators until all the captured locators fail to locate the ‘Search’ button on the page.
Here concludes the explanation on how the Fallback Locators Strategy in the latest Selenium IDE works.
In the next article, I will practically demonstrate another new feature in the latest Selenium IDE. (new features in the latest Selenium IDE)
Next Steps:
- > Check complete Selenium Tutorial Contents here (Click here)
Please leave your questions/comments/feedback below.
Happy Learning ?
On a mission to contribute to the Software Testing Community in all possible ways.