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

(Jenkins / Xvfb) Failed to change window state to maximized #70

Open
thymian-garden opened this issue Jun 14, 2018 · 0 comments
Open

(Jenkins / Xvfb) Failed to change window state to maximized #70

thymian-garden opened this issue Jun 14, 2018 · 0 comments

Comments

@thymian-garden
Copy link

thymian-garden commented Jun 14, 2018

Hi,
thanks for this project, it is very helpful!
However, I have this problem every time I run my tests on my Jenkins instance:
WebDriverError: unknown error: failed to change window state to maximized, current state is normal (Session info: chrome=67.0.3396.62) (Driver info: chromedriver=2.38.552522 (...),platform=Linux 4.15.0
I am using Xvfb with the following command: Xvfb :0 -ac -screen 0 1600x1200x24
The problem seems kind of similar to this: https://bugs.chromium.org/p/chromedriver/issues/detail?id=1901
So I tried out what happens when I delete the line driver.manage().window().maximize();... and it really makes the tests run successfully.
Would it make sense to have a parameter that allows passing a window size, and if set, the driver setup code would use driver.manage().window().setSize(windowSize); instead of driver.manage().window().maximize();?
Best regards!

edit/P.S.: My current workaround is running the following command before each execution: sed -i s/maximize\(\)/setSize\(1500,1100\)/g ./node_modules/selenium-cucumber-js/runtime/chromeDriver.js (but this is obviously a very dirty hack and I'd like to get rid of it)

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