appium默认60秒关闭应用的问题

问题:appium默认启动一个应用的session过期时间是60秒到时间会自动停了刚启动的应用,工作台打印: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

意思是默认60秒过期,超过60秒就会自动

解决办法:

从appium工作台最前面找到,启动命令:

> 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命令行,对应目录加时间参数即可:--command-timeout 600

在目录:C:\Program Files (x86)\Appium>

执行

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

启动日志中就能看到:

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}

时间变成600秒了

【整整200集】超超超详细的Python接口自动化测试进阶教程合集,真实模拟企业项目实战

相关推荐
姚青&25 分钟前
软件测试基础概念
单元测试·pytest
川石课堂软件测试1 天前
技术分享|JMeter接口与性能测试实战
数据库·功能测试·测试工具·jmeter·单元测试·postman·prometheus
汽车仪器仪表相关领域2 天前
Kvaser Leaf Light HS v2 CB:裸卡式CAN接口新标杆,赋能车载与工业集成测试高效升级
服务器·网络·数据库·人工智能·单元测试·自动化·汽车
川石课堂软件测试2 天前
软件测试:典型面试题库
数据库·python·功能测试·mysql·单元测试·grafana·prometheus
Bug 挖掘机3 天前
一篇理清Prompt,Skill,MCP之间的区别
开发语言·软件测试·python·功能测试·测试开发·prompt·ai测试
23471021273 天前
4.22 学习笔记
软件测试·笔记·python·学习
Cd ...3 天前
RobotFramework Selenium与Browser常用关键字对比
自动化测试·selenium·robotframework·playwright·browser
23471021273 天前
4.21 学习笔记
软件测试·笔记·python·学习
Raina测试3 天前
基于playwright-cli +Skills实现UI自动化测试实战案例2️⃣(附常见问题处理)
软件测试·ai·自动化·测试工程师·ai测试