Winappdriver: Screenshot has a little bit of background attached

Created on 5 Aug 2016  路  6Comments  路  Source: microsoft/WinAppDriver

Hey, I'm using Appium with WinAppDriver with Visual Studio 2015 Community Edition to Test a UWP application.

I was doing some screenshots for documentation with

var img = mySession.GetScreenshot();
img.SaveAsFile("D:\\myfile.jpg", ImageFormat.Png);

and after opening the file, there was some parts of the background (maybe 3-10 pixels) over the App border in the image. I don't know, whether this is related to Appium or WinAppDriver, but is there a way to fix this?
A workaround might be to crop the image myself with an Image Tool, like IrfanView, but I would like to avoid that.

Bug

All 6 comments

We're looking at improving the way screenshots are implemented.

Also screenshot seems to not include any of the extra popup windows

A fix to this issue should be coming in v0.8.

Hi @miniksa @khouzam
Issue is not yet fixed. Attached find the screenshot. Appium Desktop 1.0. you can see there is some extra background on all sides of the universal app.
carmoveleticon

Appium Desktop is still using 0.7 version of WinAppDriver. When it is updated, this should be resolved.

If we don't give the path by default where the screen shot will be saved.
Lets say if i say element.GetScreenshot();

Was this page helpful?
0 / 5 - 0 ratings