测试积点老人 发表于 2019-8-19 09:47:21

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

qqq911 发表于 2019-8-20 10:34:13

检查下代码

jingzizx 发表于 2019-8-20 12:29:23

执行了两次?是否有弹框时间间隔

清晨一缕阳光 发表于 2019-8-20 16:41:48

API中没有dbclick()方法么?
页: [1]
查看完整版本: Appium-Python 通过 find_element_by_android_uiautomator 后怎么连续点击两次