Method: Selenium::WebDriver::Remote::Bridge#new_window

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

#new_window(type) ⇒ Hash

Create a new top-level browsing context w3c.github.io/webdriver/#new-window

Parameters:

  • type (String)

    Supports two values: ‘tab’ and ‘window’. Use ‘tab’ if you’d like the new window to share an OS-level window with the current browsing context. Use ‘window’ otherwise

Returns:

  • (Hash)

    Containing ‘handle’ with the value of the window handle and ‘type’ with the value of the created window type

[View source]

188
189
190
# File 'lib/selenium/webdriver/remote/bridge.rb', line 188

def new_window(type)
  execute :new_window, {}, {type: type}
end