直接用 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阿里
- npm報錯 TypeError [ERR_INVALID_ARG_TYPE]: The “path“ argument must be of type string.Received undefineNPMError
- sh指令碼執行報錯指令碼
- appium 安卓應用指令碼APP安卓指令碼
- 執行用例報錯
- appium ios java 指令碼如何用指令執行,例如 adb 那種方式執行指令碼APPiOSJava指令碼
- Mac Appium環境搭建及連線ios真機MacAPPiOS
- appium1.19.1, xcode12.3, iOS 虛擬機器 14.3 版本,執行用例就報錯APPXCodeiOS虛擬機
- Java 11可以直接執行原始碼Java原始碼
- springboot整合Batis,執行報錯,資料庫連線密碼錯誤Spring BootBAT資料庫密碼
- mac 下終端啟動 appium,執行程式碼時報錯MacAPP行程
- 進行遠端連線一個 appium server 時報 not map to a valid resourceAPPServer
- npm 執行時報錯“因為在此係統上禁止執行指令碼”解決辦法NPM指令碼
- sqlplus執行指令碼時遇到錯誤自動停止SQL指令碼
- Appium 在 IOS 真機測試時啟動應用後經常卡死APPiOS
- HarmonyOS:使用本地真機執行應用/服務
- python用pyinstaller生成exe時報錯 TypeError: an integer is required (got type bytes)PythonErrorUIGo
- 線上定時指令碼執行慢,分析過程指令碼
- Go執行指令碼命令用例及原始碼解析Go指令碼原始碼
- appium 可以用自動化指令碼安裝 release 包的 ipa 檔案麼APP指令碼
- Pycharm連線遠端伺服器並編寫、執行python程式碼PyCharm伺服器Python
- 生成 Linux 執行時間報告的 Bash 指令碼Linux指令碼
- 用putty連線AWS,報錯“No supported authentication methods available"AI
- Appium用driver.start_activity切換Activity報錯APP
- shell指令碼linux命令連續執行指令碼Linux
- Linux 定時執行指令碼、命令Linux指令碼
- Linux定時執行.sh指令碼Linux指令碼
- yii執行phpunit時報錯PHP
- appium 如何與真機進行連線,目前切 webview 時遇到無法切入問題,導致無法定位元素APPWebView
- HBuildx如果啟用IOS真機除錯?UIiOS除錯
- 執行shell指令碼報錯:-bash: ./test1.sh: /bin/bash^M: ...指令碼
- shell指令碼執行錯誤 $‘\r‘:command not found指令碼
- 通過 Redis 定時執行指令碼Redis指令碼
- javascript指令碼何時會被執行JavaScript指令碼
- Jenkins 執行 selenium 自動化測試指令碼,呼叫 webdriver 時報錯:[Errno 8] Exec format error:Jenkins指令碼WebORMError
- Pycharm:設定完Anaconda後報錯TypeError: an integer is required (got type bytes)PyCharmErrorUIGo
- crontab異常:shell下可以執行命令,執行crontab卻報錯
- 開機自動執行python指令碼Python指令碼