I'm getting the following error when running my protractor test on mac for safari
Failed to connect to SafariDriver after 10082 ms
Build info: version: '2.53.1', revision: 'a36b8b1',
os.arch: 'x86_64', os.version: '10.12.2', java.version: '1.8.0_101'
Driver info: driver.version: SafariDriver
capability:
name: 'Safari',
browserName: 'safari',
logName: 'Safari',
shardTestFiles: true,
maxInstances: 2
Do we need a specific safari driver for this? If yes, where can I get it from and where should it be declared in the .conf
file.
Thank you!
Yes Selenium webdriver supports Safari browser. Safari is a prominent browser and is provided by default by Apple devices. For Safari versions 10 and greater than 10, the safaridriver comes automatically and is not required to be installed separately. The location of the SafariDriver is: /usr/bin/safaridriver.
How do I automate Safari browser using Selenium? Step 1: Download and Install the Safari Browser Extension. Step 2: Enable the WebDriver Browser Extension by going to Safari > Preferences and open the preferences window and then enable the “Enable WebDriver“ option. Step 3: Restart your Browser.
Safari's driver is called safaridriver and has a preset available in most Selenium client libraries. You can write tests in Python, Java, PHP, JavaScript, and any other language whose library is compatible with the W3C WebDriver protocol. WebDriver is a REST API.
Yes, you need to install a specific safari driver in order to launch it inside of protractor. And of course, you need to be on a mac. Protractor is essentially a layer built on top of Selenium, so you need to install the selenium driver for Safari, which is implemented as a Safari plugin.
Here is what you need to do:
The driver is now installed and should be available to your protractor process.
This is the driver for Selenium 2.48. I couldn't find a more recent build, so if this driver version doesn't run with the current version of Protractor, you will need to either use an older version of protractor that is based on Selenium 2.48 or build the safari driver from source.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With