iOS platform: Screenshots are not honored in landscape mode
See original GitHub issueFor iOS 10.2 device, the screenshots are not capturing in landscape mode. By default they honored in Portrait mode even after setting the capability to landscape.
Environment:
Appium Version: Appium v1.7.2-beta MacOS : 10.13.2 Xcode: 8.3 Device: iPad Pro iOS: 10.2 JavaClient: 5.0.4
Capabilities Used:
DesiredCapabilities capabilities = new DesiredCapabilities();
capabilities.setCapability("preventWDAAttachments", false);
capabilities.setCapability("platformName", "ios");
capabilities.setCapability("automationName", "XCUITest");
capabilities.setCapability("realDeviceLogger", "idevicesyslog");
capabilities.setCapability("platformVersion", "10.2");
capabilities.setCapability("fullReset", false);
capabilities.setCapability("useNewWDA", true);
capabilities.setCapability("noReset", true);
capabilities.setCapability("clearSystemFiles", true);
capabilities.setCapability("xcodeOrgId", "xxxxxxxxx");
capabilities.setCapability("xcodeSigningId", "iPhone Developer");
capabilities.setCapability("deviceName", "xxxx iPad");
capabilities.setCapability("deviceOrientation","landscape")
capabilities.setCapability("newCommandTimeout", 100);
capabilities.setCapability("udid", "bbbb");
capabilities.setCapability("app", "/Users/ctl-user/Downloads/xxxxxx.ipa");
println("Creating local iOS driver")
return capabilities
Screenshotcode:
BufferedImage takeScreenshot()
{
BufferedImage bufferedImage = null
Debug.setDebugLevel(3)
if (driver != null) {
File scrFile = driver.getScreenshotAs(OutputType.FILE)
try {
bufferedImage = ImageIO.read(scrFile)
}
catch (IOException e)
{
e.printStackTrace()
}
}
else
{
throw new ElementNotVisibleException("Element not found - ")
}
return bufferedImage
}
My automation is completely based up on comparing the screens i.e Base VS target . For android platform it is working as expected. I am completely blocked due to this behavior.
Issue Analytics
- State:
- Created 6 years ago
- Comments:21 (3 by maintainers)
Top Results From Across the Web
Fix iPhone Screen Rotation Not Working after iOS 16.2 Update
Open Control center on iPhone X, Swipe finger down from top right notch of the screen. Find the rotate icon and Try with...
Read more >Rotate the screen on your iPhone or iPod touch - Apple Support
If the screen still doesn't rotate, try a different app — like Safari or Messages — which are known to work in landscape...
Read more >UIScrollView does not scroll in landscape mode - test code ...
Uncheck AutoResizeSubview of UIScrollView = NO in XIB under Drawing section and Check Clip SubViews. Refer to https://github.com/jayaprada- ...
Read more >iPhone Screen Not Rotating to Landscape Mode? Here's How ...
You can use AssistiveTouch, an iOS feature that comes in handy when your iPhone Home button isn't working, to force rotate your iPhone's...
Read more >Why create (or not) Landscape App Previews with Portrait ...
Zooms on the UI in a portrait App Preview can be done, but they often look awkward because you are still working with...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
@mykola-mokhnach I verified the fix and is working as intended .
Thank you for the quick help @mykola-mokhnach , @imurchie
This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.