What is the purpose of creating a reference variable- 'driver' of type webdriver instead of directly creating a firefoxdriver object or any other driver's reference in the statement webdriver driver = new firefoxdriver();?
Answer / Anupam Kumar Singh Tomer
Creating a reference variable of type WebDriver, such as 'driver', provides flexibility to switch between different browsers (like Chrome, Firefox, Safari, etc.) during testing by simply changing the driver class. This abstraction allows for more efficient code maintenance and reusability.
| Is This Answer Correct ? | 0 Yes | 0 No |
How to select value in a dropdown?
Explain Cucumeber Framework?
How many types of webdriver api's are available in selenium?
What is the difference between selenium and sikuli?
How do you fetch the data from the excel
How do you attach File on a page?
Tell me what api is required for database testing in selenium webdriver?
What You Know About Selenium Grid?
Explain what are the limitations of selenium ide?
From your test script how you can create html test report?
What is the difference between driver.getwindowhandle() and driver.getwindowhandles() in selenium webdriver?
From selenium ide how you can execute a single line?