Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Taking a screenshot of an AppiumWebElement Returns 500 #261

Closed
pyee-li opened this issue Sep 8, 2017 · 3 comments
Closed

Taking a screenshot of an AppiumWebElement Returns 500 #261

pyee-li opened this issue Sep 8, 2017 · 3 comments
Assignees
Labels

Comments

@pyee-li
Copy link

pyee-li commented Sep 8, 2017

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.

@timotiusmargo
Copy link
Contributor

Hi @pyee-li,

Thank you for bringing it up. It is a valid issue and I have a fix that will be included in the next release. This will be pushed out very soon. For the time being, you can always get a screenshot of the Microsoft Word session (session that points to the Word application) the same way that you do for the Desktop session you showed above.

@pyee-li
Copy link
Author

pyee-li commented Sep 18, 2017

Thanks @timotiusmargo for the quick turnaround.

@khouzam
Copy link
Contributor

khouzam commented Oct 5, 2017

This should be addressed by our RC2 release.

Thanks for the patience.

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants