-
-
Notifications
You must be signed in to change notification settings - Fork 766
Closed
Description
In AppiumDriver.class pinch and zoom methods
public void pinch(WebElement el) {
public void pinch(int x, int y) {
public void zoom(WebElement el) {
public void zoom(int x, int y) {
if the center point of the element, or the provided x,y coordinates, have a 'y' value that is less than '100' points away from the top or bottom of the device window an exception is throw.
Appium Server: Responding to client with error: {"status":17,"value":{"message":"An error occurred while executing user supplied JavaScript.","origValue":"point is not within the bounds of the screen"},"sessionId":"some session id"}
The bugged lines look like:
TouchAction action0 = new TouchAction(this).press(el, center.getX(), center.getY() - 100).moveTo(el).release();
TouchAction action1 = new TouchAction(this).press(el, center.getX(), center.getY() + 100).moveTo(el).release();
TouchAction action0 = new TouchAction(this).press(x, y-100).moveTo(x, y).release();
TouchAction action1 = new TouchAction(this).press(x, y+100).moveTo(x, y).release();
TouchAction action0 = new TouchAction(this).press(el).moveTo(el, center.getX(), center.getY() - 100).release();
TouchAction action1 = new TouchAction(this).press(el).moveTo(el, center.getX(), center.getY() + 100).release();
TouchAction action0 = new TouchAction(this).press(x, y).moveTo(x, y-100).release();
TouchAction action1 = new TouchAction(this).press(x, y).moveTo(x, y+100).release();
Say for example if my point is (45, 150), my max separation touch points are (45, 50) and (45, 250). This works.
However, if my point is (45, 80), my points are (45, -20) and (45, 180) and the above error will be returned from the client and the test fails.
Metadata
Metadata
Assignees
Labels
No labels