Found the Hard way for my case:
//give middle position with respect to height
int y_coodinate = (element.getLocation().getY() + element.getLocation().getY()+element.getSize().height) /2;
//give x - x/10 position with respect to width
int x_coodinate = element.getLocation().getX()+element.getSize().width - (element.getLocation().getX()+ element.getLocation().getX()+element.getSize().width)/10;
driver.tap(1, x_coodinate, y_coodinate, 1000);
@VolodymyrGlushkov
Hi, why don't you use TouchAction.
TouchAction action = new TouchAction((MobileDriver) driver);
action.tap(x-cordinate,y-cordinate).perform();
You can get these by turn on Pointer location in your device developer settings
@VolodymyrGlushkov I'm having similar issue... I need to tap on the link "Sign Up" which is part of below element
"You don't have an account? Sign Up".
My complication is that the label "Sign Up" can be on same line or it can be continue to the next line based on screen size.
rest of the label is not tappable
Basically, using x, y may not help... any suggestions on how we can workaround this?
@Prashanth try on same screen:
- switch to webview
- print "driver.getPageSource()". publish it https://gist.github.com/21 and give us a link
@Prashanth if you use latest appium 1.6.5+ just log:
System.out.println(driver.getPageSource());
latest appium can switch to webView itself. if not i will show how to do it later...
you do not need mac :-). to install latest appium in windows you need:
- install nodeJS -> https://nodejs.org/en/1
- in command prompt execute:
npm install -g appium@beta
although it's beta - it has tons of improvements. if you doubt you can install previours like:
npm install -g appium@1.6.5
now all is needed to start appium on windows PC is in command line execute "appium"