WebDriver Installation and Initialization for Different Browsers
Most WebDriver implementations require an additional executable for Selenium to communicate with the browser.
We can manually add the executable before starting WebDriver session, but this can make the framework less portable as the executables are platform-dependent and need to be in the same place on every machine or include the executables with the framework.
By adding the driver to the system classpath, selenium will be able to locate the executables without bundling them with the framework.
For downloading driver executables of different browsers:
Internet Explorer: https://selenium-release.storage.googleapis.com/index.html
setx /m path "%path%;C:\selenium-drivers\bin"
sudo mkdir -p $HOME/selenium-drivers
export PATH=$PATH:$HOME/selenium-drivers >> ~/.profile
The path of the driver can be set explicitly, and WebDriver instance of different browsers can be created using the following code.