Safari specific functionality
These are capabilities and features specific to Apple Safari browsers.
Unlike Chromium and Firefox drivers, the safaridriver is installed with the Operating System. To enable automation on Safari, run the following command from the terminal:
safaridriver --enable
Options
Capabilities common to all browsers are described on the Options page.
Capabilities unique to Safari can be found at Apple’s page About WebDriver for Safari
Starting a Safari session with basic defined options looks like this:
SafariOptions options = new SafariOptions();
driver = new SafariDriver(options);
options = SafariOptions()
driver = webdriver.Safari(options=options)
var options = new SafariOptions();
var driver = new SafariDriver(options);
options = Selenium::WebDriver::Options.safari
@driver = Selenium::WebDriver.for :safari, options: options
let driver = await env.builder()
.setSafariOptions(options)
.build();
val options = SafariOptions()
val driver = SafariDriver(options)
Mobile
Those looking to automate Safari on iOS should look to the Appium project.
Safari Technology Preview
Apple provides a development version of their browser — Safari Technology Preview To use this version in your code:
Coding Help
Note:
This section could use some updated code examples
Check our contribution guidelines and code example formats if you’d like to help.
Check our contribution guidelines and code example formats if you’d like to help.
Last modified March 2, 2023: Removing custom tabpane and using Docsy's (2e303e9dda)