乐于分享
好东西不私藏

appium-inspector的使用

appium-inspector的使用

兼容所有 Appium 2.x/3.x 的启动命令(带跨域+指定IP+端口)
appium –allow-cors -a 127.0.0.1 -p 4723
  • -a:address 的缩写,等价于 host/server-host,所有版本都识别;
  • -p:port 的缩写,等价于 port/server-port,所有版本都识别;
  • --allow-cors:跨域参数保留,浏览器版 Inspector 必须加。

执行后如果日志显示以下内容,说明启动成功:

[Appium] Welcome to Appium v3.1.2

快速验证,启动服务器后,在浏览器访问 

  1. http://127.0.0.1:4723/status,返回如下内容即服务器正常:
"build":{"version":"3.1.2"}

Inspector 配置关键:URL 为 http://127.0.0.1:4723/

Remote Path 填 /

Desired Capabilities 配置:

{  "appium:udid": "xxxxxx",  "appium:platformName": "Android",  "appium:platformVersion": "13",  "appium:automationName": "UiAutomator2",  "appium:noReset": true,  "appium:autoGrantPermissions": true,  "appium:newCommandTimeout": 5}

点击 Start Session 就能正常连接设备。

本站文章均为手工撰写未经允许谢绝转载:夜雨聆风 » appium-inspector的使用

评论 抢沙发

2 + 9 =
  • 昵称 (必填)
  • 邮箱 (必填)
  • 网址
×
订阅图标按钮