Method: Selenium::WebDriver::Remote::W3C::Bridge#window_size

Defined in:
lib/selenium/webdriver/remote/w3c/bridge.rb

#window_size(handle = :current) ⇒ Object

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.


186
187
188
189
190
191
192
# File 'lib/selenium/webdriver/remote/w3c/bridge.rb', line 186

def window_size(handle = :current)
  raise Error::UnsupportedOperationError, 'Switch to desired window before getting its size' unless handle == :current

  data = execute :get_window_rect

  Dimension.new data['width'], data['height']
end