How can I get screen width Android in java?
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();
You can get screen width Android and screen height using the below code:
Dimension dimensions = driver.manage().window().getSize();
int screenWidth = dimensions.getWidth();
int screenHeight = dimensions.getHeight();