-
Notifications
You must be signed in to change notification settings - Fork 1.5k
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
Calling maximize_window causes script to hang #703
Comments
Hello, I have the same problem with Firefox 53.0, geckodriver 0.16.1 and selenium 3.4.0, either on Windows 10 or on Linux Mint. Edit: using an ugly hack to not set the exact same size each time I use setSize, my test suite seem to work well, confirming that setting the same size is the root of the issue. |
I suspect that this was fixed as part of https://bugzilla.mozilla.org/show_bug.cgi?id=1357878, which is available in Firefox 55 or greater. It would be great if someone could try that out and confirm it works! |
@jeanpylone Setting the window’s size is fundamentally different to maximising: they are two separate endpoints and commands. We had an issue recently where calling Set Window Rect/ |
@andreastt I am still seeing this with 55.0a1 (2017-05-03) (64-bit) |
@davehunt That is odd. What I see locally when the window isn’t maximized:
When I maximize the window manually first, then call The implementation of Maximize Window looks like this: yield new Promise(resolve => {
win.addEventListener("resize", resolve, {once: true});
if (win.windowState == win.STATE_MAXIMIZED) {
win.restore();
} else {
win.maximize();
}
}); That means that |
On further investigation, when the window is manually resized to fit the screen, the code above is supposed to restore the window to its former size. Its former size is the size of the screen, and the window state consequently reports it as maximized. This is why the promise fails to resolve. |
So what happens if the window has the size of the screen when not being maximized, and then you do a |
Yes, I would expect that to trigger the same behaviour because
`window.maximize` tests if it needs to do anything (e.g. is the window
the desired size already, if so, bail out), which will cause `resize` to
never fire.
|
This method has a known issue: mozilla/geckodriver#703
This method has a known issue: mozilla/geckodriver#703
Hi all, Does someone else also get this issue?
Thanks |
@FelipeJK Which Firefox version are you using? Your error isn’t related to this issue, as you can see from your stacktrace. It is complaining about the the fact that the |
@andreastt I am using official Firefox 52 ESR, build 52.1.1. |
@FelipeJK According to https://bugzilla.mozilla.org/show_bug.cgi?id=1347589, the Marionette |
I filed https://bugzilla.mozilla.org/show_bug.cgi?id=1375185 to fix this in Marionette. |
Maximizing cause to browser to hang up See: mozilla/geckodriver#703
@davehunt do you still see this problem with latest Nightly? |
I can no longer replicate this with latest geckodriver and Firefox Nightly. |
This issue has been automatically locked since there has not been any recent activity after it was closed. If you have run into an issue you think is related, please open a new issue. |
In order to help us efficiently investigate your issue, please provide the following information:
Firefox Version
55.0a1 (2017-04-28) (64-bit)
Platform
macOS 10.12.4
Other
geckodriver 0.16.1
selenium 3.4.1 (Python)
Steps to reproduce -
Please provide a description of how to reproduce the problem, including the following essential elements:
No HTML necessary to reproduce bug.
The following script causes a hang until the window is manually resized:
After manually resizing the window, the script continues and the following additional lines are written to the log file:
Note that the window is already maximized when
maximize_window
is called. If I add a sleep and reduce the window size, the script completes as expected. I'm also using two screens, and moving the window to the second screen (where it is no longer taking up the full height/width) before calledmaximize_window
the script still fails as described.The text was updated successfully, but these errors were encountered: