Method: Selenium::Client::GeneratedDriver#open_window

Defined in:
lib/selenium/client/legacy_driver.rb

#open_window(url, windowID) ⇒ Object

Opens a popup window (if a window with that ID isn’t already open). After opening the window, you’ll need to select it using the selectWindow command.

This command can also be a useful workaround for bug SEL-339. In some cases, Selenium will be unable to intercept a call to window.open (if the call occurs during or before the “onLoad” event, for example). In those cases, you can force Selenium to notice the open window’s name by using the Selenium openWindow command, using an empty (blank) url, like this: openWindow(“”, “myFunnyWindow”).

‘url’ is the URL to open, which can be blank ‘windowID’ is the JavaScript window ID of the window to select


587
588
589
# File 'lib/selenium/client/legacy_driver.rb', line 587

def open_window(url,windowID)
    remote_control_command("openWindow", [url,windowID,])
end