onをzoom
使用しようとしpython-client
ています。デフォルトのメソッドは、まだ実装されていないため機能しません。だから私は試してみました。appium
android
zoom
MultiAction
loc = self.element.location
print loc
xx, yy = loc["x"], loc["y"]
xx=700
action1 = TouchAction(self.driver)
action1.long_press(x=xx, y=yy).move_to(x=0, y=1000).release()
action2 = TouchAction(self.driver)
action2.long_press(x=xx, y=yy).move_to(x=0, y=-1000).release()
m_action = MultiAction(self.driver)
m_action.add(action1, action2)
m_action.perform()
しかし、これもズームを実行しません。代わりに、リストを下にスクロールします。ここで何が問題なのか、誰にもわかりません。
Appium Logs
[AndroidBootstrap] [BOOTSTRAP LOG] [debug] Got data from client: {"cmd":"action","action":"element:getLocation","params":{"elementId":"83"}}
[AndroidBootstrap] [BOOTSTRAP LOG] [debug] Got command of type ACTION
[AndroidBootstrap] [BOOTSTRAP LOG] [debug] Got command action: getLocation
[AndroidBootstrap] [BOOTSTRAP LOG] [debug] Returning result: {"status":0,"value":{"x":0,"y":1225}}
[debug] [AndroidBootstrap] Received command result from bootstrap
[MJSONWP] Responding to client with driver.getLocation() result: {"x":0,"y":1225}
[HTTP] <-- GET /wd/hub/session/c1a4d17f-0dc6-4445-bfad-776ec65bddb5/element/83/location 200 26 ms - 88
[HTTP] --> POST /wd/hub/session/c1a4d17f-0dc6-4445-bfad-776ec65bddb5/touch/multi/perform {"sessionId":"c1a4d17f-0dc6-4445-bfad-776ec65bddb5","actions":[[{"action":"longPress","options":{"y":1225,"x":700,"duration":1000}},{"action":"moveTo","options":{"y":1000,"x":0}},{"action":"release","options":{}}],[{"action":"longPress","options":{"y":1225,"x":700,"duration":1000}},{"action":"moveTo","options":{"y":-1000,"x":0}},{"action":"release","options":{}}]]}
[MJSONWP] Calling AppiumDriver.performMultiAction() with args: [[[{"action":"longPress","o...
[debug] [AndroidBootstrap] Sending command to android: {"cmd":"action","action":"performMultiPointerGesture","params":{"actions":[[{"action":"longPress","time":0.005,"touch":{"y":1225,"x":700,"duration":1000}},{"action":"moveTo","time":0.01,"touch":{"y":2225,"x":700}}],[{"action":"longPress","time":0.005,"touch":{"y":1225,"x":700,"duration":1000}},{"action":"moveTo","time":0.01,"touch":{"y":225,"x":700}}]]}}
[AndroidBootstrap] [BOOTSTRAP LOG] [debug] Got data from client: {"cmd":"action","action":"performMultiPointerGesture","params":{"actions":[[{"action":"longPress","time":0.005,"touch":{"y":1225,"x":700,"duration":1000}},{"action":"moveTo","time":0.01,"touch":{"y":2225,"x":700}}],[{"action":"longPress","time":0.005,"touch":{"y":1225,"x":700,"duration":1000}},{"action":"moveTo","time":0.01,"touch":{"y":225,"x":700}}]]}}
[AndroidBootstrap] [BOOTSTRAP LOG] [debug] Got command of type ACTION
[AndroidBootstrap] [BOOTSTRAP LOG] [debug] Got command action: performMultiPointerGesture
[AndroidBootstrap] [BOOTSTRAP LOG] [debug] Returning result: {"status":0,"value":"OK"}
[debug] [AndroidBootstrap] Received command result from bootstrap
[MJSONWP] Responding to client with driver.performMultiAction() result: "OK"
[HTTP] <-- POST /wd/hub/session/c1a4d17f-0dc6-4445-bfad-776ec65bddb5/touch/multi/perform 200 133 ms - 76
[HTTP] --> DELETE /wd/hub/session/c1a4d17f-0dc6-4445-bfad-776ec65bddb5 {}