WebDriver driver = new ChromeDriver()
Upcasting / Dynamic Binding - in selenium
- In the above statement WebDriver is an interface and ChromeDriver is an class.
- Driver is the Refernce Variable of WebDriver interface.
- New is the keyword used in Java to create an object of ChromeDriver().
- ChromeDriver() is the constructor of ChromeDriver class which initialize the object, this is use to launch the Chrome Driver.
- This is also known as Dynamic Binding in Java
Post a Comment