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;
}
}