在使用appium的時候,突然彈出窗口詢問是否升級到1.10,一時手賤就點擊了。升級完成后,用appium打開模擬器以及app是沒問題的,但用python測試腳本調用,appium日志提示:
[XCUITest] Simulator udid not provided, using desired caps to create a new simulator
[simctl] Creating simulator with name 'appiumTest-iPhone 6s Plus', device type id 'iPhone 6s Plus' and runtime id 'undefined'
[simctl] Error: simctl error running 'create': Invalid runtime: undefined
原來的配置文件為:
{
"platformName": "ios",
"platformVersion": "12.1",
"deviceName": "iPhone 6 plus Simulator",
"app": "/Users/wangchangpeng/exshell/exbell_ios_1.ipa",
"automationName": "XCUITest",
"noReset": "true"
}
看日志的錯誤提示有兩點,一個是沒定義模擬器,二是沒有udid.對配置文件做了相應修改
{
"platformName": "ios",
"platformVersion": "12.1",
"deviceName": "iPhone 6s Plus",
"app": "/Users/wangchangpeng/exshell/exbell_ios_1.ipa",
"automationName": "XCUITest",
"noReset": "true",
"udid": "1B1CC2F6-3A09-4C10-B824-754D9CE964D1"
}
腳本執行通過,升級需謹慎啊!