Showing posts with label WebDriver driver = new FirefoxDriver();. Show all posts
Showing posts with label WebDriver driver = new FirefoxDriver();. Show all posts

Wednesday, June 11, 2014

What do you mean by WebDriver driver = new FirefoxDriver();

What do you mean by
WebDriver driver = new FirefoxDriver();

Ans- Here in this, WebDriver driver = new FirefoxDriver();
An instance of FirefoxDriver class has been created and the address of that instance has been stored in the WebDriver type driver variable. As soon as 'new' keyword create the instance in the heap area while execution it will open the firefox browser with default setting.
As well as FirefoxDriver class will implement all the methods of WebDriver interface.