After years of working with the Selenium framework, I have realized that the ‘One size fits all’ approach does not apply to Selenium test automation. Though there are no thumb rules for the design and development of scalable automation tests, there are certain principles that you must follow when writing tests using the Selenium framework. The principles can also be termed ‘Selenium best practices’.
We discuss the top Selenium best practices for Selenium test automation which might help you develop well-designed and scalable test suites (or test cases).
A majority of the Selenium best practices discussed subsequently in the blog are agnostic of the programming language being used for Selenium test automation. So, regardless of the language you use for automation testing with Selenium, these Selenium best practices will still be of value.
Source- https://www.lambdatest.com/blog/selenium-best-practices-for-web-testing/