SafariDriver
Run your Nightwatch.js tests in Safari using SafariDriver.
Starting Safari 10, the safaridriver
is pre-installed if Safari is installed in your OS. You don't need to explicitly install the if you have the Safari browser installed. Support for the legacy safaridriver
has been removed in recent versions of Selenium, which you can track here.
SafariDriver for pre-Selenium 2.45.0 version
In earlier versions, pre-Selenium 2.45.0, the SafariDriver acts as an extension to the Safari browser that can be downloaded from here.
To install SafariDriver:
- From folder that matches the version of Selenium you're using, search and download the
SafariDriver.safariextz
file. - Open Safari and click the File menu.
- Select the SafariDriver extension package,
SafariDriver.safariextz
, you downloaded and click Open.
You can now use Safari in your test scripts in the browserName
key under your your desiredCapabilities
key as a browser:
"desiredCapabilities" : {
"browserName" : "safari",
"javascriptEnabled" : true,
"acceptSslCerts" : true
}
Safari specific capabilities
Learn more about Safari-specific capabilities.