A variable declared as WebDriver interface type can be assigned with the objects of multiple class types like FirefoxDriver, ChromeDriver, InternetExplorerDriver etc.
But we cannot assign the object of FirefoxDriver class type to a variable declared of ChromeDriver class type.
Hence at Framework level inorder to run our automation scripts on a required browser type, we can simply assign the object of required Class types to the same WebDriver interface declared variable.
- Arun Motoori (www.TutorialsNinja.com)