java - Best way to store locators -


I am following page object design pattern for selenium automation and I think that many people Store locators in properties Access them in the file and the code It's a good idea to place the locator in a different place.

Since I have not worked on any major project for selenium automation, I would like to know the following about so that I can avoid problems that may increase in the future:

  1. Whether the reserves are stored in supportive files (where test cases are more than 1000 or more) in big projects?

    a) If not helpful, big projects, what are the problems that are not being stored in the property files to store the locators?

    b) If it is helpful, then what are the precautions taken if the work is taken?

  2. Is it the best way to lock yourself into the page class compared to the properties?

I argue the files are stored in the page class only loaded from the properties file Make additional overhead or a large file to be parsed. It would also be difficult to maintain such a file, even with a good device support, you must be forced to use CTR + F.

Even at a more conceptual level, it seems to be incorrect. Property files have a good fit configurable criteria for storing, and are especially good candidates to run in runtime.

Local people do not have this nature. If your expected profit is being declared at a central location, then you should constantly use the dedicated category, which will give you better redistribution options.


Comments

Popular posts from this blog

python - Overriding the save method in Django ModelForm -

html - CSS autoheight, but fit content to height of div -

qt - How to prevent QAudioInput from automatically boosting the master volume to 100%? -