I am attempting to automate iOS testing with Appium. I have an app that requires user location and requests location permission on first launch. When I try to connect selenium to a fresh install, it fails when the popup appears. When I manually accept the popup, Seleium and Appium connect without fail and the test is able to continue.
This is a copy of the server output:
error: Instruments did not launch successfully, failing session
error: Failed to start an Appium session, err was: Instruments did not launch successfully--please check your app paths or bundle IDs and try again
info: Responding to client with error: {"status":6,"value":{"message":"A session is either terminated or not started","origValue":"Instruments did not launch successfully--please check your app paths or bundle IDs and try again"},"sessionId":"faccc84b-fa8e-4137-ad77-f0c79d09b045"}
POST /wd/hub/session 500 13605ms - 270
debug: - - - "POST /wd/hub/session HTTP/1.1" 500 270 "-" "Ruby"
info: Clearing out appium devices
and a copy of the selenium output:
Selenium::WebDriver::Error::NoSuchDriverError:
A session is either terminated or not started
and I am initializing Selenium with the following command:
@driver = Selenium::WebDriver.for(:remote, :desired_capabilities => capabilities, :url => server_url)
Any help is appreciated!
There has been an appium update for this. Simply add the capability to always accept these alerts to avoid failures anywhere in the app. Java example:
capabilities.setCapability("autoAcceptAlerts", true);
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With