51Testing软件测试论坛

标题: Day4-3测试积点任务 [打印本页]

作者: 测试积点老人    时间: 2018-7-4 10:18
标题: Day4-3测试积点任务
问题:
Appium-Python 通过 find_element_by_android_uiautomator 后怎么连续点击两次
  1. Appium-Python 通过find_element_by_android_uiautomator后怎么连续点击两次,比如self.driver.find_element_by_android_uiautomator('new UiSelector().text("1")').click(),self.driver.find_element_by_android_uiautomator('new UiSelector().text("1")').click()后实际只点击了一次,log里也没有报错信息,显示两次点击成功
  2. [HTTP] --> POST /wd/hub/session/3a6276af-1374-4434-8986-1877fdab23b9/element
  3. [HTTP] {"using":"-android uiautomator","sessionId":"3a6276af-1374-4434-8986-1877
  4. fdab23b9","value":"new UiSelector().text(\"1\")"}
  5. [debug] [W3C] Calling AppiumDriver.findElement() with args: ["-android uiautomat
  6. or","new UiSelector().text(\"1\")","3a6276af-1374-4434-8986-1877fdab23b9"]
  7. [debug] [BaseDriver] Valid locator strategies for this request: xpath, id, class
  8. name, accessibility id, -android uiautomator
  9. [debug] [BaseDriver] Waiting up to 0 ms for condition
  10. [debug] [JSONWP Proxy] Proxying [POST /element] to [POST http://localhost:8205/w
  11. d/hub/session/d34a8178-0291-4d5d-9f2d-ba6082e480cf/element] with body: {"strateg
  12. y":"-android uiautomator","selector":"new UiSelector().text(\"1\")","context":""
  13. ,"multiple":false}
  14. [debug] [JSONWP Proxy] Got response with status 200: {"sessionId":"d34a8178-0291
  15. -4d5d-9f2d-ba6082e480cf","status":0,"value":{"ELEMENT":"7094742f-b379-4462-9ba2-
  16. 2c1e454f336d"}}
  17. [debug] [W3C] Responding to client with driver.findElement() result: {"ELEMENT":
  18. "7094742f-b379-4462-9ba2-2c1e454f336d"}
  19. [HTTP] <-- POST /wd/hub/session/3a6276af-1374-4434-8986-1877fdab23b9/element 200
  20. 67 ms - 122
  21. [HTTP]
  22. [HTTP] --> POST /wd/hub/session/3a6276af-1374-4434-8986-1877fdab23b9/element/709
  23. 4742f-b379-4462-9ba2-2c1e454f336d/click
  24. [HTTP] {"sessionId":"3a6276af-1374-4434-8986-1877fdab23b9","id":"7094742f-b379-4
  25. 462-9ba2-2c1e454f336d"}
  26. [debug] [W3C] Calling AppiumDriver.click() with args: ["7094742f-b379-4462-9ba2-
  27. 2c1e454f336d","3a6276af-1374-4434-8986-1877fdab23b9"]
  28. [debug] [JSONWP Proxy] Proxying [POST /element/7094742f-b379-4462-9ba2-2c1e454f3
  29. 36d/click] to [POST http://localhost:8205/wd/hub/session/d34a8178-0291-4d5d-9f2d
  30. -ba6082e480cf/element/7094742f-b379-4462-9ba2-2c1e454f336d/click] with body: {"e
  31. lement":"7094742f-b379-4462-9ba2-2c1e454f336d"}
  32. [debug] [JSONWP Proxy] Got response with status 200: {"sessionId":"d34a8178-0291
  33. -4d5d-9f2d-ba6082e480cf","status":0,"value":true}
  34. [debug] [W3C] Responding to client with driver.click() result: true
  35. [HTTP] <-- POST /wd/hub/session/3a6276af-1374-4434-8986-1877fdab23b9/element/709
  36. 4742f-b379-4462-9ba2-2c1e454f336d/click 200 3139 ms - 76
  37. [HTTP]
  38. [HTTP] --> POST /wd/hub/session/3a6276af-1374-4434-8986-1877fdab23b9/element
  39. [HTTP] {"using":"-android uiautomator","sessionId":"3a6276af-1374-4434-8986-1877
  40. fdab23b9","value":"new UiSelector().text(\"1\")"}
  41. [debug] [W3C] Calling AppiumDriver.findElement() with args: ["-android uiautomat
  42. or","new UiSelector().text(\"1\")","3a6276af-1374-4434-8986-1877fdab23b9"]
  43. [debug] [BaseDriver] Valid locator strategies for this request: xpath, id, class
  44. name, accessibility id, -android uiautomator
  45. [debug] [BaseDriver] Waiting up to 0 ms for condition
  46. [debug] [JSONWP Proxy] Proxying [POST /element] to [POST http://localhost:8205/w
  47. d/hub/session/d34a8178-0291-4d5d-9f2d-ba6082e480cf/element] with body: {"strateg
  48. y":"-android uiautomator","selector":"new UiSelector().text(\"1\")","context":""
  49. ,"multiple":false}
  50. [debug] [JSONWP Proxy] Got response with status 200: {"sessionId":"d34a8178-0291
  51. -4d5d-9f2d-ba6082e480cf","status":0,"value":{"ELEMENT":"39c31733-3d13-4c05-93a8-
  52. 8e004d0cde41"}}
  53. [debug] [W3C] Responding to client with driver.findElement() result: {"ELEMENT":
  54. "39c31733-3d13-4c05-93a8-8e004d0cde41"}
  55. [HTTP] <-- POST /wd/hub/session/3a6276af-1374-4434-8986-1877fdab23b9/element 200
  56. 30 ms - 122
  57. [HTTP]
  58. [HTTP] --> POST /wd/hub/session/3a6276af-1374-4434-8986-1877fdab23b9/element/39c
  59. 31733-3d13-4c05-93a8-8e004d0cde41/click
  60. [HTTP] {"sessionId":"3a6276af-1374-4434-8986-1877fdab23b9","id":"39c31733-3d13-4
  61. c05-93a8-8e004d0cde41"}
  62. [debug] [W3C] Calling AppiumDriver.click() with args: ["39c31733-3d13-4c05-93a8-
  63. 8e004d0cde41","3a6276af-1374-4434-8986-1877fdab23b9"]
  64. [debug] [JSONWP Proxy] Proxying [POST /element/39c31733-3d13-4c05-93a8-8e004d0cd
  65. e41/click] to [POST http://localhost:8205/wd/hub/session/d34a8178-0291-4d5d-9f2d
  66. -ba6082e480cf/element/39c31733-3d13-4c05-93a8-8e004d0cde41/click] with body: {"e
  67. lement":"39c31733-3d13-4c05-93a8-8e004d0cde41"}
  68. [debug] [JSONWP Proxy] Got response with status 200: {"sessionId":"d34a8178-0291
  69. -4d5d-9f2d-ba6082e480cf","status":0,"value":true}
  70. [debug] [W3C] Responding to client with driver.click() result: true
  71. [HTTP] <-- POST /wd/hub/session/3a6276af-1374-4434-8986-1877fdab23b9/element/39c
  72. 31733-3d13-4c05-93a8-8e004d0cde41/click 200 3131 ms - 76
复制代码



作者: abcsell    时间: 2018-7-5 09:51
直接循环两次就可以啦




欢迎光临 51Testing软件测试论坛 (http://bbs.51testing.com/) Powered by Discuz! X3.2