Skip to content
New issue

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

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

Already on GitHub? Sign in to your account

windowSize not working as described #23

Open
jmhomedes opened this issue May 29, 2016 · 0 comments
Open

windowSize not working as described #23

jmhomedes opened this issue May 29, 2016 · 0 comments

Comments

@jmhomedes
Copy link
Contributor

jmhomedes commented May 29, 2016

At least in my case, working with Windows 8 x64, I've seen that with default configuration gemini is taking screenshots at 400x300 resolution. If I try to configure it on my way as described in documentation:
`
geminiOptions: {
browsers: {
"chrome-latest": {
desiredCapabilities: {
browserName: 'chrome',
version: '37.0'
}
}
},
windowSize: '1200x720'

}
`
it keeps taking screenshots at same 400x300 resolution.

Looking at the code in visualtest project's index.js I found windowSize default configured with 1024x768, so at the time of geminiOptions objects merge is the same as providing it via task runner. Same object structure. Both not working.

Then I had a look on gemini's project code and found that seems like gemini Config constructor receives correctly windowSize property inside the object param. Then it calls
var parsed = parseOptions({ options: **configData**, env: process.env, argv: process.argv });
and windowSize property keeps at root level (parsed.windowSize). The problem with it is then, constructor does
this.system = parsed.system; this._browsers = parsed.browsers;
so parsed object's root properties seems to get lost after that.

Conclusion:

finally I got it working providing windowSize at browser level (and maybe you should consider to change it in geminiOptions object if it's a generalized issue):
geminiOptions: { browsers: { "chrome-latest": { desiredCapabilities: { browserName: 'chrome', version: '37.0' }, windowSize: '1200x720' } } }
Important: is at "chrome-latest" object root level, not inside desiredCapabilities

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

No branches or pull requests

1 participant