做網(wǎng)站委托書seo官網(wǎng)
問題:appium默認(rèn)啟動(dòng)一個(gè)應(yīng)用的session過期時(shí)間是60秒到時(shí)間會(huì)自動(dòng)停了剛啟動(dòng)的應(yīng)用,工作臺打印:info: [debug] We shut down because no new commands came in的日志
? ?
分析:--command-timeout ?60?The default command timeout for the server to use for all sessions (in seconds and should be less than 2147483). Will still be overridden by newCommandTimeout cap
意思是默認(rèn)60秒過期,超過60秒就會(huì)自動(dòng)
解決辦法:
從appium工作臺最前面找到,啟動(dòng)命令:
> Launching Appium server with command: C:\Program Files (x86)\Appium\node.exe lib\server\main.js --address 127.0.0.1 --port 4723 --avd Nexus7 --platform-name Android --platform-version 19 --automation-name Appium --device-name "Android Emulator" --log-no-color
在cmd命令行,對應(yīng)目錄加時(shí)間參數(shù)即可:--command-timeout 600
在目錄:C:\Program Files (x86)\Appium>
執(zhí)行
node.exe node_modules\appium\lib\server\main.js --
address 127.0.0.1 --port 4723 --avd Android4.4.2 --device-ready-timeout 70 --pla
tform-name Android --platform-version 19 --automation-name Appium --avd Nexus7 -
-device-name "Android Emulator" --log-no-color --command-timeout 600
啟動(dòng)日志中就能看到:
info: [debug] Non-default server args: {"address":"127.0.0.1","logNoColors":true
,"avd":"Nexus7","androidDeviceReadyTimeout":"70","deviceName":"Android Emulator"
,"platformName":"Android","platformVersion":"19","automationName":"Appium","defa
ultCommandTimeout":600}
時(shí)間變成600秒了
【整整200集】超超超詳細(xì)的Python接口自動(dòng)化測試進(jìn)階教程合集,真實(shí)模擬企業(yè)項(xiàng)目實(shí)戰(zhàn)