How to check if current Orientation is Portrait? – pCloudy – Question and Answers
Home >> Appium Tricks and Tricks >> How to check if current Orientation is ...

How to check if current Orientation is Portrait?



public boolean Method_isCurrentOrientationPortrait(AppiumDriver driver) {
	String ort = driver.getOrientation().name();
	ScreenOrientation orientation = ScreenOrientation.valueOf(ort);

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

	} else {
		return false;
	}
}


Leave a Reply

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