My screen size is (800, 1280)
I have determained the screen size using:
Dimension size = driver.manage().window().getSize();
Now I want to tab at a given coordinates of the screen so can anyone tell me how to do that?
Solution:
Dimension size = driver.manage().window().getSize();
int point_to_tap = (int) (size.getHeight() * 0.5);
int point_to_tap = (int) (size.getWidth() * 0.5);
point_to_tap
as a parameterswipe.tap(point_to_tap_width, point_to_tap_height).perform();
swipe.tap(startx, starty).perform();
But it is giving me NullPointerException
swipe.tap(startx, starty).perform();
but it isn't working
swipe.tap(startx, starty).perform();
but it isn't working