iOS 13 safaridriver can not create safari session
I had the exact same problem when trying to start a session on a real iPad device.
After digging into the safaridriver
manual with man safaridriver
, I found out that setting safari:deviceType
in the capabilities exists, so I tried it and it works:
POST /session{ "capabilities": { "firstMatch": [ { "safari:deviceType": "iPad", // <- add this "platformName": "ios", "browserName": "Safari" } ] }}
Additional footnotes:
- I used
firstMatch
, butalwaysMatch
is expected to work too. safaridriver
will evaluate the values without case sensitivity- Tested with Safari 13.1's safaridriver and Safari Technology Preview 107's safaridriver. Works on both, though STP's error messages are more helpful.
- Also, you will need to switch on "Safari > Advanced > Web Inspector" on the iPad (this only appears after the iPad is connected to a MacOs machine) to start the session.