Consider the locator for an Element changes for different versions of the product. And we need to test both the versions of the product.
In this case I would like to use -
- Multiple locators to locate this single element. (like two different xpaths OR one xpath & one id)
- Use locator1 for version 1 and locator2 for version 2.
Can you suggest what would be good design to implement this? Is this possible to implement along with PageFactory
?
I am looking for where I can provide two different types of locators. e.g. xpath and id. Also should I think of using object repository along with POM to run the test with two different product versions?