1.

As seen below, we establish a WebDriver reference variable called 'driver.' What exactly is the purpose of proceeding in this manner?

Answer»

WebDriver driver = NEW FirefoxDriver();

instead of creating

FirefoxDriver driver = new FirefoxDriver();

We may USE the same driver VARIABLE to work with any BROWSER we want, such as IEDriver, SafariDriver, and so on, if we construct a reference variable of TYPE WebDriver.



Discussion

No Comment Found