Installing Web Drivers
Each browser requires a browser specific web driver to be setup before tests can be run.
Tip | If you are creating a Maven project, consider using the automated web driver plugin. It will automatically download the drivers you need. See https://github.com/vaadin/testbench-demo for an example |
If you want to install the drivers, most of them are available through the package manager (e.g. brew
or apt-get
). You can also manually download and install the following drivers yourself:
GeckoDriver for Firefox: https://github.com/mozilla/geckodriver/releases
ChromeDriver for Chrome: https://sites.google.com/a/chromium.org/chromedriver/downloads
Microsoft web driver for Edge: https://developer.microsoft.com/en-us/microsoft-edge/tools/webdriver/
Selenium IEDriver for IE11: http://selenium-release.storage.googleapis.com/index.html
Tip | Safari drivers are pre-installed on Macs and do not need to be manually installed. |
Note | In many cases the web driver is tied to the browser version. You need to make sure that the combination is a supported one, e.g. ChromeDriver 2.35 only supports Chrome 62-64. |
Adding Web Driver to System Path
The driver executable must be included in the operating system PATH
or be given to the test using a driver-specific system Java property:
Google Chrome:
webdriver.chrome.driver
Mozilla Firefox:
webdriver.gecko.driver
Microsoft Edge:
webdriver.edge.driver
Internet Explorer:
webdriver.ie.driver
In most cases, it is easiest to add it to the PATH
variable so that it is always available.
8586C304-6C9B-47EA-8E67-8D22D324A0D9