Reputation: 1021
I have to create POMs for multiple pages each with over 50 elements a user can interact with. A couple of ways of doing this manually would be to use the Selenium IDE and interact with the field, revealing the identifier for the element. Another option is to right click, inspect element and figure out the identifier. Both these methods are time consuming and I am stretched for time. :-(
Is there an easier, perhaps automated way of doing this?
Upvotes: 0
Views: 56
Reputation: 133
Capture element using Selenium IDE is not best way to do. Good to install Firepath on top of Firebug in Firefox which will make life little easy. But in some complex pages with long XPATH an dsimilar CSS or Name/Id identification you have to use regular Expression.
As per my understanding there is no automated way to capture all webElements in the page.
And its not you are working with all pages together, as its gets developed and release to Testing you can add webElement specific to the page ( As you are using POM).
You are trying to over Engineering and automate the Automation which will make your code complex and fragile.
So i suggest manual Inspection of element needed and use the Plugin i suggested above which make your life easy.
Upvotes: 1