编写自动化测试脚本时,遇到如下问题:

[HTTP] --> POST /wd/hub/session/076c110d-370f-4430-886e-0c30c1434ed0/element
[HTTP] {"using":"id","value":"com.xxxx.xxxx.mobile:id/btn_scene_time_date","sessionId":"076c110d-370f-4430-886e-0c30c1434ed0"}
[W3C] Calling AppiumDriver.findElement() with args: ["id","com.xxxx.xxxx.mobile:id/btn_scene_time_date","076c110d-370f-4430-886e-0c30c1434ed0"]
[BaseDriver] Valid locator strategies for this request: xpath, id, class name, accessibility id, -android uiautomator
[BaseDriver] Waiting up to 15000 ms for condition
[JSONWP Proxy] Matched '/element' to command name 'findElement'
[JSONWP Proxy] Proxying [POST /element] to [POST http://localhost:8203/wd/hub/session/8183debe-dd29-43c8-b9b6-e5d4fac997bd/element] with body: {"strategy":"id","selector":"com.xxxx.xxxx.mobile:id/btn_scene_time_date","context":"","multiple":false}
[JSONWP Proxy] Got response with status 200: {"sessionId":"8183debe-dd29-43c8-b9b6-e5d4fac997bd","status":0,"value":{"ELEMENT":"d58b1287-9f98-4d70-8f88-4d7300dec21f"}}
[W3C] Responding to client with driver.findElement() result: {"element-6066-11e4-a52e-4f735466cecf":"d58b1287-9f98-4d70-8f88-4d7300dec21f"}
[HTTP] <-- POST /wd/hub/session/076c110d-370f-4430-886e-0c30c1434ed0/element 200 34 ms - 88
[HTTP]
[HTTP] --> GET /wd/hub/session/076c110d-370f-4430-886e-0c30c1434ed0/element/d58b1287-9f98-4d70-8f88-4d7300dec21f/text
[HTTP] {}
[W3C] Driver proxy active, passing request on via HTTP proxy
[JSONWP Proxy] Matched '/wd/hub/session/076c110d-370f-4430-886e-0c30c1434ed0/element/d58b1287-9f98-4d70-8f88-4d7300dec21f/text' to command name 'getText'
[JSONWP Proxy] Proxying [GET /wd/hub/session/076c110d-370f-4430-886e-0c30c1434ed0/element/d58b1287-9f98-4d70-8f88-4d7300dec21f/text] to [GET http://localhost:8203/wd/hub/session/8183debe-dd29-43c8-b9b6-e5d4fac997bd/element/d58b1287-9f98-4d70-8f88-4d7300dec21f/text] with body: {}
[JSONWP Proxy] Got response with status 200: "{\"sessionId\":\"8183debe-dd29-43c8-b9b6-e5d4fac997bd\",\"status\":0,\"value\":\"2018-10-22\"}"
[JSONWP Proxy] Replacing sessionId 8183debe-dd29-43c8-b9b6-e5d4fac997bd with 076c110d-370f-4430-886e-0c30c1434ed0
[HTTP] <-- GET /wd/hub/session/076c110d-370f-4430-886e-0c30c1434ed0/element/d58b1287-9f98-4d70-8f88-4d7300dec21f/text 200 20 ms - 84
[HTTP]
[HTTP] --> POST /wd/hub/session/076c110d-370f-4430-886e-0c30c1434ed0/element/d58b1287-9f98-4d70-8f88-4d7300dec21f/click
[HTTP] {"id":"d58b1287-9f98-4d70-8f88-4d7300dec21f","sessionId":"076c110d-370f-4430-886e-0c30c1434ed0"}
[W3C] Calling AppiumDriver.click() with args: ["d58b1287-9f98-4d70-8f88-4d7300dec21f","076c110d-370f-4430-886e-0c30c1434ed0"]
[JSONWP Proxy] Matched '/element/d58b1287-9f98-4d70-8f88-4d7300dec21f/click' to command name 'click'
[JSONWP Proxy] Proxying [POST /element/d58b1287-9f98-4d70-8f88-4d7300dec21f/click] to [POST http://localhost:8203/wd/hub/session/8183debe-dd29-43c8-b9b6-e5d4fac997bd/element/d58b1287-9f98-4d70-8f88-4d7300dec21f/click] with body: {"element":"d58b1287-9f98-4d70-8f88-4d7300dec21f"}
[JSONWP Proxy] Got response with status 200: {"sessionId":"8183debe-dd29-43c8-b9b6-e5d4fac997bd","status":0,"value":true}
[W3C] Responding to client with driver.click() result: true
[HTTP] <-- POST /wd/hub/session/076c110d-370f-4430-886e-0c30c1434ed0/element/d58b1287-9f98-4d70-8f88-4d7300dec21f/click 200 45 ms - 14
[HTTP]
[HTTP] --> POST /wd/hub/session/076c110d-370f-4430-886e-0c30c1434ed0/element
[HTTP] {"using":"id","value":"com.xxxx.xxxx.mobile:id/year_pv","sessionId":"076c110d-370f-4430-886e-0c30c1434ed0"}
[W3C] Calling AppiumDriver.findElement() with args: ["id","com.xxxx.xxxx.mobile:id/year_pv","076c110d-370f-4430-886e-0c30c1434ed0"]


↙↙↙阅读原文可查看相关链接,并与作者交流