Day4-3测试积点任务
问题:Appium-Python 通过 find_element_by_android_uiautomator 后怎么连续点击两次
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里也没有报错信息,显示两次点击成功
--> POST /wd/hub/session/3a6276af-1374-4434-8986-1877fdab23b9/element
{"using":"-android uiautomator","sessionId":"3a6276af-1374-4434-8986-1877
fdab23b9","value":"new UiSelector().text(\"1\")"}
Calling AppiumDriver.findElement() with args: ["-android uiautomat
or","new UiSelector().text(\"1\")","3a6276af-1374-4434-8986-1877fdab23b9"]
Valid locator strategies for this request: xpath, id, class
name, accessibility id, -android uiautomator
Waiting up to 0 ms for condition
Proxying to [POST http://localhost:8205/w
d/hub/session/d34a8178-0291-4d5d-9f2d-ba6082e480cf/element] with body: {"strateg
y":"-android uiautomator","selector":"new UiSelector().text(\"1\")","context":""
,"multiple":false}
Got response with status 200: {"sessionId":"d34a8178-0291
-4d5d-9f2d-ba6082e480cf","status":0,"value":{"ELEMENT":"7094742f-b379-4462-9ba2-
2c1e454f336d"}}
Responding to client with driver.findElement() result: {"ELEMENT":
"7094742f-b379-4462-9ba2-2c1e454f336d"}
<-- POST /wd/hub/session/3a6276af-1374-4434-8986-1877fdab23b9/element 200
67 ms - 122
--> POST /wd/hub/session/3a6276af-1374-4434-8986-1877fdab23b9/element/709
4742f-b379-4462-9ba2-2c1e454f336d/click
{"sessionId":"3a6276af-1374-4434-8986-1877fdab23b9","id":"7094742f-b379-4
462-9ba2-2c1e454f336d"}
Calling AppiumDriver.click() with args: ["7094742f-b379-4462-9ba2-
2c1e454f336d","3a6276af-1374-4434-8986-1877fdab23b9"]
Proxying [POST /element/7094742f-b379-4462-9ba2-2c1e454f3
36d/click] to [POST http://localhost:8205/wd/hub/session/d34a8178-0291-4d5d-9f2d
-ba6082e480cf/element/7094742f-b379-4462-9ba2-2c1e454f336d/click] with body: {"e
lement":"7094742f-b379-4462-9ba2-2c1e454f336d"}
Got response with status 200: {"sessionId":"d34a8178-0291
-4d5d-9f2d-ba6082e480cf","status":0,"value":true}
Responding to client with driver.click() result: true
<-- POST /wd/hub/session/3a6276af-1374-4434-8986-1877fdab23b9/element/709
4742f-b379-4462-9ba2-2c1e454f336d/click 200 3139 ms - 76
--> POST /wd/hub/session/3a6276af-1374-4434-8986-1877fdab23b9/element
{"using":"-android uiautomator","sessionId":"3a6276af-1374-4434-8986-1877
fdab23b9","value":"new UiSelector().text(\"1\")"}
Calling AppiumDriver.findElement() with args: ["-android uiautomat
or","new UiSelector().text(\"1\")","3a6276af-1374-4434-8986-1877fdab23b9"]
Valid locator strategies for this request: xpath, id, class
name, accessibility id, -android uiautomator
Waiting up to 0 ms for condition
Proxying to [POST http://localhost:8205/w
d/hub/session/d34a8178-0291-4d5d-9f2d-ba6082e480cf/element] with body: {"strateg
y":"-android uiautomator","selector":"new UiSelector().text(\"1\")","context":""
,"multiple":false}
Got response with status 200: {"sessionId":"d34a8178-0291
-4d5d-9f2d-ba6082e480cf","status":0,"value":{"ELEMENT":"39c31733-3d13-4c05-93a8-
8e004d0cde41"}}
Responding to client with driver.findElement() result: {"ELEMENT":
"39c31733-3d13-4c05-93a8-8e004d0cde41"}
<-- POST /wd/hub/session/3a6276af-1374-4434-8986-1877fdab23b9/element 200
30 ms - 122
--> POST /wd/hub/session/3a6276af-1374-4434-8986-1877fdab23b9/element/39c
31733-3d13-4c05-93a8-8e004d0cde41/click
{"sessionId":"3a6276af-1374-4434-8986-1877fdab23b9","id":"39c31733-3d13-4
c05-93a8-8e004d0cde41"}
Calling AppiumDriver.click() with args: ["39c31733-3d13-4c05-93a8-
8e004d0cde41","3a6276af-1374-4434-8986-1877fdab23b9"]
Proxying [POST /element/39c31733-3d13-4c05-93a8-8e004d0cd
e41/click] to [POST http://localhost:8205/wd/hub/session/d34a8178-0291-4d5d-9f2d
-ba6082e480cf/element/39c31733-3d13-4c05-93a8-8e004d0cde41/click] with body: {"e
lement":"39c31733-3d13-4c05-93a8-8e004d0cde41"}
Got response with status 200: {"sessionId":"d34a8178-0291
-4d5d-9f2d-ba6082e480cf","status":0,"value":true}
Responding to client with driver.click() result: true
<-- POST /wd/hub/session/3a6276af-1374-4434-8986-1877fdab23b9/element/39c
31733-3d13-4c05-93a8-8e004d0cde41/click 200 3131 ms - 76
直接循环两次就可以啦
页:
[1]