直接用 appium 可以連線真機,用 pycharm 執行指令碼時報錯 “'platformVersion' must be of type string”
selenium.common.exceptions.SessionNotCreatedException: Message: A new session could not be created. Details: The desiredCapabilities object was not valid for the following reason(s): 'platformVersion' must be of type string
appium log
[Appium] Welcome to Appium v1.17.0
[Appium] Non-default server args:
[Appium] allowInsecure: {
[Appium] }
[Appium] denyInsecure: {
[Appium] }
[Appium] Appium REST http interface listener started on 0.0.0.0:4723
[HTTP] --> POST /wd/hub/session
[HTTP] {"capabilities":{"firstMatch":[{"platformName":"IOS","appium:platformVersion":12.2,"appium:deviceName":"IPhone","appium:automationName":"XCUITest","appium:bundleId":"net.powerinfo.face2face","appium:udid":"aa94d167fa1165e50027056d1f4697b728d8b583","appium:newCommandTimeout":3600,"appium:autoAcceptAlerts":true,"appium:noReset":true,"appium:useNewWDA":true}]},"desiredCapabilities":{"platformName":"IOS","platformVersion":12.2,"deviceName":"IPhone","automationName":"XCUITest","bundleId":"net.powerinfo.face2face","udid":"aa94d167fa1165e50027056d1f4697b728d8b583","newCommandTimeout":3600,"autoAcceptAlerts":true,"noReset":true,"useNewWDA":true}}
[W3C] Calling AppiumDriver.createSession() with args: [{"platformName":"IOS","platformVersion":12.2,"deviceName":"IPhone","automationName":"XCUITest","bundleId":"net.powerinfo.face2face","udid":"aa94d167fa1165e50027056d1f4697b728d8b583","newCommandTimeout":3600,"autoAcceptAlerts":true,"noReset":true,"useNewWDA":true},null,{"firstMatch":[{"platformName":"IOS","appium:platformVersion":12.2,"appium:deviceName":"IPhone","appium:automationName":"XCUITest","appium:bundleId":"net.powerinfo.face2face","appium:udid":"aa94d167fa1165e50027056d1f4697b728d8b583","appium:newCommandTimeout":3600,"appium:autoAcceptAlerts":true,"appium:noReset":true,"appium:useNewWDA":true}]}]
[BaseDriver] Event 'newSessionRequested' logged at 1590903729578 (13:42:09 GMT+0800 (中國標準時間))
[Appium] Could not parse W3C capabilities: 'platformVersion' must be of type string
[Appium] Trying to fix W3C capabilities by merging them with JSONWP caps
[BaseDriver] The following capabilities are not standard capabilities and should have an extension prefix:
[BaseDriver] platformVersion
[BaseDriver] deviceName
[BaseDriver] automationName
[BaseDriver] bundleId
[BaseDriver] udid
[BaseDriver] newCommandTimeout
[BaseDriver] autoAcceptAlerts
[BaseDriver] noReset
[BaseDriver] useNewWDA
[Appium] Could not parse fixed W3C capabilities: 'platformVersion' must be of type string. Falling back to JSONWP protocol
[Appium] Appium v1.17.0 creating new XCUITestDriver (v3.17.0) session
[BaseDriver] Creating session with MJSONWP desired capabilities: {
[BaseDriver] "platformName": "IOS",
[BaseDriver] "platformVersion": 12.2,
[BaseDriver] "deviceName": "IPhone",
[BaseDriver] "automationName": "XCUITest",
[BaseDriver] "bundleId": "net.powerinfo.face2face",
[BaseDriver] "udid": "aa94d167fa1165e50027056d1f4697b728d8b583",
[BaseDriver] "newCommandTimeout": 3600,
[BaseDriver] "autoAcceptAlerts": true,
[BaseDriver] "noReset": true,
[BaseDriver] "useNewWDA": true
[BaseDriver] }
[BaseDriver] SessionNotCreatedError: A new session could not be created. Details: The desiredCapabilities object was not valid for the following reason(s): 'platformVersion' must be of type string
[BaseDriver] at XCUITestDriver.validateDesiredCaps (/Applications/Appium.app/Contents/Resources/app/node_modules/appium/node_modules/appium-base-driver/lib/basedriver/driver.js:226:25)
[BaseDriver] at XCUITestDriver.validateDesiredCaps (/Applications/Appium.app/Contents/Resources/app/node_modules/appium/node_modules/appium-xcuitest-driver/lib/driver.js:1001:16)
[BaseDriver] at XCUITestDriver.createSession (/Applications/Appium.app/Contents/Resources/app/node_modules/appium/node_modules/appium-base-driver/lib/basedriver/commands/session.js:46:8)
[BaseDriver] at XCUITestDriver.createSession (/Applications/Appium.app/Contents/Resources/app/node_modules/appium/node_modules/appium-xcuitest-driver/lib/driver.js:211:43)
[BaseDriver] at AppiumDriver.createSession (/Applications/Appium.app/Contents/Resources/app/node_modules/appium/lib/appium.js:358:43)
[BaseDriver] at processTicksAndRejections (internal/process/task_queues.js:85:5)
[XCUITest] SessionNotCreatedError: A new session could not be created. Details: The desiredCapabilities object was not valid for the following reason(s): 'platformVersion' must be of type string
[XCUITest] at XCUITestDriver.validateDesiredCaps (/Applications/Appium.app/Contents/Resources/app/node_modules/appium/node_modules/appium-base-driver/lib/basedriver/driver.js:226:25)
[XCUITest] at XCUITestDriver.validateDesiredCaps (/Applications/Appium.app/Contents/Resources/app/node_modules/appium/node_modules/appium-xcuitest-driver/lib/driver.js:1001:16)
[XCUITest] at XCUITestDriver.createSession (/Applications/Appium.app/Contents/Resources/app/node_modules/appium/node_modules/appium-base-driver/lib/basedriver/commands/session.js:46:8)
[XCUITest] at XCUITestDriver.createSession (/Applications/Appium.app/Contents/Resources/app/node_modules/appium/node_modules/appium-xcuitest-driver/lib/driver.js:211:43)
[XCUITest] at AppiumDriver.createSession (/Applications/Appium.app/Contents/Resources/app/node_modules/appium/lib/appium.js:358:43)
[XCUITest] at processTicksAndRejections (internal/process/task_queues.js:85:5)
[DevCon Factory] Neither device UDID nor local port is set. Did not know how to release the connection
[BaseDriver] Event 'newSessionStarted' logged at 1590903730467 (13:42:10 GMT+0800 (中國標準時間))
[MJSONWP] Encountered internal error running command: SessionNotCreatedError: A new session could not be created. Details: The desiredCapabilities object was not valid for the following reason(s): 'platformVersion' must be of type string
[MJSONWP] at XCUITestDriver.validateDesiredCaps (/Applications/Appium.app/Contents/Resources/app/node_modules/appium/node_modules/appium-base-driver/lib/basedriver/driver.js:226:25)
[MJSONWP] at XCUITestDriver.validateDesiredCaps (/Applications/Appium.app/Contents/Resources/app/node_modules/appium/node_modules/appium-xcuitest-driver/lib/driver.js:1001:16)
[MJSONWP] at XCUITestDriver.createSession (/Applications/Appium.app/Contents/Resources/app/node_modules/appium/node_modules/appium-base-driver/lib/basedriver/commands/session.js:46:8)
[MJSONWP] at XCUITestDriver.createSession (/Applications/Appium.app/Contents/Resources/app/node_modules/appium/node_modules/appium-xcuitest-driver/lib/driver.js:211:43)
[MJSONWP] at AppiumDriver.createSession (/Applications/Appium.app/Contents/Resources/app/node_modules/appium/lib/appium.js:358:43)
[MJSONWP] at processTicksAndRejections (internal/process/task_queues.js:85:5)
[MJSONWP] Destroying socket connection
[HTTP] <-- POST /wd/hub/session 500 895 ms - 212
相關文章
- 請教下,自己電腦搭建了配置好 appium,且可以執行測試用例,如何部署到阿里雲上使用真機進行用例執行?目前 appium 是可以部署了,但是如何操作連線真機操作呢?還是大家都是用的模擬器測試?APP阿里
- appium 安卓應用指令碼APP安卓指令碼
- Mac Appium環境搭建及連線ios真機MacAPPiOS
- Java 11可以直接執行原始碼Java原始碼
- mac 下終端啟動 appium,執行程式碼時報錯MacAPP行程
- PD連線oracle時報錯Oracle
- appium ios java 指令碼如何用指令執行,例如 adb 那種方式執行指令碼APPiOSJava指令碼
- Oracle用指令碼執行備份Oracle指令碼
- npm報錯 TypeError [ERR_INVALID_ARG_TYPE]: The “path“ argument must be of type string.Received undefineNPMError
- 進行遠端連線一個 appium server 時報 not map to a valid resourceAPPServer
- npm 執行時報錯“因為在此係統上禁止執行指令碼”解決辦法NPM指令碼
- HarmonyOS:使用本地真機執行應用/服務
- 從String建立Date在真機執行崩潰
- yii執行phpunit時報錯PHP
- windows下用指令碼設定本地連線ipWindows指令碼
- sh指令碼執行報錯指令碼
- EF:開啟Oracle連線時報錯Oracle
- Oracle用指令碼定時執行備份Oracle指令碼
- appium 可以用自動化指令碼安裝 release 包的 ipa 檔案麼APP指令碼
- Go執行指令碼命令用例及原始碼解析Go指令碼原始碼
- Pycharm連線遠端伺服器並編寫、執行python程式碼PyCharm伺服器Python
- PyCharm 啟用碼PyCharm
- python用pyinstaller生成exe時報錯 TypeError: an integer is required (got type bytes)PythonErrorUIGo
- Xtrabackup恢復時報錯'Error: datadir must be specified'Error
- 用Jdbc-odbc直接連線access檔案 (轉)JDBC
- HBuildx如果啟用IOS真機除錯?UIiOS除錯
- 可以在Windows的"執行"中直接執行的程式Windows
- 執行用例報錯
- 執行指令碼diagcollection.pl報錯指令碼GC
- 樂視手機真機圖曝光:採用USB Type-C介面技術
- L#指令碼語言,直接把DLL當指令碼執行(圖解說明)指令碼圖解
- 可以直接拿來用的15個jQuery程式碼片段jQuery
- shell指令碼linux命令連續執行指令碼Linux
- OkHttp 原始碼剖析系列(六)——連線複用機制及連線的建立HTTP原始碼
- 執行dbca時報錯:Xlib:No protocol specifiedProtocol
- 除錯記錄:The public type must be defined in its own file除錯
- SQLYOG連線資料庫時報錯1251SQL資料庫
- springboot整合Batis,執行報錯,資料庫連線密碼錯誤Spring BootBAT資料庫密碼