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接口自动化测试进阶教程合集,真实模拟企业项目实战

相关推荐
QH1392923188016 小时前
Rohde & Schwarz FSWX3044 FSWX3026信号与频谱分析仪
网络·功能测试·单元测试·集成测试·模块测试
测试19981 天前
Selenium自动化测试框架的搭建
自动化测试·软件测试·python·selenium·测试工具·职场和发展·测试用例
Thanks_ks1 天前
从辅助编码到架构重塑:基于 LLM 的智能开发工作流落地实战
自动化测试·大模型·llm·研发效能·模型微调·rag·提示词工程
川石课堂软件测试1 天前
AI如何赋能软件测试行业的发展
人工智能·python·功能测试·网络协议·单元测试·测试用例·prometheus
琪露诺大湿2 天前
网页聊天系统——测试报告
java·软件测试·功能测试·websocket·html·项目·测试报告
seabirdssss2 天前
以登录功能理解单元测试、集成测试、系统测试和用户测试
单元测试·集成测试
琪露诺大湿2 天前
VeloQueue-测试报告
java·开发语言·消息队列·单元测试·项目·测试报告
胡利光3 天前
Harness Engineering 02|Repo Harness:让仓库对 Agent 可读
java·junit·单元测试
Elastic 中国社区官方博客3 天前
使用 EDOT Browser 和 Kibana 进行 OpenTelemetry 浏览器端埋点
大数据·服务器·数据库·elasticsearch·搜索引擎·单元测试·可用性测试