This site is in read only mode. Please continue to browse, but replying, likes, and other actions are disabled for now.
1 / 4
Jul 2018

How do iPhone screen coordinates work? I need element coordinates to use swipe within Appium::TouchAction in my automation test for native application.
Also is there any analogue in iOS to Pointer location in Android?

  • created

    Jul '18
  • last reply

    Jul '18
  • 3

    replies

  • 279

    views

  • 2

    users

  • 1

    link

@quo_vadis

MobileElement element = driver.findElement(MobileBy.xpath("//android.widget.TextView[@text = ‘Top Charts’]"));
Point point = topCharts.getLocation();
int startY = point.y;
int endY = point.y;

int startX = (int) ((driver.manage().window().getSize().getWidth()) * 0.80);
int endX = (int) ((driver.manage().window().getSize().getWidth()) * 0.20);