Problems in using Page Object Repository framework for selenium automation
Today I was googling to find a solution for problem of duplication of locators in writing my automation tests using selenium page object repository framework.
Due to this, maintenance of tests , if there comes new failure, becomes a hectic task. Doing so, I found a blog reference which helps me to find out a solution.
Save your locators as By objectsReference: From a blog by Lain Rose. His repository can be accessed at this location: https://github.com/iainrose/vanq-java
This allows you to solve all the problems listed above and I’ve also noticed a reduction in the number of StaleElementExceptions I run into as I have a lot more control about when an element is looked up and assigned to a variable.
My example of how I think a sample page object should look can be found here.
Thanks Lain Rose for sharing solution.
Feel free to post a comment here, if you have any doubt or question to ask.
This comment has been removed by a blog administrator.
ReplyDelete