@@ -446,8 +446,8 @@ public void zoom(WebElement el) {
446446 Point center = new Point (upperLeft .getX () + dimensions .getWidth () / 2 , upperLeft .getY () + dimensions .getHeight () / 2 );
447447 int yOffset = center .getY () - upperLeft .getY ();
448448
449- TouchAction action0 = new TouchAction (this ).press (el ).moveTo (el , center .getX (), center .getY () - yOffset ).release ();
450- TouchAction action1 = new TouchAction (this ).press (el ).moveTo (el , center .getX (), center .getY () + yOffset ).release ();
449+ TouchAction action0 = new TouchAction (this ).press (center . getX (), center . getY () ).moveTo (el , center .getX (), center .getY () - yOffset ).release ();
450+ TouchAction action1 = new TouchAction (this ).press (center . getX (), center . getY () ).moveTo (el , center .getX (), center .getY () + yOffset ).release ();
451451
452452 multiTouch .add (action0 ).add (action1 );
453453
@@ -477,8 +477,8 @@ public void zoom(int x, int y) {
477477 yOffset = scrHeight - y ;
478478 }
479479
480- TouchAction action0 = new TouchAction (this ).press (x , y ).moveTo (x , y - yOffset ).release ();
481- TouchAction action1 = new TouchAction (this ).press (x , y ).moveTo (x , y + yOffset ).release ();
480+ TouchAction action0 = new TouchAction (this ).press (x , y ).moveTo (0 , - yOffset ).release ();
481+ TouchAction action1 = new TouchAction (this ).press (x , y ).moveTo (0 , yOffset ).release ();
482482
483483 multiTouch .add (action0 ).add (action1 );
484484
0 commit comments