I am looking for a way to make a right to left swipe that displays the menu in the image. I know I have to use
Mobile.swipe(startX, startY, endX, endY) but I am confused about what should be the values of these parameters in order to achieve that swipe.
Does someone has any input?
Just a guess (i am not familiar with mobile testing) but the coordinates depend on the display resolution.
For a right-to-left swipe, startX may be maxWidth, endX may be 0, startY and endY should be equal and having a value in the middle of the maxHeight (or whatever you like)
You perhaps can use Selenium and get your element’s X and Y position.
def pItem = driver.findElement(By.id('prodText'));
int startY = pItem.getLocation().getY();
int startX = pItem.getLocation().getX();
I don’t think Selenium will help here, since it is about an emulated Android device (or real device).
The display size should be known from the device specs.