Each browser requires a browser-specific WebDriver to be set up before tests can be run. If you’re creating a Maven project, consider using the automated WebDriver plugin. It automatically downloads 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 (such as,
apt-get). You can also manually download and install the following drivers:
GeckoDriver for Firefox: https://github.com/mozilla/geckodriver/releases
ChromeDriver for Chrome: https://sites.google.com/chromium.org/driver/
Microsoft Edge WebDriver for Edge: https://developer.microsoft.com/en-us/microsoft-edge/tools/webdriver/
|Safari drivers are pre-installed on Macs and don’t need to be manually installed.|
|The WebDriver version is often tied to the browser version. You need to make sure that the combination is a supported one. For example, ChromeDriver 2.35 only supports Chrome 62–64.|
The driver executable must be included in the operating system
PATH or be given to the test using a driver-specific system Java property:
Usually, it’s simpler to add it to the
PATH variable so that it’s always available.