Hi all,
My code are below:AppiumLog.txt (39.2 KB)
AppiumServerOnWindows appium = new AppiumServerOnWindows();
appium.startAppium3();
Thread.sleep(5000);
appium.setUp();
Thread.sleep(10000);
WebElement we;
we = appium.driver.findElement(By.xpath("//android.widget.FrameLayout[1]/android.widget.LinearLayout[1]/android.widget.FrameLayout[1]/android.webkit.WebView[1]/android.view.View[1]/android.widget.Button"));
//we.click(); // -> it hasn’t any exception but it doesn’t work so i use tap() function instead
appium.driver.tap(1, we.getLocation().x + (we.getSize().width/2), we.getLocation().y + (we.getSize().height/2), 300);
*** I’m testing on Native app on Android Emulator (Android 4.4.2 - API 19) on Windows 7 with Appium for Window (1.4.0 latest version for windows).
*** My code is try to click on a button. The .click() function hasn’t any exception but it doesn’t work and i try to use .tap() instead but it throws exception below:
[debug] Pushing command to appium work queue: [“element:touchDown”,{“x”:730,“y”:712}]
[debug] [BOOTSTRAP] [debug] Got data from client: {“cmd”:“action”,“action”:“element:touchDown”,“params”:{“x”:730,“y”:712}}
[debug] [BOOTSTRAP] [debug] Got command of type ACTION
[debug] [BOOTSTRAP] [debug] Got command action: touchDown
[debug] Responding to client with error: {“status”:29,“value”:{“message”:“The coordinates provided to an interactions operation are invalid.”,“origValue”:“Coordinate [x=730.0, y=712.0] is outside of element rect: [0,0][490,796]”},“sessionId”:“a7324862-0997-446c-a9b9-b338f436cb4e”}
e[37m<-- POST /wd/hub/session/a7324862-0997-446c-a9b9-b338f436cb4e/touch/perform e[39me[31m500e[39me[90m 92.080 ms - 240e[39m e[90me[39m
[debug] [BOOTSTRAP] [debug] Display bounds: [0,0][490,796]
[debug] [BOOTSTRAP] [debug] Returning result: {“value”:“Coordinate [x=730.0, y=712.0] is outside of element rect: [0,0][490,796]”,“status”:29}
Exception:
org.openqa.selenium.interactions.InvalidCoordinatesException: The coordinates provided to an interactions operation are invalid
…
(the Appium Log file is uploaded with this topic)
Please help me, thanks in advance