How to check if current Orientation is LandScape?


public boolean isCurrentOrientationLandScape(AppiumDriver driver) {

	String ort = driver.getOrientation().name();
	ScreenOrientation orientation = ScreenOrientation.valueOf(ort);

	if (orientation == ScreenOrientation.LANDSCAPE) {
		return true;

	} else {
		return false;
	}
}


Leave a Reply

Your email address will not be published. Required fields are marked *