Page tree

Versions Compared


  • This line was added.
  • This line was removed.
  • Formatting was changed.


  • In the locator files, the keys of the locator values should follow a common syntax so it will be easy to understand what the locator is meant for.
  • There should be no duplicates of any locator keys in platform-specific locator files.
  • All the selenium code should be written in the Page classes only.
  • The step definitions should only have the calls to the Page Class methods.
  • Operations on the screen should be kept in separate methods then the validations.
  • In the feature or BDD files, the operations on the screens should be stated as When statements and the validations should be kept as then statements.
  • Use of static waits should be avoided and kept to minimal.
  • If you are performing any clicks on the elements then one can avoid the verification of the same elements as the click command will validate that the element was there on the screen.

These are some of the standard practices that are recommended to follow. In addition to the above-mentioned practices, all the java based coding practices should be followed.