About this question
How to detect the screen size for different android phones?
I want the coordinate values like startx, starty, endx, endy. With that I can use the swipe method which takes these coordinates as parameters.
I used
Dimension size = driver.manage().window().getSize();