我正在尝试使用 Appium 自动化 iOS 测试。我有一个应用程序需要用户位置并在首次启动时请求位置权限。当我尝试将 selenium 连接到全新安装时,出现弹出窗口时它会失败。当我手动接受弹出窗口时,Seleium 和 Appium 连接成功,并且测试能够继续。
这是服务器输出的副本:
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
和硒输出的副本:
Selenium::WebDriver::Error::NoSuchDriverError:
A session is either terminated or not started
我正在使用以下命令初始化 Selenium:
@driver = Selenium::WebDriver.for(:remote, :desired_capabilities => capabilities, :url => server_url)
任何帮助表示赞赏!