Member-only story

Why WebDriver driver = new ChromeDriver();

Tahera Firdose
6 min readAug 22, 2021

--

1. Why we cannot use WebDriver() driver = new WebDriver();

2. Why it’s not advisable to use ChromeDriver() driver = new ChromeDriver ();

3. Why is it advisable to use Webdriver() driver = new ChromeDriver();

Figure 1:

What is an Interface?

In simple language an interface is a blueprint or template of a class. You can just relate it as blueprint of the house which give us information about the floor plan, footing, roof plan, kitchen cabinet layout etc.

In Java, an interface is a blueprint or template of a class. It is much similar to the Java class but the only difference is that it has abstract methods and static constants.

There can be only abstract methods in an interface, that is there is no method body inside these abstract methods.

Some Important points on Interface:

1. The interface keyword is used to declare an interface.

2. An interface defines a set of specifications that other classes must follow.

--

--

Tahera Firdose
Tahera Firdose

Written by Tahera Firdose

Datascience - Knowledge grows exponentially when it is shared

No responses yet