I think a long list of locators hidden away in a property file is insane, you end up with long unreadable lists of rubbish. It may well look manageable at first but eventually it gets really long and anybody new looking at the codebase has to sit there for hours trying to work out where everything links together. Secondly if you have a long list of locators hidden away in a properties file and you want to change the name of one of these properties you have refactoring hell (If you are using a decent modern IDE like IntelliJ IDEA you can change the name of a variable in one place and it will change that name everywhere else for you). Keep it in the code is my recommendation.
What you should really do is use page objects. Page objects can be for a whole page, or you could split out a consistent bit of functionality into its own page object (for example if you have a header and menu bar that is consistent across the whole site split it out into its own page object and reuse it in your other page objects).
At the end of the day there are many ways you can structure your data, but try and do something that makes it maintainable in the future and easy for new people who join the project to understand.
--
You received this message because you are subscribed to the Google Groups "Selenium Users" group.
To post to this group, send email to seleniu...@googlegroups.com.
To unsubscribe from this group, send email to selenium-user...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msg/selenium-users/-/VZdgWKWVaWIJ.
For more options, visit https://groups.google.com/groups/opt_out.