Edit this Doc The Safari Driver

Safari driver has been added to Appium since version 1.20. This driver is a wrapper over Apple's safaridriver binary, which is included to the standard macOS distribution and implements communication with either desktop or mobile Safari browser via W3C WebDriver protocol.

Development of the Safari driver happens at the appium-safari-driver repo.

Appium also supports mobile Safari automation and Safari web views automation using the appium-remote-debugger. This module is used to implement context switching feature with XCUITest automation name. It is more universal and flexible than the current Safari driver, however it is using the undocumented WebKit communication protocol under the hood. Which means the development of it and the effort to keep it in working state is comparably high while the list of supported features is smaller. On the other hand safaridriver is maintained by Apple, which means it is always in sync with the most recent browser and communication protocol requirements.

Long story short, it makes sense to prefer this driver if it is necessary to only automate a web application that only works in Safari browser (either mobile or desktop). In case it is necessary to interact with native context or switch between different applications/contexts while automating your scenario then the obvious choice would be either XCUITest Driver (for the mobile platform) or Mac driver (for the desktop platform).

Requirements and Support

In addition to Appium's general requirements:


The way to start a session using the Safari driver is to include the automationName capability in your new session request, with the value Safari. Of course, you must also include appropriate platformName (Mac or iOS). Read https://github.com/appium/appium-safari-driver/blob/master/README.md for more details.


The list of available driver capabilities could be found at https://github.com/appium/appium-safari-driver/blob/master/README.md