All the browsers now require a driver in order to send and receive WebDriver commands.
These are now all maintained by the browsers vendors (IE being the exception).
Before I tell you where to find all the drivers you’ll need, I want to tell you how you use them. There are many ways to inform Selenium on the location of the drivers. Choose the one that works best for you.
We’ll start with Chrome, as that is currently my default browser.
In order to automate Chrome, you need to download ChromeDriver.
Make sure you download the correct version for your machine.
If you’re going to use the system property approach the key is called ‘webdriver.chrome.driver’.
In order to automate Firefox, you need the GeckoDriver.
If you’re going to use the system property approach the key is called ‘webdriver.gecko.driver’.
In order to automate Safari, you don’t need to download a driver! It’s already included in MacOS. But you do need to enable some settings.
Firstly, we need to enable developer mode in Safari if you haven’t already.
Open Safari preferences and go to the advanced tab, and at the bottom check ‘Show Develop menu in menu bar’.
Secondly, we need to enable ‘Allow Remote Automation’. We do this by going to the newly added Develop menu and check it, it’s near the bottom of the list
You will now be able to follow the code example above to open Safari with WebDriver.
To automate EDGE, firstly you need to be on a Windows 10 machine and download the EDGEDriver
If you’re going to use the system property approach the key is called ‘webdriver.edge.driver’.
If you’re going to use the system property approach the key is called ‘webdriver.ie.driver’.