Context

This package will contain classes responsible for contains, holding objects throughout test execution etc.,

We can use this class to store all the constants that are not going to change during the test execution. Like URLs, File paths, credentials for our applications etc.,

Since our framework is capable of running tests in parallel, it's very important to manage our webdriver instance across the threads that are running in parallel. This class makes sure there is one and only one webdriver instance in each thread.

So we set webdriver instance in this context whenever we initialize, and this class maintains that instance in that particular thread.

So in our code whenever we need webdriver instance we should always use WebDriverContext.getDriver()

Last updated