What are the best practices for using Selenium for test automation?

Can anyone please suggest me some of the best practices for using Selenium for test automation that we can work with.

There are two main ways that you can use Selenium for test automation:

  1. build your own framework and code your own tests,
  2. use a codeless automation tool for building these tests.