• 感谢,我研究下

  • 配置
    desired_capabilities = {
                "noReset": True,
                "xcodeOrgId": "xxxxxxx",
                "bundleId": "xxxxxxx",
                "skipLogCapture": True,
                "deviceName": "iphone6s Plus",
                "wdaLocalPort": 25000,
                "webDriverAgentUrl": "http://localhost:8100",
                "waitForQuiescence": False,
                "newCommandTimeout": 43200,
                "platformVersion": "12.5",
                "automationName": "XCUITest",
                "useNewWDA": False,
                "wdaStartupRetries": 0,
                "platformName": "iOS",
                "udid": "xxxxxxx",
                "wdaConnectionTimeout": 1800000,
                "autoAcceptAlerts": True
            }
    
    appium 日志:
    [Appium] Welcome to Appium v1.21.0
    [Appium] Appium REST http interface listener started on 0.0.0.0:4723
    [debug] [HTTP] Request idempotency key: 94c0b34b-ff7f-4575-a3ba-ccba8a889a91
    [HTTP] --> POST /wd/hub/session
    [HTTP] {"capabilities":{"firstMatch":[{"appium:noReset":true,"appium:xcodeOrgId":"xxxxxx","appium:bundleId":"xxxxxx","appium:skipLogCapture":true,"appium:deviceName":"iphone6s Plus","appium:wdaLocalPort":25000,"appium:webDriverAgentUrl":"http://localhost:8100","appium:waitForQuiescence":false,"appium:newCommandTimeout":43200,"appium:platformVersion":"12.5","appium:automationName":"XCUITest","appium:useNewWDA":false,"appium:wdaStartupRetries":0,"platformName":"iOS","appium:udid":"4335249214ddbe63092a4965347f078f8833179e","appium:wdaConnectionTimeout":1800000,"appium:autoAcceptAlerts":true}]},"desiredCapabilities":{"noReset":true,"xcodeOrgId":"xxxxxx","bundleId":"xxxxxx","skipLogCapture":true,"deviceName":"iphone6s Plus","wdaLocalPort":25000,"webDriverAgentUrl":"http://localhost:8100","waitForQuiescence":false,"newCommandTimeout":43200,"platformVersion":"12.5","automationName":"XCUITest","useNewWDA":false,"wdaStartupRetries":0,"platformName":"iOS","udid":"4335249214ddbe...
    [debug] [W3C] Calling AppiumDriver.createSession() with args: [{"noReset":true,"xcodeOrgId":"xxxxxx","bundleId":"xxxxxx","skipLogCapture":true,"deviceName":"iphone6s Plus","wdaLocalPort":25000,"webDriverAgentUrl":"http://localhost:8100","waitForQuiescence":false,"newCommandTimeout":43200,"platformVersion":"12.5","automationName":"XCUITest","useNewWDA":false,"wdaStartupRetries":0,"platformName":"iOS","udid":"4335249214ddbe63092a4965347f078f8833179e","wdaConnectionTimeout":1800000,"autoAcceptAlerts":true},null,{"firstMatch":[{"appium:noReset":true,"appium:xcodeOrgId":"xxxxxx","appium:bundleId":"xxxxxx","appium:skipLogCapture":true,"appium:deviceName":"iphone6s Plus","appium:wdaLocalPort":25000,"appium:webDriverAgentUrl":"http://localhost:8100","appium:waitForQuiescence":false,"appium:newCommandTimeout":43200,"appium:platformVersion":"12.5","appium:automationName":"XCUITest","appium:useNewWDA":false,"appium:wdaStartupRetries":0,"platformName":"iOS","appium:udid":"4335249214ddbe63092a4965347f078f8833179e","appium:wdaConnectio...
    [debug] [BaseDriver] Event 'newSessionRequested' logged at 1624443626123 (18:20:26 GMT+0800 (中国标准时间))
    [Appium] Appium v1.21.0 creating new XCUITestDriver (v3.43.0) session
    [debug] [BaseDriver] W3C capabilities and MJSONWP desired capabilities were provided
    [debug] [BaseDriver] Creating session with W3C capabilities: {
    [debug] [BaseDriver]   "alwaysMatch": {
    [debug] [BaseDriver]     "platformName": "iOS",
    [debug] [BaseDriver]     "appium:noReset": true,
    [debug] [BaseDriver]     "appium:xcodeOrgId": "xxxxxx",
    [debug] [BaseDriver]     "appium:bundleId": "xxxxxx",
    [debug] [BaseDriver]     "appium:skipLogCapture": true,
    [debug] [BaseDriver]     "appium:deviceName": "iphone6s Plus",
    [debug] [BaseDriver]     "appium:wdaLocalPort": 25000,
    [debug] [BaseDriver]     "appium:webDriverAgentUrl": "http://localhost:8100",
    [debug] [BaseDriver]     "appium:waitForQuiescence": false,
    [debug] [BaseDriver]     "appium:newCommandTimeout": 43200,
    [debug] [BaseDriver]     "appium:platformVersion": "12.5",
    [debug] [BaseDriver]     "appium:automationName": "XCUITest",
    [debug] [BaseDriver]     "appium:useNewWDA": false,
    [debug] [BaseDriver]     "appium:wdaStartupRetries": 0,
    [debug] [BaseDriver]     "appium:udid": "4335249214ddbe63092a4965347f078f8833179e",
    [debug] [BaseDriver]     "appium:wdaConnectionTimeout": 1800000,
    [debug] [BaseDriver]     "appium:autoAcceptAlerts": true
    [debug] [BaseDriver]   },
    [debug] [BaseDriver]   "firstMatch": [
    [debug] [BaseDriver]     {}
    [debug] [BaseDriver]   ]
    [debug] [BaseDriver] }
    [BaseDriver] Session created with session id: 8e832c96-7bc2-40e2-be6e-8251511b004b
    [debug] [XCUITest] Current user: 'xxxxxx\xxxxxx'
    [debug] [XCUITest] Available devices: 4335249214ddbe63092a4965347f078f8833179e
    [debug] [XCUITest] Creating iDevice object with udid '4335249214ddbe63092a4965347f078f8833179e'
    [XCUITest] Determining device to run tests on: udid: '4335249214ddbe63092a4965347f078f8833179e', real device: true
    [debug] [BaseDriver] Event 'xcodeDetailsRetrieved' logged at 1624443628129 (18:20:28 GMT+0800 (中国标准时间))
    [debug] [BaseDriver] Event 'appConfigured' logged at 1624443628130 (18:20:28 GMT+0800 (中国标准时间))
    [debug] [BaseDriver] Event 'resetStarted' logged at 1624443628130 (18:20:28 GMT+0800 (中国标准时间))
    [debug] [XCUITest] Reset: fullReset not set. Leaving as is
    [debug] [BaseDriver] Event 'resetComplete' logged at 1624443628131 (18:20:28 GMT+0800 (中国标准时间))
    [WebDriverAgent] Using WDA path: 'C:\Users\xxxxxx\AppData\Roaming\npm\node_modules\appium\node_modules\appium-webdriveragent'
    [WebDriverAgent] Using WDA agent: 'C:\Users\xxxxxx\AppData\Roaming\npm\node_modules\appium\node_modules\appium-webdriveragent\WebDriverAgent.xcodeproj'
    [XCUITest] 'skipLogCapture' is set. Skipping starting logs such as crash, system, safari console and safari network.
    [XCUITest] Setting up real device
    [WebDriverAgent] Cannot retrieve WDA build settings. Original error: spawn xcodebuild ENOENT
    [DevCon Factory] Requesting connection for device 4335249214ddbe63092a4965347f078f8833179e on local port 8100
    [debug] [DevCon Factory] Cached connections count: 0
    [DevCon Factory] Successfully requested the connection for 4335249214ddbe63092a4965347f078f8833179e:8100
    [debug] [XCUITest] Starting WebDriverAgent initialization with the synchronization key 'XCUITestDriver'
    [debug] [XCUITest] Trying to start WebDriverAgent 1 times with 10000ms interval
    [debug] [BaseDriver] Event 'wdaStartAttempted' logged at 1624443628377 (18:20:28 GMT+0800 (中国标准时间))
    [WebDriverAgent] Using provided WebdriverAgent at 'http://localhost:8100'
    [debug] [WD Proxy] Matched '/status' to command name 'getStatus'
    [debug] [WD Proxy] Proxying [GET /status] to [GET http://localhost:8100/status] with no body
    [debug] [WD Proxy] Got response with status 200: {"value":{"state":"success","os":{"name":"iOS","version":"12.5.2"},"ios":{"simulatorVersion":"12.5.2","ip":"192.168.1.55"},"build":{"time":"Jun  7 2021 09:31:00"}},"sessionId":"A264BFB8-9EA0-416E-8E13-AC4F08BF37C2","status":0}
    [debug] [BaseDriver] Event 'wdaSessionAttempted' logged at 1624443628425 (18:20:28 GMT+0800 (中国标准时间))
    [debug] [XCUITest] Sending createSession command to WDA
    [debug] [WD Proxy] Matched '/session' to command name 'createSession'
    [debug] [WD Proxy] Proxying [POST /session] to [POST http://localhost:8100/session] with body: {"capabilities":{"firstMatch":[{"bundleId":"xxxxxx","arguments":[],"environment":{},"eventloopIdleDelaySec":0,"shouldWaitForQuiescence":false,"shouldUseTestManagerForVisibilityDetection":false,"maxTypingFrequency":60,"shouldUseSingletonTestManager":true,"shouldTerminateApp":true,"defaultAlertAction":"accept"}],"alwaysMatch":{}}}
    [debug] [WD Proxy] Got response with status 200: {"value":"'bundleId' desired capability not provided","sessionId":"A264BFB8-9EA0-416E-8E13-AC4F08BF37C2","status":13}
    [WD Proxy] Determined the downstream protocol as 'MJSONWP'
    [debug] [MJSONWP] Matched JSONWP error code 13 to UnknownError
    [debug] [XCUITest] Failed to create WDA session (An unknown server-side error occurred while processing the command. Original error: 'bundleId' desired capability not provided). Retrying...
    [debug] [BaseDriver] Event 'wdaSessionAttempted' logged at 1624443629496 (18:20:29 GMT+0800 (中国标准时间))
    [debug] [XCUITest] Sending createSession command to WDA
    [debug] [WD Proxy] Matched '/session' to command name 'createSession'
    [debug] [WD Proxy] Proxying [POST /session] to [POST http://localhost:8100/session] with body: {"capabilities":{"firstMatch":[{"bundleId":"xxxxxx","arguments":[],"environment":{},"eventloopIdleDelaySec":0,"shouldWaitForQuiescence":false,"shouldUseTestManagerForVisibilityDetection":false,"maxTypingFrequency":60,"shouldUseSingletonTestManager":true,"shouldTerminateApp":true,"defaultAlertAction":"accept"}],"alwaysMatch":{}}}
    [debug] [WD Proxy] Got response with status 200: {"value":"'bundleId' desired capability not provided","sessionId":"A264BFB8-9EA0-416E-8E13-AC4F08BF37C2","status":13}
    [WD Proxy] Determined the downstream protocol as 'MJSONWP'
    [debug] [MJSONWP] Matched JSONWP error code 13 to UnknownError
    [debug] [XCUITest] Failed to create WDA session (An unknown server-side error occurred while processing the command. Original error: 'bundleId' desired capability not provided). Retrying...
    [debug] [BaseDriver] Event 'wdaSessionAttempted' logged at 1624443630536 (18:20:30 GMT+0800 (中国标准时间))
    [debug] [XCUITest] Sending createSession command to WDA
    [debug] [WD Proxy] Matched '/session' to command name 'createSession'
    [debug] [WD Proxy] Proxying [POST /session] to [POST http://localhost:8100/session] with body: {"capabilities":{"firstMatch":[{"bundleId":"xxxxxx","arguments":[],"environment":{},"eventloopIdleDelaySec":0,"shouldWaitForQuiescence":false,"shouldUseTestManagerForVisibilityDetection":false,"maxTypingFrequency":60,"shouldUseSingletonTestManager":true,"shouldTerminateApp":true,"defaultAlertAction":"accept"}],"alwaysMatch":{}}}
    [debug] [WD Proxy] Got response with status 200: {"value":"'bundleId' desired capability not provided","sessionId":"A264BFB8-9EA0-416E-8E13-AC4F08BF37C2","status":13}
    [WD Proxy] Determined the downstream protocol as 'MJSONWP'
    [debug] [MJSONWP] Matched JSONWP error code 13 to UnknownError
    [debug] [XCUITest] Failed to create WDA session (An unknown server-side error occurred while processing the command. Original error: 'bundleId' desired capability not provided). Retrying...
    [debug] [BaseDriver] Event 'wdaSessionAttempted' logged at 1624443631567 (18:20:31 GMT+0800 (中国标准时间))
    [debug] [XCUITest] Sending createSession command to WDA
    [debug] [WD Proxy] Matched '/session' to command name 'createSession'
    [debug] [WD Proxy] Proxying [POST /session] to [POST http://localhost:8100/session] with body: {"capabilities":{"firstMatch":[{"bundleId":"xxxxxx","arguments":[],"environment":{},"eventloopIdleDelaySec":0,"shouldWaitForQuiescence":false,"shouldUseTestManagerForVisibilityDetection":false,"maxTypingFrequency":60,"shouldUseSingletonTestManager":true,"shouldTerminateApp":true,"defaultAlertAction":"accept"}],"alwaysMatch":{}}}
    [debug] [WD Proxy] Got response with status 200: {"value":"'bundleId' desired capability not provided","sessionId":"A264BFB8-9EA0-416E-8E13-AC4F08BF37C2","status":13}
    [WD Proxy] Determined the downstream protocol as 'MJSONWP'
    [debug] [MJSONWP] Matched JSONWP error code 13 to UnknownError
    [debug] [XCUITest] Failed to create WDA session (An unknown server-side error occurred while processing the command. Original error: 'bundleId' desired capability not provided). Retrying...
    [debug] [BaseDriver] Event 'wdaSessionAttempted' logged at 1624443632598 (18:20:32 GMT+0800 (中国标准时间))
    [debug] [XCUITest] Sending createSession command to WDA
    [debug] [WD Proxy] Matched '/session' to command name 'createSession'
    [debug] [WD Proxy] Proxying [POST /session] to [POST http://localhost:8100/session] with body: {"capabilities":{"firstMatch":[{"bundleId":"xxxxxx","arguments":[],"environment":{},"eventloopIdleDelaySec":0,"shouldWaitForQuiescence":false,"shouldUseTestManagerForVisibilityDetection":false,"maxTypingFrequency":60,"shouldUseSingletonTestManager":true,"shouldTerminateApp":true,"defaultAlertAction":"accept"}],"alwaysMatch":{}}}
    [debug] [WD Proxy] Got response with status 200: {"value":"'bundleId' desired capability not provided","sessionId":"A264BFB8-9EA0-416E-8E13-AC4F08BF37C2","status":13}
    [WD Proxy] Determined the downstream protocol as 'MJSONWP'
    [debug] [MJSONWP] Matched JSONWP error code 13 to UnknownError
    [debug] [XCUITest] Failed to create WDA session (An unknown server-side error occurred while processing the command. Original error: 'bundleId' desired capability not provided). Retrying...
    [debug] [BaseDriver] Event 'wdaSessionAttempted' logged at 1624443633627 (18:20:33 GMT+0800 (中国标准时间))
    [debug] [XCUITest] Sending createSession command to WDA
    [debug] [WD Proxy] Matched '/session' to command name 'createSession'
    [debug] [WD Proxy] Proxying [POST /session] to [POST http://localhost:8100/session] with body: {"capabilities":{"firstMatch":[{"bundleId":"xxxxxx","arguments":[],"environment":{},"eventloopIdleDelaySec":0,"shouldWaitForQuiescence":false,"shouldUseTestManagerForVisibilityDetection":false,"maxTypingFrequency":60,"shouldUseSingletonTestManager":true,"shouldTerminateApp":true,"defaultAlertAction":"accept"}],"alwaysMatch":{}}}
    [debug] [WD Proxy] Got response with status 200: {"value":"'bundleId' desired capability not provided","sessionId":"A264BFB8-9EA0-416E-8E13-AC4F08BF37C2","status":13}
    [WD Proxy] Determined the downstream protocol as 'MJSONWP'
    [debug] [MJSONWP] Matched JSONWP error code 13 to UnknownError
    [debug] [XCUITest] Failed to create WDA session (An unknown server-side error occurred while processing the command. Original error: 'bundleId' desired capability not provided). Retrying...
    [debug] [BaseDriver] Event 'wdaSessionAttempted' logged at 1624443634655 (18:20:34 GMT+0800 (中国标准时间))
    [debug] [XCUITest] Sending createSession command to WDA
    [debug] [WD Proxy] Matched '/session' to command name 'createSession'
    [debug] [WD Proxy] Proxying [POST /session] to [POST http://localhost:8100/session] with body: {"capabilities":{"firstMatch":[{"bundleId":"xxxxxx","arguments":[],"environment":{},"eventloopIdleDelaySec":0,"shouldWaitForQuiescence":false,"shouldUseTestManagerForVisibilityDetection":false,"maxTypingFrequency":60,"shouldUseSingletonTestManager":true,"shouldTerminateApp":true,"defaultAlertAction":"accept"}],"alwaysMatch":{}}}
    [debug] [WD Proxy] Got response with status 200: {"value":"'bundleId' desired capability not provided","sessionId":"A264BFB8-9EA0-416E-8E13-AC4F08BF37C2","status":13}
    [WD Proxy] Determined the downstream protocol as 'MJSONWP'
    [debug] [MJSONWP] Matched JSONWP error code 13 to UnknownError
    [debug] [XCUITest] Failed to create WDA session (An unknown server-side error occurred while processing the command. Original error: 'bundleId' desired capability not provided). Retrying...
    [debug] [BaseDriver] Event 'wdaSessionAttempted' logged at 1624443635683 (18:20:35 GMT+0800 (中国标准时间))
    [debug] [XCUITest] Sending createSession command to WDA
    [debug] [WD Proxy] Matched '/session' to command name 'createSession'
    [debug] [WD Proxy] Proxying [POST /session] to [POST http://localhost:8100/session] with body: {"capabilities":{"firstMatch":[{"bundleId":"xxxxxx","arguments":[],"environment":{},"eventloopIdleDelaySec":0,"shouldWaitForQuiescence":false,"shouldUseTestManagerForVisibilityDetection":false,"maxTypingFrequency":60,"shouldUseSingletonTestManager":true,"shouldTerminateApp":true,"defaultAlertAction":"accept"}],"alwaysMatch":{}}}
    [debug] [WD Proxy] Got response with status 200: {"value":"'bundleId' desired capability not provided","sessionId":"A264BFB8-9EA0-416E-8E13-AC4F08BF37C2","status":13}
    [WD Proxy] Determined the downstream protocol as 'MJSONWP'
    [debug] [MJSONWP] Matched JSONWP error code 13 to UnknownError
    [debug] [XCUITest] Failed to create WDA session (An unknown server-side error occurred while processing the command. Original error: 'bundleId' desired capability not provided). Retrying...
    [debug] [BaseDriver] Event 'wdaSessionAttempted' logged at 1624443636709 (18:20:36 GMT+0800 (中国标准时间))
    [debug] [XCUITest] Sending createSession command to WDA
    [debug] [WD Proxy] Matched '/session' to command name 'createSession'
    [debug] [WD Proxy] Proxying [POST /session] to [POST http://localhost:8100/session] with body: {"capabilities":{"firstMatch":[{"bundleId":"xxxxxx","arguments":[],"environment":{},"eventloopIdleDelaySec":0,"shouldWaitForQuiescence":false,"shouldUseTestManagerForVisibilityDetection":false,"maxTypingFrequency":60,"shouldUseSingletonTestManager":true,"shouldTerminateApp":true,"defaultAlertAction":"accept"}],"alwaysMatch":{}}}
    [debug] [WD Proxy] Got response with status 200: {"value":"'bundleId' desired capability not provided","sessionId":"A264BFB8-9EA0-416E-8E13-AC4F08BF37C2","status":13}
    [WD Proxy] Determined the downstream protocol as 'MJSONWP'
    [debug] [MJSONWP] Matched JSONWP error code 13 to UnknownError
    [debug] [XCUITest] Failed to create WDA session (An unknown server-side error occurred while processing the command. Original error: 'bundleId' desired capability not provided). Retrying...
    [debug] [BaseDriver] Event 'wdaSessionAttempted' logged at 1624443637747 (18:20:37 GMT+0800 (中国标准时间))
    [debug] [XCUITest] Sending createSession command to WDA
    [debug] [WD Proxy] Matched '/session' to command name 'createSession'
    [debug] [WD Proxy] Proxying [POST /session] to [POST http://localhost:8100/session] with body: {"capabilities":{"firstMatch":[{"bundleId":"xxxxxx","arguments":[],"environment":{},"eventloopIdleDelaySec":0,"shouldWaitForQuiescence":false,"shouldUseTestManagerForVisibilityDetection":false,"maxTypingFrequency":60,"shouldUseSingletonTestManager":true,"shouldTerminateApp":true,"defaultAlertAction":"accept"}],"alwaysMatch":{}}}
    [debug] [WD Proxy] Got response with status 200: {"value":"'bundleId' desired capability not provided","sessionId":"A264BFB8-9EA0-416E-8E13-AC4F08BF37C2","status":13}
    [WD Proxy] Determined the downstream protocol as 'MJSONWP'
    [debug] [MJSONWP] Matched JSONWP error code 13 to UnknownError
    [debug] [XCUITest] Failed to create WDA session (An unknown server-side error occurred while processing the command. Original error: 'bundleId' desired capability not provided). Retrying...
    [debug] [BaseDriver] Event 'wdaSessionAttempted' logged at 1624443638788 (18:20:38 GMT+0800 (中国标准时间))
    [debug] [XCUITest] Sending createSession command to WDA
    [debug] [WD Proxy] Matched '/session' to command name 'createSession'
    [debug] [WD Proxy] Proxying [POST /session] to [POST http://localhost:8100/session] with body: {"capabilities":{"firstMatch":[{"bundleId":"xxxxxx","arguments":[],"environment":{},"eventloopIdleDelaySec":0,"shouldWaitForQuiescence":false,"shouldUseTestManagerForVisibilityDetection":false,"maxTypingFrequency":60,"shouldUseSingletonTestManager":true,"shouldTerminateApp":true,"defaultAlertAction":"accept"}],"alwaysMatch":{}}}
    [debug] [WD Proxy] Got response with status 200: {"value":"'bundleId' desired capability not provided","sessionId":"A264BFB8-9EA0-416E-8E13-AC4F08BF37C2","status":13}
    [WD Proxy] Determined the downstream protocol as 'MJSONWP'
    [debug] [MJSONWP] Matched JSONWP error code 13 to UnknownError
    [debug] [XCUITest] Failed to create WDA session (An unknown server-side error occurred while processing the command. Original error: 'bundleId' desired capability not provided). Retrying...
    [debug] [BaseDriver] Event 'wdaSessionAttempted' logged at 1624443639835 (18:20:39 GMT+0800 (中国标准时间))
    [debug] [XCUITest] Sending createSession command to WDA
    [debug] [WD Proxy] Matched '/session' to command name 'createSession'
    [debug] [WD Proxy] Proxying [POST /session] to [POST http://localhost:8100/session] with body: {"capabilities":{"firstMatch":[{"bundleId":"xxxxxx","arguments":[],"environment":{},"eventloopIdleDelaySec":0,"shouldWaitForQuiescence":false,"shouldUseTestManagerForVisibilityDetection":false,"maxTypingFrequency":60,"shouldUseSingletonTestManager":true,"shouldTerminateApp":true,"defaultAlertAction":"accept"}],"alwaysMatch":{}}}
    [debug] [WD Proxy] Got response with status 200: {"value":"'bundleId' desired capability not provided","sessionId":"A264BFB8-9EA0-416E-8E13-AC4F08BF37C2","status":13}
    [WD Proxy] Determined the downstream protocol as 'MJSONWP'
    [debug] [MJSONWP] Matched JSONWP error code 13 to UnknownError
    [debug] [XCUITest] Failed to create WDA session (An unknown server-side error occurred while processing the command. Original error: 'bundleId' desired capability not provided). Retrying...
    [debug] [BaseDriver] Event 'wdaSessionAttempted' logged at 1624443640872 (18:20:40 GMT+0800 (中国标准时间))
    [debug] [XCUITest] Sending createSession command to WDA
    [debug] [WD Proxy] Matched '/session' to command name 'createSession'
    [debug] [WD Proxy] Proxying [POST /session] to [POST http://localhost:8100/session] with body: {"capabilities":{"firstMatch":[{"bundleId":"xxxxxx","arguments":[],"environment":{},"eventloopIdleDelaySec":0,"shouldWaitForQuiescence":false,"shouldUseTestManagerForVisibilityDetection":false,"maxTypingFrequency":60,"shouldUseSingletonTestManager":true,"shouldTerminateApp":true,"defaultAlertAction":"accept"}],"alwaysMatch":{}}}
    [debug] [WD Proxy] Got response with status 200: {"value":"'bundleId' desired capability not provided","sessionId":"A264BFB8-9EA0-416E-8E13-AC4F08BF37C2","status":13}
    [WD Proxy] Determined the downstream protocol as 'MJSONWP'
    [debug] [MJSONWP] Matched JSONWP error code 13 to UnknownError
    [debug] [XCUITest] Failed to create WDA session (An unknown server-side error occurred while processing the command. Original error: 'bundleId' desired capability not provided). Retrying...
    [debug] [BaseDriver] Event 'wdaSessionAttempted' logged at 1624443657103 (18:20:57 GMT+0800 (中国标准时间))
    [debug] [XCUITest] Sending createSession command to WDA
    [debug] [WD Proxy] Matched '/session' to command name 'createSession'
    [debug] [WD Proxy] Proxying [POST /session] to [POST http://localhost:8100/session] with body: {"capabilities":{"firstMatch":[{"bundleId":"xxxxxx","arguments":[],"environment":{},"eventloopIdleDelaySec":0,"shouldWaitForQuiescence":false,"shouldUseTestManagerForVisibilityDetection":false,"maxTypingFrequency":60,"shouldUseSingletonTestManager":true,"shouldTerminateApp":true,"defaultAlertAction":"accept"}],"alwaysMatch":{}}}
    [debug] [WD Proxy] Got response with status 200: {"value":"'bundleId' desired capability not provided","sessionId":"A264BFB8-9EA0-416E-8E13-AC4F08BF37C2","status":13}
    [WD Proxy] Determined the downstream protocol as 'MJSONWP'
    [debug] [MJSONWP] Matched JSONWP error code 13 to UnknownError
    [debug] [XCUITest] Failed to create WDA session (An unknown server-side error occurred while processing the command. Original error: 'bundleId' desired capability not provided). Retrying...
    [debug] [BaseDriver] Event 'wdaSessionAttempted' logged at 1624443658130 (18:20:58 GMT+0800 (中国标准时间))
    [debug] [XCUITest] Sending createSession command to WDA
    [debug] [WD Proxy] Matched '/session' to command name 'createSession'
    [debug] [WD Proxy] Proxying [POST /session] to [POST http://localhost:8100/session] with body: {"capabilities":{"firstMatch":[{"bundleId":"xxxxxx","arguments":[],"environment":{},"eventloopIdleDelaySec":0,"shouldWaitForQuiescence":false,"shouldUseTestManagerForVisibilityDetection":false,"maxTypingFrequency":60,"shouldUseSingletonTestManager":true,"shouldTerminateApp":true,"defaultAlertAction":"accept"}],"alwaysMatch":{}}}
    [debug] [WD Proxy] Got response with status 200: {"value":"'bundleId' desired capability not provided","sessionId":"A264BFB8-9EA0-416E-8E13-AC4F08BF37C2","status":13}
    [WD Proxy] Determined the downstream protocol as 'MJSONWP'
    [debug] [MJSONWP] Matched JSONWP error code 13 to UnknownError
    [debug] [XCUITest] Failed to create WDA session (An unknown server-side error occurred while processing the command. Original error: 'bundleId' desired capability not provided). Retrying...
    [debug] [XCUITest] UnknownError: An unknown server-side error occurred while processing the command. Original error: 'bundleId' desired capability not provided
    [debug] [XCUITest]     at errorFromMJSONWPStatusCode (C:\Users\xxxxxx\AppData\Roaming\npm\node_modules\appium\node_modules\appium-base-driver\lib\protocol\errors.js:767:10)
    [debug] [XCUITest]     at ProxyRequestError.getActualError (C:\Users\xxxxxx\AppData\Roaming\npm\node_modules\appium\node_modules\appium-base-driver\lib\protocol\errors.js:661:14)
    [debug] [XCUITest]     at JWProxy.command (C:\Users\xxxxxx\AppData\Roaming\npm\node_modules\appium\node_modules\appium-base-driver\lib\jsonwp-proxy\proxy.js:272:19)
    [debug] [XCUITest]     at processTicksAndRejections (internal/process/task_queues.js:93:5)
    [debug] [XCUITest]     at XCUITestDriver.proxyCommand (C:\Users\xxxxxx\AppData\Roaming\npm\node_modules\appium\node_modules\appium-xcuitest-driver\lib\commands\proxy-helper.js:96:12)
    [debug] [XCUITest]     at XCUITestDriver.startWdaSession (C:\Users\xxxxxx\AppData\Roaming\npm\node_modules\appium\node_modules\appium-xcuitest-driver\lib\driver.js:968:5)
    [debug] [XCUITest]     at C:\Users\xxxxxx\AppData\Roaming\npm\node_modules\appium\node_modules\appium-xcuitest-driver\lib\driver.js:592:15
    [debug] [XCUITest]     at wrapped (C:\Users\xxxxxx\AppData\Roaming\npm\node_modules\appium\node_modules\asyncbox\lib\asyncbox.js:60:13)
    [debug] [XCUITest]     at retry (C:\Users\xxxxxx\AppData\Roaming\npm\node_modules\appium\node_modules\asyncbox\lib\asyncbox.js:43:13)
    [debug] [XCUITest]     at retryInterval (C:\Users\xxxxxx\AppData\Roaming\npm\node_modules\appium\node_modules\asyncbox\lib\asyncbox.js:70:10)
    [debug] [XCUITest]     at C:\Users\xxxxxx\AppData\Roaming\npm\node_modules\appium\node_modules\appium-xcuitest-driver\lib\driver.js:587:11
    [debug] [XCUITest]     at wrapped (C:\Users\xxxxxx\AppData\Roaming\npm\node_modules\appium\node_modules\asyncbox\lib\asyncbox.js:60:13)
    [debug] [XCUITest]     at retry (C:\Users\xxxxxx\AppData\Roaming\npm\node_modules\appium\node_modules\asyncbox\lib\asyncbox.js:43:13)
    [debug] [XCUITest]     at retryInterval (C:\Users\xxxxxx\AppData\Roaming\npm\node_modules\appium\node_modules\asyncbox\lib\asyncbox.js:70:10)
    [debug] [XCUITest]     at C:\Users\xxxxxx\AppData\Roaming\npm\node_modules\appium\node_modules\appium-xcuitest-driver\lib\driver.js:559:7
    [debug] [XCUITest] Unable to start WebDriverAgent session because of xcodebuild failure: An unknown server-side error occurred while processing the command. Original error: 'bundleId' desired capability not provided Make sure you follow the tutorial at https://github.com/appium/appium-xcuitest-driver/blob/master/docs/real-device-config.md. Try to remove the WebDriverAgentRunner application from the device if it is installed and reboot the device.
    [debug] [XCUITest] Not quitting/uninstalling WebDriverAgent since webDriverAgentUrl capability is provided
    [XCUITest] {}
    [DevCon Factory] Releasing connections for 4335249214ddbe63092a4965347f078f8833179e device on any port number
    [DevCon Factory] Found cached connections to release: ["4335249214ddbe63092a4965347f078f8833179e:8100"]
    [debug] [DevCon Factory] Cached connections count: 0
    [debug] [BaseDriver] Event 'newSessionStarted' logged at 1624443658170 (18:20:58 GMT+0800 (中国标准时间))
    [debug] [W3C] Encountered internal error running command: Error: Unable to start WebDriverAgent session because of xcodebuild failure: An unknown server-side error occurred while processing the command. Original error: 'bundleId' desired capability not provided Make sure you follow the tutorial at https://github.com/appium/appium-xcuitest-driver/blob/master/docs/real-device-config.md. Try to remove the WebDriverAgentRunner application from the device if it is installed and reboot the device.
    [debug] [W3C]     at quitAndUninstall (C:\Users\xxxxxx\AppData\Roaming\npm\node_modules\appium\node_modules\appium-xcuitest-driver\lib\driver.js:539:17)
    [debug] [W3C]     at C:\Users\xxxxxx\AppData\Roaming\npm\node_modules\appium\node_modules\appium-xcuitest-driver\lib\driver.js:610:17
    [debug] [W3C]     at processTicksAndRejections (internal/process/task_queues.js:93:5)
    [debug] [W3C]     at wrapped (C:\Users\xxxxxx\AppData\Roaming\npm\node_modules\appium\node_modules\asyncbox\lib\asyncbox.js:60:13)
    [debug] [W3C]     at retry (C:\Users\xxxxxx\AppData\Roaming\npm\node_modules\appium\node_modules\asyncbox\lib\asyncbox.js:43:13)
    [debug] [W3C]     at retryInterval (C:\Users\xxxxxx\AppData\Roaming\npm\node_modules\appium\node_modules\asyncbox\lib\asyncbox.js:70:10)
    [debug] [W3C]     at C:\Users\xxxxxx\AppData\Roaming\npm\node_modules\appium\node_modules\appium-xcuitest-driver\lib\driver.js:559:7
    [HTTP] <-- POST /wd/hub/session 500 32061 ms - 1437
    [HTTP]
    
  • @chenhengjie123 改为你说的那样子还是不行, 报的是同样错误。

    desired_capabilities = {
        "udid": "4335249214ddbe63092a4965347f078f8833179e",
        "automationName": "XCUITest",
        "deviceName": "iphone6s Plus",
        "platformName": "iOS",
        "platformVersion": "12.5.2",
        "bundleId": "xxxxxx",
        "webDriverAgentUrl": "http://localhost:8100/",
        "usePrebuiltWDA": False,
        "useNewWDA": False,
        "useXctestrunFile": False,
        "skipLogCapture": True,
        "noReset": True,
        "xcodeOrgId": "xxxxxx",
        "xcodeSigningId": "iPhone Developer"
    }
    

    如果用 facebook-wda 直接调用是没问题的。

  • 感谢,我试试

  • Win 下成功 Appium+iOS 自动化 at 2021年06月15日

    大家好,咨询个问题,windows 下面执行 tidevice+appium 报如下错误,各位大佬麻烦帮忙解决下:

    环境

    1. window10 系统
    2. appium_desktop V1.21.0 版本

    appium server 的日志

    [debug] [35m[XCUITest][39m UnknownError: An unknown server-side error occurred while processing the command. Original error: 'bundleId' desired capability not provided
    [debug] [35m[XCUITest][39m     at errorFromMJSONWPStatusCode (C:\Program Files\Appium\resources\app\node_modules\appium\node_modules\appium-base-driver\lib\protocol\errors.js:767:10)
    [debug] [35m[XCUITest][39m     at ProxyRequestError.getActualError (C:\Program Files\Appium\resources\app\node_modules\appium\node_modules\appium-base-driver\lib\protocol\errors.js:661:14)
    [debug] [35m[XCUITest][39m     at JWProxy.command (C:\Program Files\Appium\resources\app\node_modules\appium\node_modules\appium-base-driver\lib\jsonwp-proxy\proxy.js:272:19)
    [debug] [35m[XCUITest][39m     at processTicksAndRejections (internal/process/task_queues.js:85:5)
    [debug] [35m[XCUITest][39m Unable to start WebDriverAgent session because of xcodebuild failure: An unknown server-side error occurred while processing the command. Original error: 'bundleId' desired capability not provided Make sure you follow the tutorial at https://github.com/appium/appium-xcuitest-driver/blob/master/docs/real-device-config.md. Try to remove the WebDriverAgentRunner application from the device if it is installed and reboot the device.
    
  • 邀请码功能全面开放! at 2021年06月12日

  • 邀请码功能全面开放! at 2021年06月11日

    app 端不能绑定微信吗? 貌似没找到绑定的位置

  • 好的,谢谢

  • 请问有用 facebook-wda 操作过 webiew 吗?

  • 现象再复述一下:
    对应 chromedriver 驱动,开启 chrome 远程端口,发现会拉起本地 Chrome 浏览器(部分机型会出现该问题)

    经过测试,如下:

    1. 使用小米 CC9,webview 版本 83,会出现该问题
    2. 使用华为手机,自带的 webview,会出现该问题
    3. 使用小米 6,webview 版本 74,不会出现问题
    4. 使用三星 s8,webview 版本 73,不会出现该问题

    总结:
    不管什么手机的 webview,直接用 72 版本的 chromedriver 驱动(这个驱动版本稳定)就可以用,已经在以上 4 部手机实践过,没问题。

  • 好的,谢谢回复,我看下

  • 谢谢,忘记去搜索了😀

  • 很赞,我也是厦门这边的测试😀 😀

  • 您好,有没有 QQ 或者 QQ 群之类,可以发下吗?

  • 您好,电子书的网盘已经失效了,能否在上传一次

  • 好的,谢谢

  • 您好,

    1. 我是测试 APP 里面的 webview 页面
    2. 我用 appium 操作 webview(就如您所说的 context),是没问题的
    3. 现在用上述的代码,我在小米及 Honor 是可以跑成功的,但是华为跟 vivo 就不行
    4. 我是参考这篇文章的,ATX ATX-uiautomator2 app 原生 + webview 的实际操作记录 (安卓) https://testerhome.com/topics/15998
    5. 按照您的意思是在 lunch_driver 时就应该传入配置信息吗?
  • 您好,我用的是 uiautomator2 框架, Appium 没问题😁

  • @codeskyblue , 不好意思,重新发一下代码

    这个是 ChromeDriver 类文件,跟您写的应该是一样的

    from __future__ import absolute_import
    
    import atexit
    import six
    import os
    import time
    import platform
    import psutil as pt
    from selenium import webdriver
    
    if six.PY3:
        import subprocess
        from urllib.error import URLError
    else:
        from urllib3 import URLError
        import subprocess32 as subprocess
    
    
    class ChromeDriver(object):
        def __init__(self, u2, log, common, phone_name, port=9527):
            self._u2 = u2
            self._port = port
            self.log = log
            self.common = common
            self.phone_name = phone_name
    
        def _launch_webdriver(self):
            self.log.info("start chromedriver instance")
            chrome_driver_path = self.common.select_chromedriver(self.phone_name)
            p = subprocess.Popen([chrome_driver_path, '--port=' + str(self._port)])
            try:
                p.wait(timeout=2.0)
                return False
            except subprocess.TimeoutExpired:
                return True
    
        def driver(self, device_ip=None, package=None, attach=True, activity=None, process=None):
            """
            Args:
                - package(string): default current running app
                - attach(bool): default true, Attach to an already-running app instead of launching the app with a clear data directory
                - activity(string): Name of the Activity hosting the WebView.
                - process(string): Process name of the Activity hosting the WebView (as given by ps).
                    If not given, the process name is assumed to be the same as androidPackage.
            Returns:
                selenium driver
            """
            app = self._u2.app_current()
            print(app)
            capabilities = {
                'chromeOptions': {
                    'androidDeviceSerial': device_ip or self._u2.serial,
                    'androidPackage': package or app['package'],
                    'androidUseRunningApp': attach,
                    'androidProcess': process or app['package'],
                    'androidActivity': activity or app['activity'],
                }
            }
            print(capabilities)
            # self.kill_chromedriver()
            time.sleep(2)
            self._launch_webdriver()
            dr = webdriver.Remote('http://localhost:%d' % self._port, capabilities)
    
            # always quit driver when done
            atexit.register(dr.quit)
            return dr
    

    实际调用的代码如下:

    driver = ChromeDriver(u2, log, common, phone_name).driver()
    
    # 通过搜索来选择设备
    search_input = common.wait_element(driver, (By.XPATH, Add_Device_Locator.search_classname_locator))
    
  • OK,我确认下

  • 好的,我确认下。

  • 鸿蒙系统尝鲜 at 2021年01月15日

    冲在第一线,赞

  • 这个问题有人解决了吗?

  • 自己顶一下,没人帮忙看下吗