Method: Capybara::Window#resize_to

Defined in:
lib/capybara/window.rb

#resize_to(width, height) ⇒ Object

Resize window.

If this method was called for window that is not current, then after calling this method current window should remain the same as it was before calling this method.

Parameters:

  • width (Integer)

    the new window width in pixels

  • height (Integer)

    the new window height in pixels



88
89
90
# File 'lib/capybara/window.rb', line 88

def resize_to(width, height)
  wait_for_stable_size { @driver.resize_window_to(handle, width, height) }
end