Edit this Doc The Mac2Driver
Mac2Driver has been added to Appium since version 1.20. This driver is for automating macOS applications using Apple's XCTest framework. It provides more flexibility and features in comparison to the legacy MacDriver and is better compatible with operating system internals. The driver operates in scope of W3C WebDriver protocol with several custom extensions to cover operating-system specific scenarios. The original idea and parts of the source code are borrowed from the Facebook's WebDriverAgent project.
Development of the Mac2Driver happens at the appium-mac2-driver repo.
Requirements and Support
In addition to Appium's general requirements:
- macOS 10.15 or later
- Xcode 12 or later should be installed
- Xcode Helper app should be enabled for Accessibility access. The app itself could be usually found at
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/Library/Xcode/Agents/Xcode Helper.app. In order to enable Accessibility access for it simply open the parent folder in Finder:
open /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/Library/Xcode/Agents/and drag & drop the
Xcode Helperapp to
Security & Privacy -> Privacy -> Accessibilitylist of your
System Preferences. This action must only be done once.
The way to start a session using the Mac2Driver is to include the
automationName capability in your new session request, with
Mac2. Of course, you must also include appropriate
Mac is supported). Read
for more details.
The list of available driver capabilities could be found in the driver README file.