Link to home
Start Free TrialLog in
Avatar of Sri
Sri

asked on

Best Practice to Maintain Locators in Selenium project

Hello,

I am looking for a best practice to maintain locators in selenium project, i have multiple e-commerce websites which are almost similar but there are minor changes based on the customer so i am looking to maintain them in centralized location and refer to them.

For example in the credit card payment page one customer will have captcha and the other will not, in the similar way for purchasing products one customer is allowing to use vouchers and other is not

I am using pageobjectmodel and creating a class for each web page to perform test on the web elements.

Please share if there are any examples of similar kind.

I am totally new to selenium, hope i framed my question understandable to everyone
This question needs an answer!
Become an EE member today
7 DAY FREE TRIAL
Members can start a 7-Day Free trial then enjoy unlimited access to the platform.
View membership options
or
Learn why we charge membership fees
We get it - no one likes a content blocker. Take one extra minute and find out why we block content.