Skip to content

Commit

Permalink
Work around bug in geckodriver 0.16 / FF 53 that hangs if the same wi…
Browse files Browse the repository at this point in the history
…ndow size is set twice in a row
  • Loading branch information
twalpole committed Apr 24, 2017
1 parent 07f14cf commit 05a1d8d
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion lib/capybara/selenium/driver.rb
Original file line number Diff line number Diff line change
Expand Up @@ -192,7 +192,12 @@ def window_size(handle)

def resize_window_to(handle, width, height)
within_given_window(handle) do
browser.manage.window.resize_to(width, height)
# Don't set the size if already set - See https://github.com/mozilla/geckodriver/issues/643
if marionette? && (window_size(handle) == [width, height])
{}
else
browser.manage.window.resize_to(width, height)
end
end
end

Expand Down

0 comments on commit 05a1d8d

Please sign in to comment.