Non-macOS Devices
The Safari driver supports automating Safari on iOS and iPadOS, on both simulators and real devices.
In addition to the standard driver configuration, iOS/iPadOS tests have further requirements:
- iOS/iPadOS must be at version 13 or later
- The
platformNamecapability must be set toiOS - If testing on simulators, Xcode and the iOS Simulator runtime must be installed
-
If testing on real devices, automation-related settings must be enabled on each device:
Settings -> Apps -> Safari -> Advanced -> Turn Web Inspector ON
Settings -> Apps -> Safari -> Advanced -> Turn Remote Automation ON
Unlike the XCUITest driver, the WebDriverAgentRunner application and all of its related configuration are not required.
A simple capability set for a new iOS/iPadOS session can then look as follows:
// This will launch Safari on the first connected real iOS device
{
"platformName": "ios",
"appium:automationName": "safari"
}
It is recommended to use Safari-specific capabilities such as
safari:useSimulator, safari:deviceName, safari:deviceUDID and others to specify the exact
test device: