Using page object for selenium, where is the best place to initiate the browser and get url?

602 views Asked by At

I m using pytest with selenium and have started to refactor the tests to use page object model. I have read up on some examples from books and blogs. They call webdriver.firefox() at different places for the tests, for example:

  1. It is in base page class init Or
  2. Having a fixture in the test class that called an instance of the base page and then the driver in the fixture itself Or
  3. From a class in conftest.py

Is there a best practice way to determine where the browser should be started?

0

There are 0 answers