Skip to content
This repository has been archived by the owner on Aug 5, 2020. It is now read-only.

Fails to take screenshot on android device #19

Open
Bcr12 opened this issue Nov 22, 2017 · 0 comments
Open

Fails to take screenshot on android device #19

Bcr12 opened this issue Nov 22, 2017 · 0 comments

Comments

@Bcr12
Copy link

Bcr12 commented Nov 22, 2017

Running tests on an Android device the screenshot fails, taking a screenshot using browser.driver.takeScreenshot() works but calling vr.takeScreenshot() causes unknown error.

Error: Failed: unknown error: operation is unsupported on Android

It looks like this is the problem:

function _getProperties (browser) {
return browser.getCapabilities()
.then(_propertiesFn)
.then(function (properties) {
return browser.manage().window().getSize().then(function (size) {
properties.resolution = size.width + 'x' + size.height;
return properties;
});
});
}

Returning properties outside browser.manage().window().getSize() seems to work.

function _getProperties (browser) {
return browser.getCapabilities()
.then(_propertiesFn)
.then(function (properties) {
//return browser.manage().window().getSize().then(function (size) {
//properties.resolution = size.width + 'x' + size.height;
//return properties;
//});
return properties;
});
}

Will not setting the resolution cause problems?

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant