Skip to content

Taking a screenshot of an AppiumWebElement Returns 500 #261

@pyee-li

Description

@pyee-li

I'm opening Word for UI testing of a new task item:

DesiredCapabilities capabilities = new DesiredCapabilities();
capabilities.SetCapability("app", Path.Combine(programFiles, @"Microsoft Office\root\Office16\WINWORD.EXE"));
capabilities.SetCapability("appArguments", testFile);
capabilities.SetCapability("appWorkingDir", Path.Combine(homedir, "Desktop"));

And setting up a new driver to get past the splash screen issue.

DesiredCapabilities appCapabilities = new DesiredCapabilities();
appCapabilities.SetCapability("app", "Root");
session = new WindowsDriver<WindowsElement>(hostUri, appCapabilities);
word = session.FindElementByName(String.Format("{0} - Word", testFile));

I'm able to get screenshots off of session, but I get a 500 error when getting a screenshot off of word.

==========================================
GET /session/11C9209C-E54E-4B70-A403-6551435E86F6/screenshot/42.852064 HTTP/1.1
Accept: application/json, image/png
Host: 127.0.0.1:4723


HTTP/1.1 500 Internal Error

It seems like the URI getting called is incorrect, per the documentation.

Note I'm using WinAppDriver 1.0-RC. Windows 10 v1703 b15064.540 and VS2017. Appium.WebDriver v3.0.0.2.

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions