Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Appium zoom in Multi Touch Action on Android real device not working #9491

Closed
grvermeulen opened this issue Oct 20, 2017 · 9 comments
Closed
Labels
Android related to Android-native driver(s)

Comments

@grvermeulen
Copy link

grvermeulen commented Oct 20, 2017

The problem

When I'm using a multi touch action for zooming in the action does nothing. I turned on developer options to show touch actions and swipes on the screen and I can see the correct touch action is made by the driver (two fingers moving from the middle of the screen to the outside). Also the appium logging is telling me the command is executed correctly although the result is that nothing happens on the actual screen. The Funny thing is the zoom out with the same code except the parameters is working.
The Code that i'm using:

`int scrHeight = driver.manage().window().getSize().getHeight(); //To get the mobile screen height
int scrWidth = driver.manage().window().getSize().getWidth();//To get the mobile screen width

  MultiTouchAction multiTouch = new MultiTouchAction((MobileDriver) driver);
  TouchAction tAction0 = new TouchAction((MobileDriver) driver);
  TouchAction tAction1 = new TouchAction((MobileDriver) driver);

  tAction0.press(scrWidth / 2,  scrHeight /2).moveTo(0, - 500).waitAction(Duration.ofMillis(50)).release();//press finger center of the screen and then move y axis
  tAction1.press(scrWidth / 2, scrHeight /2).moveTo(0,  500).waitAction(Duration.ofMillis(50)).release();// press thumb slightly down on the center of the screen and then move y axis
  multiTouch.add(tAction0).add(tAction1);
  multiTouch.perform();`

[AndroidBootstrap] Sending command to android: {"cmd":"action","action":"getDeviceSize","params":{}} [AndroidBootstrap] [BOOTSTRAP LOG] [debug] Got data from client: {"cmd":"action","action":"getDeviceSize","params":{}} [AndroidBootstrap] [BOOTSTRAP LOG] [debug] Got command of type ACTION [AndroidBootstrap] [BOOTSTRAP LOG] [debug] Got command action: getDeviceSize [AndroidBootstrap] [BOOTSTRAP LOG] [debug] Returning result: {"status":0,"value":{"height":2392,"width":1440}} [AndroidBootstrap] Received command result from bootstrap [MJSONWP] Responding to client with driver.getWindowSize() result: {"height":2392,"width":1440} [HTTP] <-- GET /wd/hub/session/e6efb14e-ab95-4737-ba31-81f310c8cd7e/window/current/size 200 8 ms - 100 [HTTP] --> POST /wd/hub/session/e6efb14e-ab95-4737-ba31-81f310c8cd7e/touch/multi/perform {"actions":[[{"action":"press","options":{"x":720,"y":1100}},{"action":"moveTo","options":{"x":0,"y":-500}},{"action":"wait","options":{"ms":50}},{"action":"release","options":{}}],[{"action":"press","options":{"x":720,"y":1200}},{"action":"moveTo","options":{"x":0,"y":500}},{"action":"wait","options":{"ms":50}},{"action":"release","options":{}}]]} [MJSONWP] Calling AppiumDriver.performMultiAction() with args: [[[{"action":"press","options":{"x":720,"y":1100}},{"action":"moveTo","options":{"x":0,"y":-500}},{"action":"wait","options":{"ms":50}},{"action":"release","options":{}}],[{"action":"press","options":{"x":720,"y":1200}},{"action":"moveTo","options":{"x":0,"y":500}},{"action":"wait","options":{"ms":50}},{"action":"release","options":{}}]],null,null,null,"e6efb14e-ab95-4737-ba31-81f310c8cd7e"] [AndroidBootstrap] Sending command to android: {"cmd":"action","action":"performMultiPointerGesture","params":{"actions":[[{"action":"press","time":0.005,"touch":{"x":720,"y":1100}},{"action":"moveTo","time":0.01,"touch":{"x":720,"y":600}},{"action":"wait","time":0.06,"touch":{"x":720,"y":600}}],[{"action":"press","time":0.005,"touch":{"x":720,"y":1200}},{"action":"moveTo","time":0.01,"touch":{"x":720,"y":1700}},{"action":"wait","time":0.06,"touch":{"x":720,"y":1700}}]]}} [AndroidBootstrap] [BOOTSTRAP LOG] [debug] Got data from client: {"cmd":"action","action":"performMultiPointerGesture","params":{"actions":[[{"action":"press","time":0.005,"touch":{"x":720,"y":1100}},{"action":"moveTo","time":0.01,"touch":{"x":720,"y":600}},{"action":"wait","time":0.06,"touch":{"x":720,"y":600}}],[{"action":"press","time":0.005,"touch":{"x":720,"y":1200}},{"action":"moveTo","time":0.01,"touch":{"x":720,"y":1700}},{"action":"wait","time":0.06,"touch":{"x":720,"y":1700}}]]}} [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"} [AndroidBootstrap] Received command result from bootstrap [MJSONWP] Responding to client with driver.performMultiAction() result: "OK"

Environment

  • Appium version: 1.2.4 with server 1.7.1
  • Last Appium version that did not exhibit the issue (if applicable):
  • Desktop OS/version used to run Appium: Mac OS Sierra
  • Node.js version (unless using Appium.app|exe):
  • Mobile platform/version under test: Android
  • Real device or emulator/simulator: Real Device
  • Appium CLI or Appium.app|exe:
@mykola-mokhnach mykola-mokhnach added the Android related to Android-native driver(s) label Oct 20, 2017
@grvermeulen
Copy link
Author

Any Ideas?

@dancyzheng
Copy link

I also met the same issue with appium 1.7.1 and multiTouchAction. Zoom in doesnt' work on android real device. Even from appium log, it is performed successfull. Have you resolved this?

@grvermeulen
Copy link
Author

Sorry to get back to you so late, unfortunately we haven't resolved the issue yet. So if you have any ideas please let me know.. thanks

@WasiqB
Copy link

WasiqB commented Feb 9, 2018

+1, me too facing same issue. Any updates or workaround for this?

@Akshaj
Copy link

Akshaj commented Jul 26, 2018

As of today July 27th its not working for me either.
Using java-client-5.0.4.jar and Appium v1.8.1.

Below is the code I have used:

touch1.press(width/2, (height/2)-60).waitAction(Duration.ofMillis(1000)).moveTo((width/2)-10,(height/2)-400).release();

touch2.press((width/2)-30, (height/2)+60).waitAction(Duration.ofMillis(1000)).moveTo((width/2)-50,(height/2)+400).release();

MultiTouchAction multi = new MultiTouchAction(driver);
multi.add(touch1).add(touch2).perform();

@mykola-mokhnach
Copy link
Collaborator

I would say this is a third party issue with UIA framework. Perhaps, zooming would work properly with Espresso driver

@jinisrivastava-Mediware

I am also getting same issue multiaction zoom is not working for mobile web application in c# with appium.

@jinisrivastava-Mediware

Still i did not get any success for Zoom action for mobile web application in c#

@lock
Copy link

lock bot commented Mar 17, 2020

This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

@lock lock bot locked and limited conversation to collaborators Mar 17, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Android related to Android-native driver(s)
Projects
None yet
Development

No branches or pull requests

6 participants