Hi All, Today we are continuing with what is DriverManager Class and what is the responsibility of this class. DriverManager is abstract class . Here ThreadLocal<RemoteWebDriver> driver is a static ThreadLocal variable that stores the RemoteWebDriver instance. A ThreadLocal allows each thread to have its own copy of the variable, ensuring thread safety in parallel execution. The createDriver() method is declared as abstract, indicating that it must be implemented by subclasses. This method is responsible for creating the RemoteWebDriver instance. getDriver() is a static method that returns the RemoteWebDriver instance stored in the ThreadLocal variable. setWebDriver(RemoteWebDriver driver_) is a static method used to set the RemoteWebDriver instance in the ThreadLocal variable. This code serves as a base class for managing the creation and retrieval of the RemoteWebDriver instance. By using ThreadLocal , it ensures that each thread has its own ...
Step 1: Create an interface and declare some common unimplemented methods Step 2: Create UIAction class which implements this interface Step 3: Create Base Page Step 4: Create Pages which extends this Base page Step5: Create Login Test and test this implementation Note : Here I have used Junit Testing framework for testing along with Selenium Java Binding used few oops features like inheritance , abstraction etc. What is DriverManager , DriverFactory I will discuss in next post. Soon I will be adding this code to github repo. @Author Azharuddin Khan https://www.linkedin.com/in/azharuddin-k-27aa7a18b/