Frage im Vorstellungsgespräch bei Oracle

Is Webdriver a class or interface?

Antworten zu Vorstellungsgespräch

Anonym

29. März 2018

It is an Interface.

Anonym

12. Juli 2018

Webdriver is basically an Interface which is always implemented by any of browser class like ChromeDrive() , FirefoxDriver(), OperaDriver() etc.

Anonym

6. Mai 2020

WebDriver is an interface which can be implemented by the class which implements it. ChromeDriver,geckoDriver,IEDriver these are the class which implements the webdriver interface . Since webdriver is an interface it contians all the abstract methods .These methods are implemented by the class implementing the interface . Hence in our code we write WebDriver driver = new ChromeDriver(); we can also write ChromeDriver driver = new ChromeDriver(); But here we can only invoke methods that are of chrome driver. Whereas in WebDriver driver = new ChromeDriver(); we can invoke the methods of both chrome driver and webdriver