You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Nov 29, 2018. It is now read-only.
Selenium Webdriver - 2.42.0
Firefox - 29.0
Ubuntu 14.04
The following scenario fails intermittently. I think it's because "maximize" doesn't
wait for window to be maximized. I would expect "driver.manage.window.maximize" to
wait for window to be maximized.
require "selenium-webdriver"
driver = Selenium::WebDriver.for :firefox
screen_size = driver.execute_script("return [window.screen.availWidth, window.screen.availHeight];")
original_handle = driver.window_handle
begin
(1..20).each do |i|
driver.execute_script('window.open();')
driver.switch_to.window(driver.window_handles[1])
driver.manage.window.maximize
sleep 0.03 # if you aren't able to reproduce, remove sleep; if it's reprodicible
at step 1, increase it
actual_size = driver.execute_script("return [window.outerWidth, window.outerHeight];")
raise "error at iteration #{i}" if screen_size != actual_size
driver.close
driver.switch_to.window(original_handle)
end
ensure
driver.quit
end
Reported by botalov.andrey on 2014-05-28 21:40:32
The text was updated successfully, but these errors were encountered:
I think it should be reopened. From https://github.com/SeleniumHQ/irc-logs/blob/master/2014/06/02.txt:
abotalov: Some days ago I asked here a question about switchToWindow not waiting for
window to be switched. But I was wrong and in reality it waits. However, later on I
found that maximizeWindow also doesn't wait - https://code.google.com/p/selenium/issues/detail?id=7405.
But it was declined. Why?
lukeis: abotalov: i'm not 100% certain why, but that sounds more like a bug for the
spec (if it doesn't clearly state that the response should happen only after the new
size has been established)
abotalov: IMHO the spec is quiet clear here - "After maximizeWindow, the browser window
currently in focus must be left as if the maximise button had been pressed"
abotalov: Or do you think it should be improved?
ato: abotalov: I think #7405 is still an issue, because WD is, by default, meant to
be blocking.
abotalov: ato: so can it be reopened?
ato: So when you call driver.get, you expect the API call to not return before it's
actually done getting the page.
ato: I think the same logic applies to maximizing the window.
ato: barancev: ↑
We discussed this issue again recently, and agreed that windows size manipulation operations
are asynchronous by nature, because we can't control window rendering effects added
by a window manager, and browsers don't provide a callback that would allow to detect
the end of windows size changing process.
Originally reported on Google Code with ID 7405
Reported by
botalov.andrey
on 2014-05-28 21:40:32The text was updated successfully, but these errors were encountered: