Appium Desktop 在启动 ios 模拟器后终止
Appium Desktop terminates after booting ios simulator
我正在尝试检查 WebDriverAgent 项目附带的 IntegrationApp.app 的元素。我在 xcode 的模拟器上构建了该应用程序,但是当我:
- 在我的 MAC (v10.14.6)
上打开 Appium Desktop (v1.15.1)
- 启动服务器
- Select appium右上角启动Inspector Session放大镜图标window
- 提供以下功能集:
{
"automationName": "XCUITest",
"platformName": "iOS",
"deviceName": "iPad Air (3rd generation)",
"platformVersion": "13.1",
"app": "/Users/[MAC_USER]/Desktop/IntegrationApp.app"
}
- 开始会话
模拟器启动,然后 Appium Desktop 终止,使 ios 模拟器保持打开状态,但没有安装应用程序。有没有人遇到过类似的问题?有什么想法可能导致这个问题吗?当 运行 xcrun simctl list
它列出模型。以下是 appium 日志:
[info] [35m[Appium][39m Non-default server args:
[info] [35m[Appium][39m allowInsecure: {
[info] [35m[Appium][39m }
[info] [35m[Appium][39m denyInsecure: {
[info] [35m[Appium][39m }
[info] [35m[Appium][39m Appium REST http interface listener started on 0.0.0.0:4723[info] [35m[HTTP][39m [37m-->[39m [37mPOST[39m [37m/wd/hub/session[39m
[info] [35m[HTTP][39m [90m{"desiredCapabilities":{"app":"/Users/testuser/Desktop/IntegrationApp.app","automationName":"XCUITest","deviceName":"iPad Air (3rd generation)","platformName":"iOS","platformVersion":"13.1","newCommandTimeout":0,"connectHardwareKeyboard":true}}[39m
[debug] [35m[MJSONWP][39m Calling AppiumDriver.createSession() with args: [{"app":"/Users/testuser/Desktop/IntegrationApp.app","automationName":"XCUITest","deviceName":"iPad Air (3rd generation)","platformName":"iOS","platformVersion":"13.1","newCommandTimeout":0,"connectHardwareKeyboard":true},null,null]
[debug] [35m[BaseDriver][39m Event 'newSessionRequested' logged at 1574244116561 (10:01:56 GMT+0000 (GMT))
[info] [Appium] Appium v1.15.1 creating new XCUITestDriver (v2.133.1) session
[debug] [BaseDriver] Creating session with MJSONWP desired capabilities: {
[debug] [BaseDriver] "app": "/Users/testuser/Desktop/IntegrationApp.app",
[debug] [BaseDriver] "automationName": "XCUITest",
[debug] [BaseDriver] "deviceName": "iPad Air (3rd generation)",
[debug] [BaseDriver] "platformName": "iOS",
[debug] [BaseDriver] "platformVersion": "13.1",
[debug] [BaseDriver] "newCommandTimeout": 0,
[debug] [BaseDriver] "connectHardwareKeyboard": true
[debug] [BaseDriver] }
[info] [BaseDriver] Session created with session id: ba3f0114-0bfa-4e5a-8bb8-ee1d30e62166[debug] [XCUITest] Current user: 'testuser'
[info] [HTTP] [37m-->[39m [37mGET[39m [37m/wd/hub/sessions[39m
[info] [HTTP] {}
[debug] [GENERIC] Calling AppiumDriver.getSessions() with args: []
[debug] [GENERIC] Responding to client with driver.getSessions() result: []
[info] [HTTP] <-- GET /wd/hub/sessions 200 5 ms - 40
[info] [HTTP]
[info] [XCUITest] iOS SDK Version set to '13.2'[info] [iOSSim] Constructing iOS simulator for Xcode version 11.2.1 with udid 'C360E349-1255-4D96-B146-13D1FD3ACDF5'
[info] [XCUITest] Determining device to run tests on: udid: 'C360E349-1255-4D96-B146-13D1FD3ACDF5', real device: false
[debug] [BaseDriver] Event 'xcodeDetailsRetrieved' logged at 1574244119170 (10:01:59 GMT+0000 (GMT))
[info] [BaseDriver] Using local app '/Users/testuser/Desktop/IntegrationApp.app'
[debug] [BaseDriver] Event 'appConfigured' logged at 1574244119174 (10:01:59 GMT+0000 (GMT))
[debug] [XCUITest] Checking whether app '/Users/testuser/Desktop/IntegrationApp.app' is actually present on file system
[debug] [XCUITest] App is present
[debug] [iOS] Getting bundle ID from app '/Users/testuser/Desktop/IntegrationApp.app': 'com.demo2019.IntegrationApp'
[debug] [BaseDriver] Event 'resetStarted' logged at 1574244119179 (10:01:59 GMT+0000 (GMT))[info] [XCUITest] Not scrubbing third party app in anticipation of uninstall
[debug] [BaseDriver] Event 'resetComplete' logged at 1574244119388 (10:01:59 GMT+0000 (GMT))[warn] [XCUITest] Continuing without capturing device logs: iOS Simulator with udid C360E349-1255-4D96-B146-13D1FD3ACDF5 is not running
[info] [XCUITest] Setting up simulator
[debug] [iOS] No reason to set locale
[debug] [iOS] No iOS / app preferences to set
[debug] [iOS] Setting did not need to be updated
[debug] [iOSSim] Setting preferences of C360E349-1255-4D96-B146-13D1FD3ACDF5 Simulator to {"ConnectHardwareKeyboard":true}
[debug] [iOSSim] Setting common Simulator preferences to {"RotateWindowWhenSignaledByGuest":true,"ConnectHardwareKeyboard":true}
[debug] [iOSSim] Updated C360E349-1255-4D96-B146-13D1FD3ACDF5 Simulator preferences at '/Users/testuser/Library/Preferences/com.apple.iphonesimulator.plist' with {"DevicePreferences":{"C360E349-1255-4D96-B146-13D1FD3ACDF5":{"ConnectHardwareKeyboard":true}},"RotateWindowWhenSignaledByGuest":true,"ConnectHardwareKeyboard":true}[info] [iOSSim] Booting Simulator with UDID C360E349-1255-4D96-B146-13D1FD3ACDF5...[info] [iOSSim] Starting Simulator UI with command: open -Fn /Applications/Xcode.app/Contents/Developer/Applications/Simulator.app --args -CurrentDeviceUDID C360E349-1255-4D96-B146-13D1FD3ACDF5 -ConnectHardwareKeyboard 1[info] [iOSSim] Simulator with UDID C360E349-1255-4D96-B146-13D1FD3ACDF5 booted in 16 seconds
[debug] [IDB] Connecting idb service to 'C360E349-1255-4D96-B146-13D1FD3ACDF5'
[debug] [IDB] Disconnecting idb service from 'C360E349-1255-4D96-B146-13D1FD3ACDF5'```
此问题与 idb 有关。似乎 idb 没有正常工作。您需要完全卸载 idb。
pip uninstall fb-idb
brew uninstall idb
brew uninstall idb-companion
然后确保下面的命令不会给出任何结果。
which idb
which idb-companion
现在 运行 您的代码应该可以正常工作了。
基本上我们不需要 idb 到 运行 ios simulator
我正在尝试检查 WebDriverAgent 项目附带的 IntegrationApp.app 的元素。我在 xcode 的模拟器上构建了该应用程序,但是当我:
- 在我的 MAC (v10.14.6) 上打开 Appium Desktop (v1.15.1)
- 启动服务器
- Select appium右上角启动Inspector Session放大镜图标window
- 提供以下功能集:
{
"automationName": "XCUITest",
"platformName": "iOS",
"deviceName": "iPad Air (3rd generation)",
"platformVersion": "13.1",
"app": "/Users/[MAC_USER]/Desktop/IntegrationApp.app"
}
- 开始会话
模拟器启动,然后 Appium Desktop 终止,使 ios 模拟器保持打开状态,但没有安装应用程序。有没有人遇到过类似的问题?有什么想法可能导致这个问题吗?当 运行 xcrun simctl list
它列出模型。以下是 appium 日志:
[info] [35m[Appium][39m Non-default server args:
[info] [35m[Appium][39m allowInsecure: {
[info] [35m[Appium][39m }
[info] [35m[Appium][39m denyInsecure: {
[info] [35m[Appium][39m }
[info] [35m[Appium][39m Appium REST http interface listener started on 0.0.0.0:4723[info] [35m[HTTP][39m [37m-->[39m [37mPOST[39m [37m/wd/hub/session[39m
[info] [35m[HTTP][39m [90m{"desiredCapabilities":{"app":"/Users/testuser/Desktop/IntegrationApp.app","automationName":"XCUITest","deviceName":"iPad Air (3rd generation)","platformName":"iOS","platformVersion":"13.1","newCommandTimeout":0,"connectHardwareKeyboard":true}}[39m
[debug] [35m[MJSONWP][39m Calling AppiumDriver.createSession() with args: [{"app":"/Users/testuser/Desktop/IntegrationApp.app","automationName":"XCUITest","deviceName":"iPad Air (3rd generation)","platformName":"iOS","platformVersion":"13.1","newCommandTimeout":0,"connectHardwareKeyboard":true},null,null]
[debug] [35m[BaseDriver][39m Event 'newSessionRequested' logged at 1574244116561 (10:01:56 GMT+0000 (GMT))
[info] [Appium] Appium v1.15.1 creating new XCUITestDriver (v2.133.1) session
[debug] [BaseDriver] Creating session with MJSONWP desired capabilities: {
[debug] [BaseDriver] "app": "/Users/testuser/Desktop/IntegrationApp.app",
[debug] [BaseDriver] "automationName": "XCUITest",
[debug] [BaseDriver] "deviceName": "iPad Air (3rd generation)",
[debug] [BaseDriver] "platformName": "iOS",
[debug] [BaseDriver] "platformVersion": "13.1",
[debug] [BaseDriver] "newCommandTimeout": 0,
[debug] [BaseDriver] "connectHardwareKeyboard": true
[debug] [BaseDriver] }
[info] [BaseDriver] Session created with session id: ba3f0114-0bfa-4e5a-8bb8-ee1d30e62166[debug] [XCUITest] Current user: 'testuser'
[info] [HTTP] [37m-->[39m [37mGET[39m [37m/wd/hub/sessions[39m
[info] [HTTP] {}
[debug] [GENERIC] Calling AppiumDriver.getSessions() with args: []
[debug] [GENERIC] Responding to client with driver.getSessions() result: []
[info] [HTTP] <-- GET /wd/hub/sessions 200 5 ms - 40
[info] [HTTP]
[info] [XCUITest] iOS SDK Version set to '13.2'[info] [iOSSim] Constructing iOS simulator for Xcode version 11.2.1 with udid 'C360E349-1255-4D96-B146-13D1FD3ACDF5'
[info] [XCUITest] Determining device to run tests on: udid: 'C360E349-1255-4D96-B146-13D1FD3ACDF5', real device: false
[debug] [BaseDriver] Event 'xcodeDetailsRetrieved' logged at 1574244119170 (10:01:59 GMT+0000 (GMT))
[info] [BaseDriver] Using local app '/Users/testuser/Desktop/IntegrationApp.app'
[debug] [BaseDriver] Event 'appConfigured' logged at 1574244119174 (10:01:59 GMT+0000 (GMT))
[debug] [XCUITest] Checking whether app '/Users/testuser/Desktop/IntegrationApp.app' is actually present on file system
[debug] [XCUITest] App is present
[debug] [iOS] Getting bundle ID from app '/Users/testuser/Desktop/IntegrationApp.app': 'com.demo2019.IntegrationApp'
[debug] [BaseDriver] Event 'resetStarted' logged at 1574244119179 (10:01:59 GMT+0000 (GMT))[info] [XCUITest] Not scrubbing third party app in anticipation of uninstall
[debug] [BaseDriver] Event 'resetComplete' logged at 1574244119388 (10:01:59 GMT+0000 (GMT))[warn] [XCUITest] Continuing without capturing device logs: iOS Simulator with udid C360E349-1255-4D96-B146-13D1FD3ACDF5 is not running
[info] [XCUITest] Setting up simulator
[debug] [iOS] No reason to set locale
[debug] [iOS] No iOS / app preferences to set
[debug] [iOS] Setting did not need to be updated
[debug] [iOSSim] Setting preferences of C360E349-1255-4D96-B146-13D1FD3ACDF5 Simulator to {"ConnectHardwareKeyboard":true}
[debug] [iOSSim] Setting common Simulator preferences to {"RotateWindowWhenSignaledByGuest":true,"ConnectHardwareKeyboard":true}
[debug] [iOSSim] Updated C360E349-1255-4D96-B146-13D1FD3ACDF5 Simulator preferences at '/Users/testuser/Library/Preferences/com.apple.iphonesimulator.plist' with {"DevicePreferences":{"C360E349-1255-4D96-B146-13D1FD3ACDF5":{"ConnectHardwareKeyboard":true}},"RotateWindowWhenSignaledByGuest":true,"ConnectHardwareKeyboard":true}[info] [iOSSim] Booting Simulator with UDID C360E349-1255-4D96-B146-13D1FD3ACDF5...[info] [iOSSim] Starting Simulator UI with command: open -Fn /Applications/Xcode.app/Contents/Developer/Applications/Simulator.app --args -CurrentDeviceUDID C360E349-1255-4D96-B146-13D1FD3ACDF5 -ConnectHardwareKeyboard 1[info] [iOSSim] Simulator with UDID C360E349-1255-4D96-B146-13D1FD3ACDF5 booted in 16 seconds
[debug] [IDB] Connecting idb service to 'C360E349-1255-4D96-B146-13D1FD3ACDF5'
[debug] [IDB] Disconnecting idb service from 'C360E349-1255-4D96-B146-13D1FD3ACDF5'```
此问题与 idb 有关。似乎 idb 没有正常工作。您需要完全卸载 idb。
pip uninstall fb-idb
brew uninstall idb
brew uninstall idb-companion
然后确保下面的命令不会给出任何结果。
which idb
which idb-companion
现在 运行 您的代码应该可以正常工作了。 基本上我们不需要 idb 到 运行 ios simulator