Why Appium takes landscape screenshot on Samsung Note 10.1 tab. Any leads, much appreciated

Appium is not able to take screenshot in portrait mode for android app running in portrait mode on Samsung note 10.1

I tried with below code for Galaxy S4 portrait mode it works. screenshot will save in root folder of project directory

WebDriver driver1 = new Augmenter().augment(driver);
File file = ((TakesScreenshot)driver1).getScreenshotAs(OutputType.FILE);
FileUtils.copyFile(file, new File(“Screenshot.jpg”));

Similar code I am using, its working fine for mobile devices but when I run same piece of code on samsung tabs, it takes screenshots only in Landscape mode, is it any device specific issue.

1 Like

Run the Android SDK’s uiautomatorviewer tool on your machine, and then take a screenshot in the same spot in your application as Appium is taking a screenshot. Is the image also inlandscape mode for uiautomatorviewer?