| <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" |
| "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> |
| <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> |
| <head> |
| <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> |
| <title> |
| Module: Selenium::Client::GeneratedDriver |
| |
| — Documentation by YARD 0.8.1 |
| |
| </title> |
| |
| <link rel="stylesheet" href="../../css/style.css" type="text/css" media="screen" charset="utf-8" /> |
| |
| <link rel="stylesheet" href="../../css/common.css" type="text/css" media="screen" charset="utf-8" /> |
| |
| <script type="text/javascript" charset="utf-8"> |
| hasFrames = window.top.frames.main ? true : false; |
| relpath = '../../'; |
| framesUrl = "../../frames.html#!" + escape(window.location.href); |
| </script> |
| |
| |
| <script type="text/javascript" charset="utf-8" src="../../js/jquery.js"></script> |
| |
| <script type="text/javascript" charset="utf-8" src="../../js/app.js"></script> |
| |
| |
| </head> |
| <body> |
| <div id="header"> |
| <div id="menu"> |
| |
| <a href="../../_index.html">Index (G)</a> » |
| <span class='title'><span class='object_link'><a href="../../Selenium.html" title="Selenium (module)">Selenium</a></span></span> » <span class='title'><span class='object_link'><a href="../Client.html" title="Selenium::Client (module)">Client</a></span></span> |
| » |
| <span class="title">GeneratedDriver</span> |
| |
| |
| <div class="noframes"><span class="title">(</span><a href="." target="_top">no frames</a><span class="title">)</span></div> |
| </div> |
| |
| <div id="search"> |
| |
| <a class="full_list_link" id="class_list_link" |
| href="../../class_list.html"> |
| Class List |
| </a> |
| |
| <a class="full_list_link" id="method_list_link" |
| href="../../method_list.html"> |
| Method List |
| </a> |
| |
| <a class="full_list_link" id="file_list_link" |
| href="../../file_list.html"> |
| File List |
| </a> |
| |
| </div> |
| <div class="clear"></div> |
| </div> |
| |
| <iframe id="search_frame"></iframe> |
| |
| <div id="content"><h1>Module: Selenium::Client::GeneratedDriver |
| |
| |
| |
| </h1> |
| |
| <dl class="box"> |
| |
| |
| |
| |
| |
| |
| |
| <dt class="r1">Included in:</dt> |
| <dd class="r1"><span class='object_link'><a href="Base.html" title="Selenium::Client::Base (module)">Base</a></span></dd> |
| |
| |
| |
| <dt class="r2 last">Defined in:</dt> |
| <dd class="r2 last">rb/lib/selenium/client/legacy_driver.rb</dd> |
| |
| </dl> |
| <div class="clear"></div> |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| <h2> |
| Instance Method Summary |
| <small>(<a href="#" class="summary_toggle">collapse</a>)</small> |
| </h2> |
| |
| <ul class="summary"> |
| |
| <li class="public "> |
| <span class="summary_signature"> |
| |
| <a href="#add_location_strategy-instance_method" title="#add_location_strategy (instance method)">- (Object) <strong>add_location_strategy</strong>(strategyName, functionDefinition) </a> |
| |
| |
| |
| </span> |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| <span class="summary_desc"><div class='inline'> |
| <p>Defines a new function for Selenium to locate elements on the page.</p> |
| </div></span> |
| |
| </li> |
| |
| |
| <li class="public "> |
| <span class="summary_signature"> |
| |
| <a href="#add_script-instance_method" title="#add_script (instance method)">- (Object) <strong>add_script</strong>(scriptContent, scriptTagId) </a> |
| |
| |
| |
| </span> |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| <span class="summary_desc"><div class='inline'> |
| <p>Loads script content into a new script tag in the Selenium document.</p> |
| </div></span> |
| |
| </li> |
| |
| |
| <li class="public "> |
| <span class="summary_signature"> |
| |
| <a href="#add_selection-instance_method" title="#add_selection (instance method)">- (Object) <strong>add_selection</strong>(locator, optionLocator) </a> |
| |
| |
| |
| </span> |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| <span class="summary_desc"><div class='inline'> |
| <p>Add a selection to the set of selected options in a multi-select element |
| using an option locator.</p> |
| </div></span> |
| |
| </li> |
| |
| |
| <li class="public "> |
| <span class="summary_signature"> |
| |
| <a href="#allow_native_xpath-instance_method" title="#allow_native_xpath (instance method)">- (Object) <strong>allow_native_xpath</strong>(allow) </a> |
| |
| |
| |
| </span> |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| <span class="summary_desc"><div class='inline'> |
| <p>Specifies whether Selenium should use the native in-browser implementation |
| of XPath (if any native version is available); if you pass "false" to this |
| function, we will always use our pure-JavaScript xpath library.</p> |
| </div></span> |
| |
| </li> |
| |
| |
| <li class="public "> |
| <span class="summary_signature"> |
| |
| <a href="#alt_key_down-instance_method" title="#alt_key_down (instance method)">- (Object) <strong>alt_key_down</strong> </a> |
| |
| |
| |
| </span> |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| <span class="summary_desc"><div class='inline'> |
| <p>Press the alt key and hold it down until doAltUp() is called or a new page |
| is loaded.</p> |
| </div></span> |
| |
| </li> |
| |
| |
| <li class="public "> |
| <span class="summary_signature"> |
| |
| <a href="#alt_key_up-instance_method" title="#alt_key_up (instance method)">- (Object) <strong>alt_key_up</strong> </a> |
| |
| |
| |
| </span> |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| <span class="summary_desc"><div class='inline'> |
| <p>Release the alt key.</p> |
| </div></span> |
| |
| </li> |
| |
| |
| <li class="public "> |
| <span class="summary_signature"> |
| |
| <a href="#answer_on_next_prompt-instance_method" title="#answer_on_next_prompt (instance method)">- (Object) <strong>answer_on_next_prompt</strong>(answer) </a> |
| |
| |
| |
| </span> |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| <span class="summary_desc"><div class='inline'> |
| <p>Instructs Selenium to return the specified answer string in response to the |
| next JavaScript prompt [window.prompt()].</p> |
| </div></span> |
| |
| </li> |
| |
| |
| <li class="public "> |
| <span class="summary_signature"> |
| |
| <a href="#assign_id-instance_method" title="#assign_id (instance method)">- (Object) <strong>assign_id</strong>(locator, identifier) </a> |
| |
| |
| |
| </span> |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| <span class="summary_desc"><div class='inline'> |
| <p>Temporarily sets the "id" attribute of the specified element, so you can |
| locate it in the future using its ID rather than a slow/complicated XPath.</p> |
| </div></span> |
| |
| </li> |
| |
| |
| <li class="public "> |
| <span class="summary_signature"> |
| |
| <a href="#attach_file-instance_method" title="#attach_file (instance method)">- (Object) <strong>attach_file</strong>(fieldLocator, fileLocator) </a> |
| |
| |
| |
| </span> |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| <span class="summary_desc"><div class='inline'> |
| <p>Sets a file input (upload) field to the file listed in fileLocator.</p> |
| </div></span> |
| |
| </li> |
| |
| |
| <li class="public "> |
| <span class="summary_signature"> |
| |
| <a href="#capture_entire_page_screenshot-instance_method" title="#capture_entire_page_screenshot (instance method)">- (Object) <strong>capture_entire_page_screenshot</strong>(filename, kwargs) </a> |
| |
| |
| |
| </span> |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| <span class="summary_desc"><div class='inline'> |
| <p>Saves the entire contents of the current window canvas to a PNG file.</p> |
| </div></span> |
| |
| </li> |
| |
| |
| <li class="public "> |
| <span class="summary_signature"> |
| |
| <a href="#capture_entire_page_screenshot_to_string-instance_method" title="#capture_entire_page_screenshot_to_string (instance method)">- (Object) <strong>capture_entire_page_screenshot_to_string</strong>(kwargs) </a> |
| |
| |
| |
| </span> |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| <span class="summary_desc"><div class='inline'> |
| <p>Downloads a screenshot of the browser current window canvas to a based 64 |
| encoded PNG file.</p> |
| </div></span> |
| |
| </li> |
| |
| |
| <li class="public "> |
| <span class="summary_signature"> |
| |
| <a href="#capture_screenshot-instance_method" title="#capture_screenshot (instance method)">- (Object) <strong>capture_screenshot</strong>(filename) </a> |
| |
| |
| |
| </span> |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| <span class="summary_desc"><div class='inline'> |
| <p>Captures a PNG screenshot to the specified file.</p> |
| </div></span> |
| |
| </li> |
| |
| |
| <li class="public "> |
| <span class="summary_signature"> |
| |
| <a href="#capture_screenshot_to_string-instance_method" title="#capture_screenshot_to_string (instance method)">- (Object) <strong>capture_screenshot_to_string</strong> </a> |
| |
| |
| |
| </span> |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| <span class="summary_desc"><div class='inline'> |
| <p>Capture a PNG screenshot.</p> |
| </div></span> |
| |
| </li> |
| |
| |
| <li class="public "> |
| <span class="summary_signature"> |
| |
| <a href="#check-instance_method" title="#check (instance method)">- (Object) <strong>check</strong>(locator) </a> |
| |
| |
| |
| </span> |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| <span class="summary_desc"><div class='inline'> |
| <p>Check a toggle-button (checkbox/radio).</p> |
| </div></span> |
| |
| </li> |
| |
| |
| <li class="public "> |
| <span class="summary_signature"> |
| |
| <a href="#choose_cancel_on_next_confirmation-instance_method" title="#choose_cancel_on_next_confirmation (instance method)">- (Object) <strong>choose_cancel_on_next_confirmation</strong> </a> |
| |
| |
| |
| </span> |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| <span class="summary_desc"><div class='inline'> |
| <p>By default, Selenium's overridden window.confirm() function will return |
| true, as if the user had manually clicked OK; after running this command, |
| the next call to confirm() will return false, as if the user had clicked |
| Cancel.</p> |
| </div></span> |
| |
| </li> |
| |
| |
| <li class="public "> |
| <span class="summary_signature"> |
| |
| <a href="#choose_ok_on_next_confirmation-instance_method" title="#choose_ok_on_next_confirmation (instance method)">- (Object) <strong>choose_ok_on_next_confirmation</strong> </a> |
| |
| |
| |
| </span> |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| <span class="summary_desc"><div class='inline'> |
| <p>Undo the effect of calling chooseCancelOnNextConfirmation.</p> |
| </div></span> |
| |
| </li> |
| |
| |
| <li class="public "> |
| <span class="summary_signature"> |
| |
| <a href="#click-instance_method" title="#click (instance method)">- (Object) <strong>click</strong>(locator) </a> |
| |
| |
| |
| </span> |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| <span class="summary_desc"><div class='inline'> |
| <p>Clicks on a link, button, checkbox or radio button.</p> |
| </div></span> |
| |
| </li> |
| |
| |
| <li class="public "> |
| <span class="summary_signature"> |
| |
| <a href="#click_at-instance_method" title="#click_at (instance method)">- (Object) <strong>click_at</strong>(locator, coordString) </a> |
| |
| |
| |
| </span> |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| <span class="summary_desc"><div class='inline'> |
| <p>Clicks on a link, button, checkbox or radio button.</p> |
| </div></span> |
| |
| </li> |
| |
| |
| <li class="public "> |
| <span class="summary_signature"> |
| |
| <a href="#close-instance_method" title="#close (instance method)">- (Object) <strong>close</strong> </a> |
| |
| |
| |
| </span> |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| <span class="summary_desc"><div class='inline'> |
| <p>Simulates the user clicking the "close" button in the titlebar of a popup |
| window or tab.</p> |
| </div></span> |
| |
| </li> |
| |
| |
| <li class="public "> |
| <span class="summary_signature"> |
| |
| <a href="#context_menu-instance_method" title="#context_menu (instance method)">- (Object) <strong>context_menu</strong>(locator) </a> |
| |
| |
| |
| </span> |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| <span class="summary_desc"><div class='inline'> |
| <p>Simulates opening the context menu for the specified element (as might |
| happen if the user "right-clicked" on the element).</p> |
| </div></span> |
| |
| </li> |
| |
| |
| <li class="public "> |
| <span class="summary_signature"> |
| |
| <a href="#context_menu_at-instance_method" title="#context_menu_at (instance method)">- (Object) <strong>context_menu_at</strong>(locator, coordString) </a> |
| |
| |
| |
| </span> |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| <span class="summary_desc"><div class='inline'> |
| <p>Simulates opening the context menu for the specified element (as might |
| happen if the user "right-clicked" on the element).</p> |
| </div></span> |
| |
| </li> |
| |
| |
| <li class="public "> |
| <span class="summary_signature"> |
| |
| <a href="#control_key_down-instance_method" title="#control_key_down (instance method)">- (Object) <strong>control_key_down</strong> </a> |
| |
| |
| |
| </span> |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| <span class="summary_desc"><div class='inline'> |
| <p>Press the control key and hold it down until doControlUp() is called or a |
| new page is loaded.</p> |
| </div></span> |
| |
| </li> |
| |
| |
| <li class="public "> |
| <span class="summary_signature"> |
| |
| <a href="#control_key_up-instance_method" title="#control_key_up (instance method)">- (Object) <strong>control_key_up</strong> </a> |
| |
| |
| |
| </span> |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| <span class="summary_desc"><div class='inline'> |
| <p>Release the control key.</p> |
| </div></span> |
| |
| </li> |
| |
| |
| <li class="public "> |
| <span class="summary_signature"> |
| |
| <a href="#create_cookie-instance_method" title="#create_cookie (instance method)">- (Object) <strong>create_cookie</strong>(nameValuePair, optionsString) </a> |
| |
| |
| |
| </span> |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| <span class="summary_desc"><div class='inline'> |
| <p>Create a new cookie whose path and domain are same with those of current |
| page under test, unless you specified a path for this cookie explicitly.</p> |
| </div></span> |
| |
| </li> |
| |
| |
| <li class="public "> |
| <span class="summary_signature"> |
| |
| <a href="#delete_all_visible_cookies-instance_method" title="#delete_all_visible_cookies (instance method)">- (Object) <strong>delete_all_visible_cookies</strong> </a> |
| |
| |
| |
| </span> |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| <span class="summary_desc"><div class='inline'> |
| <p>Calls deleteCookie with recurse=true on all cookies visible to the current |
| page.</p> |
| </div></span> |
| |
| </li> |
| |
| |
| <li class="public "> |
| <span class="summary_signature"> |
| |
| <a href="#delete_cookie-instance_method" title="#delete_cookie (instance method)">- (Object) <strong>delete_cookie</strong>(name, optionsString) </a> |
| |
| |
| |
| </span> |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| <span class="summary_desc"><div class='inline'> |
| <p>Delete a named cookie with specified path and domain.</p> |
| </div></span> |
| |
| </li> |
| |
| |
| <li class="public "> |
| <span class="summary_signature"> |
| |
| <a href="#deselect_pop_up-instance_method" title="#deselect_pop_up (instance method)">- (Object) <strong>deselect_pop_up</strong> </a> |
| |
| |
| |
| </span> |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| <span class="summary_desc"><div class='inline'> |
| <p>Selects the main window.</p> |
| </div></span> |
| |
| </li> |
| |
| |
| <li class="public "> |
| <span class="summary_signature"> |
| |
| <a href="#double_click-instance_method" title="#double_click (instance method)">- (Object) <strong>double_click</strong>(locator) </a> |
| |
| |
| |
| </span> |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| <span class="summary_desc"><div class='inline'> |
| <p>Double clicks on a link, button, checkbox or radio button.</p> |
| </div></span> |
| |
| </li> |
| |
| |
| <li class="public "> |
| <span class="summary_signature"> |
| |
| <a href="#double_click_at-instance_method" title="#double_click_at (instance method)">- (Object) <strong>double_click_at</strong>(locator, coordString) </a> |
| |
| |
| |
| </span> |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| <span class="summary_desc"><div class='inline'> |
| <p>Doubleclicks on a link, button, checkbox or radio button.</p> |
| </div></span> |
| |
| </li> |
| |
| |
| <li class="public "> |
| <span class="summary_signature"> |
| |
| <a href="#drag_and_drop-instance_method" title="#drag_and_drop (instance method)">- (Object) <strong>drag_and_drop</strong>(locator, movementsString) </a> |
| |
| |
| |
| </span> |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| <span class="summary_desc"><div class='inline'> |
| <p>Drags an element a certain distance and then drops it.</p> |
| </div></span> |
| |
| </li> |
| |
| |
| <li class="public "> |
| <span class="summary_signature"> |
| |
| <a href="#drag_and_drop_to_object-instance_method" title="#drag_and_drop_to_object (instance method)">- (Object) <strong>drag_and_drop_to_object</strong>(locatorOfObjectToBeDragged, locatorOfDragDestinationObject) </a> |
| |
| |
| |
| </span> |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| <span class="summary_desc"><div class='inline'> |
| <p>Drags an element and drops it on another element.</p> |
| </div></span> |
| |
| </li> |
| |
| |
| <li class="public "> |
| <span class="summary_signature"> |
| |
| <a href="#dragdrop-instance_method" title="#dragdrop (instance method)">- (Object) <strong>dragdrop</strong>(locator, movementsString) </a> |
| |
| |
| |
| </span> |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| <span class="summary_desc"><div class='inline'> |
| <p>deprecated - use dragAndDrop instead.</p> |
| </div></span> |
| |
| </li> |
| |
| |
| <li class="public "> |
| <span class="summary_signature"> |
| |
| <a href="#fire_event-instance_method" title="#fire_event (instance method)">- (Object) <strong>fire_event</strong>(locator, eventName) </a> |
| |
| |
| |
| </span> |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| <span class="summary_desc"><div class='inline'> |
| <p>Explicitly simulate an event, to trigger the corresponding |
| "on<em>event</em>" handler.</p> |
| </div></span> |
| |
| </li> |
| |
| |
| <li class="public "> |
| <span class="summary_signature"> |
| |
| <a href="#focus-instance_method" title="#focus (instance method)">- (Object) <strong>focus</strong>(locator) </a> |
| |
| |
| |
| </span> |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| <span class="summary_desc"><div class='inline'> |
| <p>Move the focus to the specified element; for example, if the element is an |
| input field, move the cursor to that field.</p> |
| </div></span> |
| |
| </li> |
| |
| |
| <li class="public "> |
| <span class="summary_signature"> |
| |
| <a href="#get_alert-instance_method" title="#get_alert (instance method)">- (Object) <strong>get_alert</strong> </a> |
| |
| |
| |
| </span> |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| <span class="summary_desc"><div class='inline'> |
| <p>Retrieves the message of a JavaScript alert generated during the previous |
| action, or fail if there were no alerts.</p> |
| </div></span> |
| |
| </li> |
| |
| |
| <li class="public "> |
| <span class="summary_signature"> |
| |
| <a href="#get_all_buttons-instance_method" title="#get_all_buttons (instance method)">- (Object) <strong>get_all_buttons</strong> </a> |
| |
| |
| |
| </span> |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| <span class="summary_desc"><div class='inline'> |
| <p>Returns the IDs of all buttons on the page.</p> |
| </div></span> |
| |
| </li> |
| |
| |
| <li class="public "> |
| <span class="summary_signature"> |
| |
| <a href="#get_all_fields-instance_method" title="#get_all_fields (instance method)">- (Object) <strong>get_all_fields</strong> </a> |
| |
| |
| |
| </span> |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| <span class="summary_desc"><div class='inline'> |
| <p>Returns the IDs of all input fields on the page.</p> |
| </div></span> |
| |
| </li> |
| |
| |
| <li class="public "> |
| <span class="summary_signature"> |
| |
| <a href="#get_all_links-instance_method" title="#get_all_links (instance method)">- (Object) <strong>get_all_links</strong> </a> |
| |
| |
| |
| </span> |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| <span class="summary_desc"><div class='inline'> |
| <p>Returns the IDs of all links on the page.</p> |
| </div></span> |
| |
| </li> |
| |
| |
| <li class="public "> |
| <span class="summary_signature"> |
| |
| <a href="#get_all_window_ids-instance_method" title="#get_all_window_ids (instance method)">- (Object) <strong>get_all_window_ids</strong> </a> |
| |
| |
| |
| </span> |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| <span class="summary_desc"><div class='inline'> |
| <p>Returns the IDs of all windows that the browser knows about in an array.</p> |
| </div></span> |
| |
| </li> |
| |
| |
| <li class="public "> |
| <span class="summary_signature"> |
| |
| <a href="#get_all_window_names-instance_method" title="#get_all_window_names (instance method)">- (Object) <strong>get_all_window_names</strong> </a> |
| |
| |
| |
| </span> |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| <span class="summary_desc"><div class='inline'> |
| <p>Returns the names of all windows that the browser knows about in an array.</p> |
| </div></span> |
| |
| </li> |
| |
| |
| <li class="public "> |
| <span class="summary_signature"> |
| |
| <a href="#get_all_window_titles-instance_method" title="#get_all_window_titles (instance method)">- (Object) <strong>get_all_window_titles</strong> </a> |
| |
| |
| |
| </span> |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| <span class="summary_desc"><div class='inline'> |
| <p>Returns the titles of all windows that the browser knows about in an array.</p> |
| </div></span> |
| |
| </li> |
| |
| |
| <li class="public "> |
| <span class="summary_signature"> |
| |
| <a href="#get_attribute-instance_method" title="#get_attribute (instance method)">- (Object) <strong>get_attribute</strong>(attributeLocator) </a> |
| |
| |
| |
| </span> |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| <span class="summary_desc"><div class='inline'> |
| <p>Gets the value of an element attribute.</p> |
| </div></span> |
| |
| </li> |
| |
| |
| <li class="public "> |
| <span class="summary_signature"> |
| |
| <a href="#get_attribute_from_all_windows-instance_method" title="#get_attribute_from_all_windows (instance method)">- (Object) <strong>get_attribute_from_all_windows</strong>(attributeName) </a> |
| |
| |
| |
| </span> |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| <span class="summary_desc"><div class='inline'> |
| <p>Returns an array of JavaScript property values from all known windows |
| having one.</p> |
| </div></span> |
| |
| </li> |
| |
| |
| <li class="public "> |
| <span class="summary_signature"> |
| |
| <a href="#get_body_text-instance_method" title="#get_body_text (instance method)">- (Object) <strong>get_body_text</strong> </a> |
| |
| |
| |
| </span> |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| <span class="summary_desc"><div class='inline'> |
| <p>Gets the entire text of the page.</p> |
| </div></span> |
| |
| </li> |
| |
| |
| <li class="public "> |
| <span class="summary_signature"> |
| |
| <a href="#get_confirmation-instance_method" title="#get_confirmation (instance method)">- (Object) <strong>get_confirmation</strong> </a> |
| |
| |
| |
| </span> |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| <span class="summary_desc"><div class='inline'> |
| <p>Retrieves the message of a JavaScript confirmation dialog generated during |
| the previous action.</p> |
| </div></span> |
| |
| </li> |
| |
| |
| <li class="public "> |
| <span class="summary_signature"> |
| |
| <a href="#get_cookie-instance_method" title="#get_cookie (instance method)">- (Object) <strong>get_cookie</strong> </a> |
| |
| |
| |
| </span> |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| <span class="summary_desc"><div class='inline'> |
| <p>Return all cookies of the current page under test.</p> |
| </div></span> |
| |
| </li> |
| |
| |
| <li class="public "> |
| <span class="summary_signature"> |
| |
| <a href="#get_cookie_by_name-instance_method" title="#get_cookie_by_name (instance method)">- (Object) <strong>get_cookie_by_name</strong>(name) </a> |
| |
| |
| |
| </span> |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| <span class="summary_desc"><div class='inline'> |
| <p>Returns the value of the cookie with the specified name, or throws an error |
| if the cookie is not present.</p> |
| </div></span> |
| |
| </li> |
| |
| |
| <li class="public "> |
| <span class="summary_signature"> |
| |
| <a href="#get_css_count-instance_method" title="#get_css_count (instance method)">- (Object) <strong>get_css_count</strong>(css) </a> |
| |
| |
| |
| </span> |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| <span class="summary_desc"><div class='inline'> |
| <p>Returns the number of nodes that match the specified css selector, eg.</p> |
| </div></span> |
| |
| </li> |
| |
| |
| <li class="public "> |
| <span class="summary_signature"> |
| |
| <a href="#get_cursor_position-instance_method" title="#get_cursor_position (instance method)">- (Object) <strong>get_cursor_position</strong>(locator) </a> |
| |
| |
| |
| </span> |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| <span class="summary_desc"><div class='inline'> |
| <p>Retrieves the text cursor position in the given input element or textarea; |
| beware, this may not work perfectly on all browsers.</p> |
| </div></span> |
| |
| </li> |
| |
| |
| <li class="public "> |
| <span class="summary_signature"> |
| |
| <a href="#get_element_height-instance_method" title="#get_element_height (instance method)">- (Object) <strong>get_element_height</strong>(locator) </a> |
| |
| |
| |
| </span> |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| <span class="summary_desc"><div class='inline'> |
| <p>Retrieves the height of an element.</p> |
| </div></span> |
| |
| </li> |
| |
| |
| <li class="public "> |
| <span class="summary_signature"> |
| |
| <a href="#get_element_index-instance_method" title="#get_element_index (instance method)">- (Object) <strong>get_element_index</strong>(locator) </a> |
| |
| |
| |
| </span> |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| <span class="summary_desc"><div class='inline'> |
| <p>Get the relative index of an element to its parent (starting from 0).</p> |
| </div></span> |
| |
| </li> |
| |
| |
| <li class="public "> |
| <span class="summary_signature"> |
| |
| <a href="#get_element_position_left-instance_method" title="#get_element_position_left (instance method)">- (Object) <strong>get_element_position_left</strong>(locator) </a> |
| |
| |
| |
| </span> |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| <span class="summary_desc"><div class='inline'> |
| <p>Retrieves the horizontal position of an element.</p> |
| </div></span> |
| |
| </li> |
| |
| |
| <li class="public "> |
| <span class="summary_signature"> |
| |
| <a href="#get_element_position_top-instance_method" title="#get_element_position_top (instance method)">- (Object) <strong>get_element_position_top</strong>(locator) </a> |
| |
| |
| |
| </span> |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| <span class="summary_desc"><div class='inline'> |
| <p>Retrieves the vertical position of an element.</p> |
| </div></span> |
| |
| </li> |
| |
| |
| <li class="public "> |
| <span class="summary_signature"> |
| |
| <a href="#get_element_width-instance_method" title="#get_element_width (instance method)">- (Object) <strong>get_element_width</strong>(locator) </a> |
| |
| |
| |
| </span> |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| <span class="summary_desc"><div class='inline'> |
| <p>Retrieves the width of an element.</p> |
| </div></span> |
| |
| </li> |
| |
| |
| <li class="public "> |
| <span class="summary_signature"> |
| |
| <a href="#get_eval-instance_method" title="#get_eval (instance method)">- (Object) <strong>get_eval</strong>(script) </a> |
| |
| |
| |
| </span> |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| <span class="summary_desc"><div class='inline'> |
| <p>Gets the result of evaluating the specified JavaScript snippet.</p> |
| </div></span> |
| |
| </li> |
| |
| |
| <li class="public "> |
| <span class="summary_signature"> |
| |
| <a href="#get_expression-instance_method" title="#get_expression (instance method)">- (Object) <strong>get_expression</strong>(expression) </a> |
| |
| |
| |
| </span> |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| <span class="summary_desc"><div class='inline'> |
| <p>Returns the specified expression.</p> |
| </div></span> |
| |
| </li> |
| |
| |
| <li class="public "> |
| <span class="summary_signature"> |
| |
| <a href="#get_html_source-instance_method" title="#get_html_source (instance method)">- (Object) <strong>get_html_source</strong> </a> |
| |
| |
| |
| </span> |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| <span class="summary_desc"><div class='inline'> |
| <p>Returns the entire HTML source between the opening and closing "html" tags.</p> |
| </div></span> |
| |
| </li> |
| |
| |
| <li class="public "> |
| <span class="summary_signature"> |
| |
| <a href="#get_location-instance_method" title="#get_location (instance method)">- (Object) <strong>get_location</strong> </a> |
| |
| |
| |
| </span> |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| <span class="summary_desc"><div class='inline'> |
| <p>Gets the absolute URL of the current page.</p> |
| </div></span> |
| |
| </li> |
| |
| |
| <li class="public "> |
| <span class="summary_signature"> |
| |
| <a href="#get_mouse_speed-instance_method" title="#get_mouse_speed (instance method)">- (Object) <strong>get_mouse_speed</strong> </a> |
| |
| |
| |
| </span> |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| <span class="summary_desc"><div class='inline'> |
| <p>Returns the number of pixels between "mousemove" events during dragAndDrop |
| commands (default=10).</p> |
| </div></span> |
| |
| </li> |
| |
| |
| <li class="public "> |
| <span class="summary_signature"> |
| |
| <a href="#get_prompt-instance_method" title="#get_prompt (instance method)">- (Object) <strong>get_prompt</strong> </a> |
| |
| |
| |
| </span> |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| <span class="summary_desc"><div class='inline'> |
| <p>Retrieves the message of a JavaScript question prompt dialog generated |
| during the previous action.</p> |
| </div></span> |
| |
| </li> |
| |
| |
| <li class="public "> |
| <span class="summary_signature"> |
| |
| <a href="#get_select_options-instance_method" title="#get_select_options (instance method)">- (Object) <strong>get_select_options</strong>(selectLocator) </a> |
| |
| |
| |
| </span> |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| <span class="summary_desc"><div class='inline'> |
| <p>Gets all option labels in the specified select drop-down.</p> |
| </div></span> |
| |
| </li> |
| |
| |
| <li class="public "> |
| <span class="summary_signature"> |
| |
| <a href="#get_selected_id-instance_method" title="#get_selected_id (instance method)">- (Object) <strong>get_selected_id</strong>(selectLocator) </a> |
| |
| |
| |
| </span> |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| <span class="summary_desc"><div class='inline'> |
| <p>Gets option element ID for selected option in the specified select element.</p> |
| </div></span> |
| |
| </li> |
| |
| |
| <li class="public "> |
| <span class="summary_signature"> |
| |
| <a href="#get_selected_ids-instance_method" title="#get_selected_ids (instance method)">- (Object) <strong>get_selected_ids</strong>(selectLocator) </a> |
| |
| |
| |
| </span> |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| <span class="summary_desc"><div class='inline'> |
| <p>Gets all option element IDs for selected options in the specified select or |
| multi-select element.</p> |
| </div></span> |
| |
| </li> |
| |
| |
| <li class="public "> |
| <span class="summary_signature"> |
| |
| <a href="#get_selected_index-instance_method" title="#get_selected_index (instance method)">- (Object) <strong>get_selected_index</strong>(selectLocator) </a> |
| |
| |
| |
| </span> |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| <span class="summary_desc"><div class='inline'> |
| <p>Gets option index (option number, starting at 0) for selected option in the |
| specified select element.</p> |
| </div></span> |
| |
| </li> |
| |
| |
| <li class="public "> |
| <span class="summary_signature"> |
| |
| <a href="#get_selected_indexes-instance_method" title="#get_selected_indexes (instance method)">- (Object) <strong>get_selected_indexes</strong>(selectLocator) </a> |
| |
| |
| |
| </span> |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| <span class="summary_desc"><div class='inline'> |
| <p>Gets all option indexes (option number, starting at 0) for selected options |
| in the specified select or multi-select element.</p> |
| </div></span> |
| |
| </li> |
| |
| |
| <li class="public "> |
| <span class="summary_signature"> |
| |
| <a href="#get_selected_label-instance_method" title="#get_selected_label (instance method)">- (Object) <strong>get_selected_label</strong>(selectLocator) </a> |
| |
| |
| |
| </span> |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| <span class="summary_desc"><div class='inline'> |
| <p>Gets option label (visible text) for selected option in the specified |
| select element.</p> |
| </div></span> |
| |
| </li> |
| |
| |
| <li class="public "> |
| <span class="summary_signature"> |
| |
| <a href="#get_selected_labels-instance_method" title="#get_selected_labels (instance method)">- (Object) <strong>get_selected_labels</strong>(selectLocator) </a> |
| |
| |
| |
| </span> |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| <span class="summary_desc"><div class='inline'> |
| <p>Gets all option labels (visible text) for selected options in the specified |
| select or multi-select element.</p> |
| </div></span> |
| |
| </li> |
| |
| |
| <li class="public "> |
| <span class="summary_signature"> |
| |
| <a href="#get_selected_value-instance_method" title="#get_selected_value (instance method)">- (Object) <strong>get_selected_value</strong>(selectLocator) </a> |
| |
| |
| |
| </span> |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| <span class="summary_desc"><div class='inline'> |
| <p>Gets option value (value attribute) for selected option in the specified |
| select element.</p> |
| </div></span> |
| |
| </li> |
| |
| |
| <li class="public "> |
| <span class="summary_signature"> |
| |
| <a href="#get_selected_values-instance_method" title="#get_selected_values (instance method)">- (Object) <strong>get_selected_values</strong>(selectLocator) </a> |
| |
| |
| |
| </span> |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| <span class="summary_desc"><div class='inline'> |
| <p>Gets all option values (value attributes) for selected options in the |
| specified select or multi-select element.</p> |
| </div></span> |
| |
| </li> |
| |
| |
| <li class="public "> |
| <span class="summary_signature"> |
| |
| <a href="#get_speed-instance_method" title="#get_speed (instance method)">- (Object) <strong>get_speed</strong> </a> |
| |
| |
| |
| </span> |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| <span class="summary_desc"><div class='inline'> |
| <p>Get execution speed (i.e., get the millisecond length of the delay |
| following each selenium operation).</p> |
| </div></span> |
| |
| </li> |
| |
| |
| <li class="public "> |
| <span class="summary_signature"> |
| |
| <a href="#get_table-instance_method" title="#get_table (instance method)">- (Object) <strong>get_table</strong>(tableCellAddress) </a> |
| |
| |
| |
| </span> |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| <span class="summary_desc"><div class='inline'> |
| <p>Gets the text from a cell of a table.</p> |
| </div></span> |
| |
| </li> |
| |
| |
| <li class="public "> |
| <span class="summary_signature"> |
| |
| <a href="#get_text-instance_method" title="#get_text (instance method)">- (Object) <strong>get_text</strong>(locator) </a> |
| |
| |
| |
| </span> |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| <span class="summary_desc"><div class='inline'> |
| <p>Gets the text of an element.</p> |
| </div></span> |
| |
| </li> |
| |
| |
| <li class="public "> |
| <span class="summary_signature"> |
| |
| <a href="#get_title-instance_method" title="#get_title (instance method)">- (Object) <strong>get_title</strong> </a> |
| |
| |
| |
| </span> |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| <span class="summary_desc"><div class='inline'> |
| <p>Gets the title of the current page.</p> |
| </div></span> |
| |
| </li> |
| |
| |
| <li class="public "> |
| <span class="summary_signature"> |
| |
| <a href="#get_value-instance_method" title="#get_value (instance method)">- (Object) <strong>get_value</strong>(locator) </a> |
| |
| |
| |
| </span> |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| <span class="summary_desc"><div class='inline'> |
| <p>Gets the (whitespace-trimmed) value of an input field (or anything else |
| with a value parameter).</p> |
| </div></span> |
| |
| </li> |
| |
| |
| <li class="public "> |
| <span class="summary_signature"> |
| |
| <a href="#get_whether_this_frame_match_frame_expression-instance_method" title="#get_whether_this_frame_match_frame_expression (instance method)">- (Object) <strong>get_whether_this_frame_match_frame_expression</strong>(currentFrameString, target) </a> |
| |
| |
| |
| </span> |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| <span class="summary_desc"><div class='inline'> |
| <p>Determine whether current/locator identify the frame containing this |
| running code.</p> |
| </div></span> |
| |
| </li> |
| |
| |
| <li class="public "> |
| <span class="summary_signature"> |
| |
| <a href="#get_whether_this_window_match_window_expression-instance_method" title="#get_whether_this_window_match_window_expression (instance method)">- (Object) <strong>get_whether_this_window_match_window_expression</strong>(currentWindowString, target) </a> |
| |
| |
| |
| </span> |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| <span class="summary_desc"><div class='inline'> |
| <p>Determine whether currentWindowString plus target identify the window |
| containing this running code.</p> |
| </div></span> |
| |
| </li> |
| |
| |
| <li class="public "> |
| <span class="summary_signature"> |
| |
| <a href="#get_xpath_count-instance_method" title="#get_xpath_count (instance method)">- (Object) <strong>get_xpath_count</strong>(xpath) </a> |
| |
| |
| |
| </span> |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| <span class="summary_desc"><div class='inline'> |
| <p>Returns the number of nodes that match the specified xpath, eg.</p> |
| </div></span> |
| |
| </li> |
| |
| |
| <li class="public "> |
| <span class="summary_signature"> |
| |
| <a href="#go_back-instance_method" title="#go_back (instance method)">- (Object) <strong>go_back</strong> </a> |
| |
| |
| |
| </span> |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| <span class="summary_desc"><div class='inline'> |
| <p>Simulates the user clicking the "back" button on their browser.</p> |
| </div></span> |
| |
| </li> |
| |
| |
| <li class="public "> |
| <span class="summary_signature"> |
| |
| <a href="#highlight-instance_method" title="#highlight (instance method)">- (Object) <strong>highlight</strong>(locator) </a> |
| |
| |
| |
| </span> |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| <span class="summary_desc"><div class='inline'> |
| <p>Briefly changes the backgroundColor of the specified element yellow.</p> |
| </div></span> |
| |
| </li> |
| |
| |
| <li class="public "> |
| <span class="summary_signature"> |
| |
| <a href="#ignore_attributes_without_value-instance_method" title="#ignore_attributes_without_value (instance method)">- (Object) <strong>ignore_attributes_without_value</strong>(ignore) </a> |
| |
| |
| |
| </span> |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| <span class="summary_desc"><div class='inline'> |
| <p>Specifies whether Selenium will ignore xpath attributes that have no value, |
| i.e.</p> |
| </div></span> |
| |
| </li> |
| |
| |
| <li class="public "> |
| <span class="summary_signature"> |
| |
| <a href="#is_alert_present-instance_method" title="#is_alert_present (instance method)">- (Object) <strong>is_alert_present</strong> </a> |
| |
| |
| |
| </span> |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| <span class="summary_desc"><div class='inline'> |
| <p>Has an alert occurred?.</p> |
| </div></span> |
| |
| </li> |
| |
| |
| <li class="public "> |
| <span class="summary_signature"> |
| |
| <a href="#is_checked-instance_method" title="#is_checked (instance method)">- (Object) <strong>is_checked</strong>(locator) </a> |
| |
| |
| |
| </span> |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| <span class="summary_desc"><div class='inline'> |
| <p>Gets whether a toggle-button (checkbox/radio) is checked.</p> |
| </div></span> |
| |
| </li> |
| |
| |
| <li class="public "> |
| <span class="summary_signature"> |
| |
| <a href="#is_confirmation_present-instance_method" title="#is_confirmation_present (instance method)">- (Object) <strong>is_confirmation_present</strong> </a> |
| |
| |
| |
| </span> |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| <span class="summary_desc"><div class='inline'> |
| <p>Has confirm() been called?.</p> |
| </div></span> |
| |
| </li> |
| |
| |
| <li class="public "> |
| <span class="summary_signature"> |
| |
| <a href="#is_cookie_present-instance_method" title="#is_cookie_present (instance method)">- (Object) <strong>is_cookie_present</strong>(name) </a> |
| |
| |
| |
| </span> |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| <span class="summary_desc"><div class='inline'> |
| <p>Returns true if a cookie with the specified name is present, or false |
| otherwise.</p> |
| </div></span> |
| |
| </li> |
| |
| |
| <li class="public "> |
| <span class="summary_signature"> |
| |
| <a href="#is_editable-instance_method" title="#is_editable (instance method)">- (Object) <strong>is_editable</strong>(locator) </a> |
| |
| |
| |
| </span> |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| <span class="summary_desc"><div class='inline'> |
| <p>Determines whether the specified input element is editable, ie hasn't been |
| disabled.</p> |
| </div></span> |
| |
| </li> |
| |
| |
| <li class="public "> |
| <span class="summary_signature"> |
| |
| <a href="#is_element_present-instance_method" title="#is_element_present (instance method)">- (Object) <strong>is_element_present</strong>(locator) </a> |
| |
| |
| |
| </span> |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| <span class="summary_desc"><div class='inline'> |
| <p>Verifies that the specified element is somewhere on the page.</p> |
| </div></span> |
| |
| </li> |
| |
| |
| <li class="public "> |
| <span class="summary_signature"> |
| |
| <a href="#is_ordered-instance_method" title="#is_ordered (instance method)">- (Object) <strong>is_ordered</strong>(locator1, locator2) </a> |
| |
| |
| |
| </span> |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| <span class="summary_desc"><div class='inline'> |
| <p>Check if these two elements have same parent and are ordered siblings in |
| the DOM.</p> |
| </div></span> |
| |
| </li> |
| |
| |
| <li class="public "> |
| <span class="summary_signature"> |
| |
| <a href="#is_prompt_present-instance_method" title="#is_prompt_present (instance method)">- (Object) <strong>is_prompt_present</strong> </a> |
| |
| |
| |
| </span> |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| <span class="summary_desc"><div class='inline'> |
| <p>Has a prompt occurred?.</p> |
| </div></span> |
| |
| </li> |
| |
| |
| <li class="public "> |
| <span class="summary_signature"> |
| |
| <a href="#is_something_selected-instance_method" title="#is_something_selected (instance method)">- (Object) <strong>is_something_selected</strong>(selectLocator) </a> |
| |
| |
| |
| </span> |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| <span class="summary_desc"><div class='inline'> |
| <p>Determines whether some option in a drop-down menu is selected.</p> |
| </div></span> |
| |
| </li> |
| |
| |
| <li class="public "> |
| <span class="summary_signature"> |
| |
| <a href="#is_text_present-instance_method" title="#is_text_present (instance method)">- (Object) <strong>is_text_present</strong>(pattern) </a> |
| |
| |
| |
| </span> |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| <span class="summary_desc"><div class='inline'> |
| <p>Verifies that the specified text pattern appears somewhere on the rendered |
| page shown to the user.</p> |
| </div></span> |
| |
| </li> |
| |
| |
| <li class="public "> |
| <span class="summary_signature"> |
| |
| <a href="#is_visible-instance_method" title="#is_visible (instance method)">- (Object) <strong>is_visible</strong>(locator) </a> |
| |
| |
| |
| </span> |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| <span class="summary_desc"><div class='inline'> |
| <p>Determines if the specified element is visible.</p> |
| </div></span> |
| |
| </li> |
| |
| |
| <li class="public "> |
| <span class="summary_signature"> |
| |
| <a href="#key_down-instance_method" title="#key_down (instance method)">- (Object) <strong>key_down</strong>(locator, keySequence) </a> |
| |
| |
| |
| </span> |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| <span class="summary_desc"><div class='inline'> |
| <p>Simulates a user pressing a key (without releasing it yet).</p> |
| </div></span> |
| |
| </li> |
| |
| |
| <li class="public "> |
| <span class="summary_signature"> |
| |
| <a href="#key_down_native-instance_method" title="#key_down_native (instance method)">- (Object) <strong>key_down_native</strong>(keycode) </a> |
| |
| |
| |
| </span> |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| <span class="summary_desc"><div class='inline'> |
| <p>Simulates a user pressing a key (without releasing it yet) by sending a |
| native operating system keystroke.</p> |
| </div></span> |
| |
| </li> |
| |
| |
| <li class="public "> |
| <span class="summary_signature"> |
| |
| <a href="#key_press-instance_method" title="#key_press (instance method)">- (Object) <strong>key_press</strong>(locator, keySequence) </a> |
| |
| |
| |
| </span> |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| <span class="summary_desc"><div class='inline'> |
| <p>Simulates a user pressing and releasing a key.</p> |
| </div></span> |
| |
| </li> |
| |
| |
| <li class="public "> |
| <span class="summary_signature"> |
| |
| <a href="#key_press_native-instance_method" title="#key_press_native (instance method)">- (Object) <strong>key_press_native</strong>(keycode) </a> |
| |
| |
| |
| </span> |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| <span class="summary_desc"><div class='inline'> |
| <p>Simulates a user pressing and releasing a key by sending a native operating |
| system keystroke.</p> |
| </div></span> |
| |
| </li> |
| |
| |
| <li class="public "> |
| <span class="summary_signature"> |
| |
| <a href="#key_up-instance_method" title="#key_up (instance method)">- (Object) <strong>key_up</strong>(locator, keySequence) </a> |
| |
| |
| |
| </span> |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| <span class="summary_desc"><div class='inline'> |
| <p>Simulates a user releasing a key.</p> |
| </div></span> |
| |
| </li> |
| |
| |
| <li class="public "> |
| <span class="summary_signature"> |
| |
| <a href="#key_up_native-instance_method" title="#key_up_native (instance method)">- (Object) <strong>key_up_native</strong>(keycode) </a> |
| |
| |
| |
| </span> |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| <span class="summary_desc"><div class='inline'> |
| <p>Simulates a user releasing a key by sending a native operating system |
| keystroke.</p> |
| </div></span> |
| |
| </li> |
| |
| |
| <li class="public "> |
| <span class="summary_signature"> |
| |
| <a href="#meta_key_down-instance_method" title="#meta_key_down (instance method)">- (Object) <strong>meta_key_down</strong> </a> |
| |
| |
| |
| </span> |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| <span class="summary_desc"><div class='inline'> |
| <p>Press the meta key and hold it down until doMetaUp() is called or a new |
| page is loaded.</p> |
| </div></span> |
| |
| </li> |
| |
| |
| <li class="public "> |
| <span class="summary_signature"> |
| |
| <a href="#meta_key_up-instance_method" title="#meta_key_up (instance method)">- (Object) <strong>meta_key_up</strong> </a> |
| |
| |
| |
| </span> |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| <span class="summary_desc"><div class='inline'> |
| <p>Release the meta key.</p> |
| </div></span> |
| |
| </li> |
| |
| |
| <li class="public "> |
| <span class="summary_signature"> |
| |
| <a href="#mouse_down-instance_method" title="#mouse_down (instance method)">- (Object) <strong>mouse_down</strong>(locator) </a> |
| |
| |
| |
| </span> |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| <span class="summary_desc"><div class='inline'> |
| <p>Simulates a user pressing the left mouse button (without releasing it yet) |
| on the specified element.</p> |
| </div></span> |
| |
| </li> |
| |
| |
| <li class="public "> |
| <span class="summary_signature"> |
| |
| <a href="#mouse_down_at-instance_method" title="#mouse_down_at (instance method)">- (Object) <strong>mouse_down_at</strong>(locator, coordString) </a> |
| |
| |
| |
| </span> |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| <span class="summary_desc"><div class='inline'> |
| <p>Simulates a user pressing the left mouse button (without releasing it yet) |
| at the specified location.</p> |
| </div></span> |
| |
| </li> |
| |
| |
| <li class="public "> |
| <span class="summary_signature"> |
| |
| <a href="#mouse_down_right-instance_method" title="#mouse_down_right (instance method)">- (Object) <strong>mouse_down_right</strong>(locator) </a> |
| |
| |
| |
| </span> |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| <span class="summary_desc"><div class='inline'> |
| <p>Simulates a user pressing the right mouse button (without releasing it yet) |
| on the specified element.</p> |
| </div></span> |
| |
| </li> |
| |
| |
| <li class="public "> |
| <span class="summary_signature"> |
| |
| <a href="#mouse_down_right_at-instance_method" title="#mouse_down_right_at (instance method)">- (Object) <strong>mouse_down_right_at</strong>(locator, coordString) </a> |
| |
| |
| |
| </span> |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| <span class="summary_desc"><div class='inline'> |
| <p>Simulates a user pressing the right mouse button (without releasing it yet) |
| at the specified location.</p> |
| </div></span> |
| |
| </li> |
| |
| |
| <li class="public "> |
| <span class="summary_signature"> |
| |
| <a href="#mouse_move-instance_method" title="#mouse_move (instance method)">- (Object) <strong>mouse_move</strong>(locator) </a> |
| |
| |
| |
| </span> |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| <span class="summary_desc"><div class='inline'> |
| <p>Simulates a user pressing the mouse button (without releasing it yet) on |
| the specified element.</p> |
| </div></span> |
| |
| </li> |
| |
| |
| <li class="public "> |
| <span class="summary_signature"> |
| |
| <a href="#mouse_move_at-instance_method" title="#mouse_move_at (instance method)">- (Object) <strong>mouse_move_at</strong>(locator, coordString) </a> |
| |
| |
| |
| </span> |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| <span class="summary_desc"><div class='inline'> |
| <p>Simulates a user pressing the mouse button (without releasing it yet) on |
| the specified element.</p> |
| </div></span> |
| |
| </li> |
| |
| |
| <li class="public "> |
| <span class="summary_signature"> |
| |
| <a href="#mouse_out-instance_method" title="#mouse_out (instance method)">- (Object) <strong>mouse_out</strong>(locator) </a> |
| |
| |
| |
| </span> |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| <span class="summary_desc"><div class='inline'> |
| <p>Simulates a user moving the mouse pointer away from the specified element.</p> |
| </div></span> |
| |
| </li> |
| |
| |
| <li class="public "> |
| <span class="summary_signature"> |
| |
| <a href="#mouse_over-instance_method" title="#mouse_over (instance method)">- (Object) <strong>mouse_over</strong>(locator) </a> |
| |
| |
| |
| </span> |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| <span class="summary_desc"><div class='inline'> |
| <p>Simulates a user hovering a mouse over the specified element.</p> |
| </div></span> |
| |
| </li> |
| |
| |
| <li class="public "> |
| <span class="summary_signature"> |
| |
| <a href="#mouse_up-instance_method" title="#mouse_up (instance method)">- (Object) <strong>mouse_up</strong>(locator) </a> |
| |
| |
| |
| </span> |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| <span class="summary_desc"><div class='inline'> |
| <p>Simulates the event that occurs when the user releases the mouse button |
| (i.e., stops holding the button down) on the specified element.</p> |
| </div></span> |
| |
| </li> |
| |
| |
| <li class="public "> |
| <span class="summary_signature"> |
| |
| <a href="#mouse_up_at-instance_method" title="#mouse_up_at (instance method)">- (Object) <strong>mouse_up_at</strong>(locator, coordString) </a> |
| |
| |
| |
| </span> |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| <span class="summary_desc"><div class='inline'> |
| <p>Simulates the event that occurs when the user releases the mouse button |
| (i.e., stops holding the button down) at the specified location.</p> |
| </div></span> |
| |
| </li> |
| |
| |
| <li class="public "> |
| <span class="summary_signature"> |
| |
| <a href="#mouse_up_right-instance_method" title="#mouse_up_right (instance method)">- (Object) <strong>mouse_up_right</strong>(locator) </a> |
| |
| |
| |
| </span> |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| <span class="summary_desc"><div class='inline'> |
| <p>Simulates the event that occurs when the user releases the right mouse |
| button (i.e., stops holding the button down) on the specified element.</p> |
| </div></span> |
| |
| </li> |
| |
| |
| <li class="public "> |
| <span class="summary_signature"> |
| |
| <a href="#mouse_up_right_at-instance_method" title="#mouse_up_right_at (instance method)">- (Object) <strong>mouse_up_right_at</strong>(locator, coordString) </a> |
| |
| |
| |
| </span> |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| <span class="summary_desc"><div class='inline'> |
| <p>Simulates the event that occurs when the user releases the right mouse |
| button (i.e., stops holding the button down) at the specified location.</p> |
| </div></span> |
| |
| </li> |
| |
| |
| <li class="public "> |
| <span class="summary_signature"> |
| |
| <a href="#open-instance_method" title="#open (instance method)">- (Object) <strong>open</strong>(url) </a> |
| |
| |
| |
| </span> |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| <span class="summary_desc"><div class='inline'> |
| <p>Opens an URL in the test frame.</p> |
| </div></span> |
| |
| </li> |
| |
| |
| <li class="public "> |
| <span class="summary_signature"> |
| |
| <a href="#open_window-instance_method" title="#open_window (instance method)">- (Object) <strong>open_window</strong>(url, windowID) </a> |
| |
| |
| |
| </span> |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| <span class="summary_desc"><div class='inline'> |
| <p>Opens a popup window (if a window with that ID isn't already open).</p> |
| </div></span> |
| |
| </li> |
| |
| |
| <li class="public "> |
| <span class="summary_signature"> |
| |
| <a href="#refresh-instance_method" title="#refresh (instance method)">- (Object) <strong>refresh</strong> </a> |
| |
| |
| |
| </span> |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| <span class="summary_desc"><div class='inline'> |
| <p>Simulates the user clicking the "Refresh" button on their browser.</p> |
| </div></span> |
| |
| </li> |
| |
| |
| <li class="public "> |
| <span class="summary_signature"> |
| |
| <a href="#remove_all_selections-instance_method" title="#remove_all_selections (instance method)">- (Object) <strong>remove_all_selections</strong>(locator) </a> |
| |
| |
| |
| </span> |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| <span class="summary_desc"><div class='inline'> |
| <p>Unselects all of the selected options in a multi-select element.</p> |
| </div></span> |
| |
| </li> |
| |
| |
| <li class="public "> |
| <span class="summary_signature"> |
| |
| <a href="#remove_script-instance_method" title="#remove_script (instance method)">- (Object) <strong>remove_script</strong>(scriptTagId) </a> |
| |
| |
| |
| </span> |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| <span class="summary_desc"><div class='inline'> |
| <p>Removes a script tag from the Selenium document identified by the given id.</p> |
| </div></span> |
| |
| </li> |
| |
| |
| <li class="public "> |
| <span class="summary_signature"> |
| |
| <a href="#remove_selection-instance_method" title="#remove_selection (instance method)">- (Object) <strong>remove_selection</strong>(locator, optionLocator) </a> |
| |
| |
| |
| </span> |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| <span class="summary_desc"><div class='inline'> |
| <p>Remove a selection from the set of selected options in a multi-select |
| element using an option locator.</p> |
| </div></span> |
| |
| </li> |
| |
| |
| <li class="public "> |
| <span class="summary_signature"> |
| |
| <a href="#retrieve_last_remote_control_logs-instance_method" title="#retrieve_last_remote_control_logs (instance method)">- (Object) <strong>retrieve_last_remote_control_logs</strong> </a> |
| |
| |
| |
| </span> |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| <span class="summary_desc"><div class='inline'> |
| <p>Retrieve the last messages logged on a specific remote control.</p> |
| </div></span> |
| |
| </li> |
| |
| |
| <li class="public "> |
| <span class="summary_signature"> |
| |
| <a href="#rollup-instance_method" title="#rollup (instance method)">- (Object) <strong>rollup</strong>(rollupName, kwargs) </a> |
| |
| |
| |
| </span> |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| <span class="summary_desc"><div class='inline'> |
| <p>Executes a command rollup, which is a series of commands with a unique |
| name, and optionally arguments that control the generation of the set of |
| commands.</p> |
| </div></span> |
| |
| </li> |
| |
| |
| <li class="public "> |
| <span class="summary_signature"> |
| |
| <a href="#run_script-instance_method" title="#run_script (instance method)">- (Object) <strong>run_script</strong>(script) </a> |
| |
| |
| |
| </span> |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| <span class="summary_desc"><div class='inline'> |
| <p>Creates a new "script" tag in the body of the current test window, and adds |
| the specified text into the body of the command.</p> |
| </div></span> |
| |
| </li> |
| |
| |
| <li class="public "> |
| <span class="summary_signature"> |
| |
| <a href="#select-instance_method" title="#select (instance method)">- (Object) <strong>select</strong>(selectLocator, optionLocator) </a> |
| |
| |
| |
| </span> |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| <span class="summary_desc"><div class='inline'> |
| <p>Select an option from a drop-down using an option locator.</p> |
| </div></span> |
| |
| </li> |
| |
| |
| <li class="public "> |
| <span class="summary_signature"> |
| |
| <a href="#select_frame-instance_method" title="#select_frame (instance method)">- (Object) <strong>select_frame</strong>(locator) </a> |
| |
| |
| |
| </span> |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| <span class="summary_desc"><div class='inline'> |
| <p>Selects a frame within the current window.</p> |
| </div></span> |
| |
| </li> |
| |
| |
| <li class="public "> |
| <span class="summary_signature"> |
| |
| <a href="#select_pop_up-instance_method" title="#select_pop_up (instance method)">- (Object) <strong>select_pop_up</strong>(windowID) </a> |
| |
| |
| |
| </span> |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| <span class="summary_desc"><div class='inline'> |
| <p>Simplifies the process of selecting a popup window (and does not offer |
| functionality beyond what <tt>selectWindow()</tt> already provides).</p> |
| </div></span> |
| |
| </li> |
| |
| |
| <li class="public "> |
| <span class="summary_signature"> |
| |
| <a href="#select_window-instance_method" title="#select_window (instance method)">- (Object) <strong>select_window</strong>(windowID) </a> |
| |
| |
| |
| </span> |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| <span class="summary_desc"><div class='inline'> |
| <p>Selects a popup window using a window locator; once a popup window has been |
| selected, all commands go to that window.</p> |
| </div></span> |
| |
| </li> |
| |
| |
| <li class="public "> |
| <span class="summary_signature"> |
| |
| <a href="#set_browser_log_level-instance_method" title="#set_browser_log_level (instance method)">- (Object) <strong>set_browser_log_level</strong>(logLevel) </a> |
| |
| |
| |
| </span> |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| <span class="summary_desc"><div class='inline'> |
| <p>Sets the threshold for browser-side logging messages; log messages beneath |
| this threshold will be discarded.</p> |
| </div></span> |
| |
| </li> |
| |
| |
| <li class="public "> |
| <span class="summary_signature"> |
| |
| <a href="#set_context-instance_method" title="#set_context (instance method)">- (Object) <strong>set_context</strong>(context) </a> |
| |
| |
| |
| </span> |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| <span class="summary_desc"><div class='inline'> |
| <p>Writes a message to the status bar and adds a note to the browser-side log.</p> |
| </div></span> |
| |
| </li> |
| |
| |
| <li class="public "> |
| <span class="summary_signature"> |
| |
| <a href="#set_cursor_position-instance_method" title="#set_cursor_position (instance method)">- (Object) <strong>set_cursor_position</strong>(locator, position) </a> |
| |
| |
| |
| </span> |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| <span class="summary_desc"><div class='inline'> |
| <p>Moves the text cursor to the specified position in the given input element |
| or textarea.</p> |
| </div></span> |
| |
| </li> |
| |
| |
| <li class="public "> |
| <span class="summary_signature"> |
| |
| <a href="#set_mouse_speed-instance_method" title="#set_mouse_speed (instance method)">- (Object) <strong>set_mouse_speed</strong>(pixels) </a> |
| |
| |
| |
| </span> |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| <span class="summary_desc"><div class='inline'> |
| <p>Configure the number of pixels between "mousemove" events during |
| dragAndDrop commands (default=10).</p> |
| </div></span> |
| |
| </li> |
| |
| |
| <li class="public "> |
| <span class="summary_signature"> |
| |
| <a href="#set_speed-instance_method" title="#set_speed (instance method)">- (Object) <strong>set_speed</strong>(value) </a> |
| |
| |
| |
| </span> |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| <span class="summary_desc"><div class='inline'> |
| <p>Set execution speed (i.e., set the millisecond length of a delay which will |
| follow each selenium operation).</p> |
| </div></span> |
| |
| </li> |
| |
| |
| <li class="public "> |
| <span class="summary_signature"> |
| |
| <a href="#set_timeout-instance_method" title="#set_timeout (instance method)">- (Object) <strong>set_timeout</strong>(timeout) </a> |
| |
| |
| |
| </span> |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| <span class="summary_desc"><div class='inline'> |
| <p>Specifies the amount of time that Selenium will wait for actions to |
| complete.</p> |
| </div></span> |
| |
| </li> |
| |
| |
| <li class="public "> |
| <span class="summary_signature"> |
| |
| <a href="#shift_key_down-instance_method" title="#shift_key_down (instance method)">- (Object) <strong>shift_key_down</strong> </a> |
| |
| |
| |
| </span> |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| <span class="summary_desc"><div class='inline'> |
| <p>Press the shift key and hold it down until doShiftUp() is called or a new |
| page is loaded.</p> |
| </div></span> |
| |
| </li> |
| |
| |
| <li class="public "> |
| <span class="summary_signature"> |
| |
| <a href="#shift_key_up-instance_method" title="#shift_key_up (instance method)">- (Object) <strong>shift_key_up</strong> </a> |
| |
| |
| |
| </span> |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| <span class="summary_desc"><div class='inline'> |
| <p>Release the shift key.</p> |
| </div></span> |
| |
| </li> |
| |
| |
| <li class="public "> |
| <span class="summary_signature"> |
| |
| <a href="#shut_down_selenium_server-instance_method" title="#shut_down_selenium_server (instance method)">- (Object) <strong>shut_down_selenium_server</strong> </a> |
| |
| |
| |
| </span> |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| <span class="summary_desc"><div class='inline'> |
| <p>Kills the running Selenium Server and all browser sessions.</p> |
| </div></span> |
| |
| </li> |
| |
| |
| <li class="public "> |
| <span class="summary_signature"> |
| |
| <a href="#submit-instance_method" title="#submit (instance method)">- (Object) <strong>submit</strong>(formLocator) </a> |
| |
| |
| |
| </span> |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| <span class="summary_desc"><div class='inline'> |
| <p>Submit the specified form.</p> |
| </div></span> |
| |
| </li> |
| |
| |
| <li class="public "> |
| <span class="summary_signature"> |
| |
| <a href="#type-instance_method" title="#type (instance method)">- (Object) <strong>type</strong>(locator, value) </a> |
| |
| |
| |
| </span> |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| <span class="summary_desc"><div class='inline'> |
| <p>Sets the value of an input field, as though you typed it in.</p> |
| </div></span> |
| |
| </li> |
| |
| |
| <li class="public "> |
| <span class="summary_signature"> |
| |
| <a href="#type_keys-instance_method" title="#type_keys (instance method)">- (Object) <strong>type_keys</strong>(locator, value) </a> |
| |
| |
| |
| </span> |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| <span class="summary_desc"><div class='inline'> |
| <p>Simulates keystroke events on the specified element, as though you typed |
| the value key-by-key.</p> |
| </div></span> |
| |
| </li> |
| |
| |
| <li class="public "> |
| <span class="summary_signature"> |
| |
| <a href="#uncheck-instance_method" title="#uncheck (instance method)">- (Object) <strong>uncheck</strong>(locator) </a> |
| |
| |
| |
| </span> |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| <span class="summary_desc"><div class='inline'> |
| <p>Uncheck a toggle-button (checkbox/radio).</p> |
| </div></span> |
| |
| </li> |
| |
| |
| <li class="public "> |
| <span class="summary_signature"> |
| |
| <a href="#use_xpath_library-instance_method" title="#use_xpath_library (instance method)">- (Object) <strong>use_xpath_library</strong>(libraryName) </a> |
| |
| |
| |
| </span> |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| <span class="summary_desc"><div class='inline'> |
| <p>Allows choice of one of the available libraries.</p> |
| </div></span> |
| |
| </li> |
| |
| |
| <li class="public "> |
| <span class="summary_signature"> |
| |
| <a href="#wait_for_condition-instance_method" title="#wait_for_condition (instance method)">- (Object) <strong>wait_for_condition</strong>(script, timeout) </a> |
| |
| |
| |
| </span> |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| <span class="summary_desc"><div class='inline'> |
| <p>Runs the specified JavaScript snippet repeatedly until it evaluates to |
| "true".</p> |
| </div></span> |
| |
| </li> |
| |
| |
| <li class="public "> |
| <span class="summary_signature"> |
| |
| <a href="#wait_for_frame_to_load-instance_method" title="#wait_for_frame_to_load (instance method)">- (Object) <strong>wait_for_frame_to_load</strong>(frameAddress, timeout) </a> |
| |
| |
| |
| </span> |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| <span class="summary_desc"><div class='inline'> |
| <p>Waits for a new frame to load.</p> |
| </div></span> |
| |
| </li> |
| |
| |
| <li class="public "> |
| <span class="summary_signature"> |
| |
| <a href="#wait_for_page_to_load-instance_method" title="#wait_for_page_to_load (instance method)">- (Object) <strong>wait_for_page_to_load</strong>(timeout) </a> |
| |
| |
| |
| </span> |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| <span class="summary_desc"><div class='inline'> |
| <p>Waits for a new page to load.</p> |
| </div></span> |
| |
| </li> |
| |
| |
| <li class="public "> |
| <span class="summary_signature"> |
| |
| <a href="#wait_for_pop_up-instance_method" title="#wait_for_pop_up (instance method)">- (Object) <strong>wait_for_pop_up</strong>(windowID, timeout) </a> |
| |
| |
| |
| </span> |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| <span class="summary_desc"><div class='inline'> |
| <p>Waits for a popup window to appear and load up.</p> |
| </div></span> |
| |
| </li> |
| |
| |
| <li class="public "> |
| <span class="summary_signature"> |
| |
| <a href="#window_focus-instance_method" title="#window_focus (instance method)">- (Object) <strong>window_focus</strong> </a> |
| |
| |
| |
| </span> |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| <span class="summary_desc"><div class='inline'> |
| <p>Gives focus to the currently selected window.</p> |
| </div></span> |
| |
| </li> |
| |
| |
| <li class="public "> |
| <span class="summary_signature"> |
| |
| <a href="#window_maximize-instance_method" title="#window_maximize (instance method)">- (Object) <strong>window_maximize</strong> </a> |
| |
| |
| |
| </span> |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| <span class="summary_desc"><div class='inline'> |
| <p>Resize currently selected window to take up the entire screen.</p> |
| </div></span> |
| |
| </li> |
| |
| |
| </ul> |
| |
| |
| |
| |
| <div id="instance_method_details" class="method_details_list"> |
| <h2>Instance Method Details</h2> |
| |
| |
| <div class="method_details first"> |
| <h3 class="signature first" id="add_location_strategy-instance_method"> |
| |
| - (<tt>Object</tt>) <strong>add_location_strategy</strong>(strategyName, functionDefinition) |
| |
| |
| |
| |
| |
| </h3><div class="docstring"> |
| <div class="discussion"> |
| |
| <p>Defines a new function for Selenium to locate elements on the page. For |
| example, if you define the strategy "foo", and someone runs |
| click("foo=blah"), we'll run your function, passing you the string "blah", |
| and click on the element that your function returns, or throw an "Element |
| not found" error if your function returns null.</p> |
| |
| <p>We'll pass three arguments to your function:</p> |
| <ul><li> |
| <p>locator: the string the user passed in</p> |
| </li><li> |
| <p>inWindow: the currently selected window</p> |
| </li><li> |
| <p>inDocument: the currently selected document</p> |
| </li></ul> |
| |
| <p>The function must return null if the element can't be found.</p> |
| |
| <p>'strategyName' is the name of the strategy to define; this should use only |
| letters [a-zA-Z] with no spaces or other punctuation. 'functionDefinition' |
| is a string defining the body of a function in JavaScript. For example: |
| <tt>return inDocument.getElementById(locator);</tt></p> |
| |
| |
| </div> |
| </div> |
| <div class="tags"> |
| |
| |
| </div><table class="source_code"> |
| <tr> |
| <td> |
| <pre class="lines"> |
| |
| |
| 1548 |
| 1549 |
| 1550</pre> |
| </td> |
| <td> |
| <pre class="code"><span class="info file"># File 'rb/lib/selenium/client/legacy_driver.rb', line 1548</span> |
| |
| <span class='kw'>def</span> <span class='id identifier rubyid_add_location_strategy'>add_location_strategy</span><span class='lparen'>(</span><span class='id identifier rubyid_strategyName'>strategyName</span><span class='comma'>,</span><span class='id identifier rubyid_functionDefinition'>functionDefinition</span><span class='rparen'>)</span> |
| <span class='id identifier rubyid_remote_control_command'>remote_control_command</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>addLocationStrategy</span><span class='tstring_end'>"</span></span><span class='comma'>,</span> <span class='lbracket'>[</span><span class='id identifier rubyid_strategyName'>strategyName</span><span class='comma'>,</span><span class='id identifier rubyid_functionDefinition'>functionDefinition</span><span class='comma'>,</span><span class='rbracket'>]</span><span class='rparen'>)</span> |
| <span class='kw'>end</span></pre> |
| </td> |
| </tr> |
| </table> |
| </div> |
| |
| <div class="method_details "> |
| <h3 class="signature " id="add_script-instance_method"> |
| |
| - (<tt>Object</tt>) <strong>add_script</strong>(scriptContent, scriptTagId) |
| |
| |
| |
| |
| |
| </h3><div class="docstring"> |
| <div class="discussion"> |
| |
| <p>Loads script content into a new script tag in the Selenium document. This |
| differs from the runScript command in that runScript adds the script tag to |
| the document of the AUT, not the Selenium document. The following entities |
| in the script content are replaced by the characters they represent:</p> |
| |
| <pre class="code ruby"><code>&lt; |
| &gt; |
| &amp;</code></pre> |
| |
| <p>The corresponding remove command is removeScript.</p> |
| |
| <p>'scriptContent' is the Javascript content of the script to add |
| 'scriptTagId' is (optional) the id of the new script tag. If |
| specified, and an element with this id already |
| exists, this operation will fail.</p> |
| |
| |
| </div> |
| </div> |
| <div class="tags"> |
| |
| |
| </div><table class="source_code"> |
| <tr> |
| <td> |
| <pre class="lines"> |
| |
| |
| 1596 |
| 1597 |
| 1598</pre> |
| </td> |
| <td> |
| <pre class="code"><span class="info file"># File 'rb/lib/selenium/client/legacy_driver.rb', line 1596</span> |
| |
| <span class='kw'>def</span> <span class='id identifier rubyid_add_script'>add_script</span><span class='lparen'>(</span><span class='id identifier rubyid_scriptContent'>scriptContent</span><span class='comma'>,</span><span class='id identifier rubyid_scriptTagId'>scriptTagId</span><span class='rparen'>)</span> |
| <span class='id identifier rubyid_remote_control_command'>remote_control_command</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>addScript</span><span class='tstring_end'>"</span></span><span class='comma'>,</span> <span class='lbracket'>[</span><span class='id identifier rubyid_scriptContent'>scriptContent</span><span class='comma'>,</span><span class='id identifier rubyid_scriptTagId'>scriptTagId</span><span class='comma'>,</span><span class='rbracket'>]</span><span class='rparen'>)</span> |
| <span class='kw'>end</span></pre> |
| </td> |
| </tr> |
| </table> |
| </div> |
| |
| <div class="method_details "> |
| <h3 class="signature " id="add_selection-instance_method"> |
| |
| - (<tt>Object</tt>) <strong>add_selection</strong>(locator, optionLocator) |
| |
| |
| |
| |
| |
| </h3><div class="docstring"> |
| <div class="discussion"> |
| |
| <p>Add a selection to the set of selected options in a multi-select element |
| using an option locator.</p> |
| |
| <p>'locator' is an element locator identifying a multi-select box |
| 'optionLocator' is an option locator (a label by default)</p> |
| |
| |
| </div> |
| </div> |
| <div class="tags"> |
| |
| |
| <p class="tag_title">See Also:</p> |
| <ul class="see"> |
| |
| <li>for details of option locators</li> |
| |
| </ul> |
| |
| </div><table class="source_code"> |
| <tr> |
| <td> |
| <pre class="lines"> |
| |
| |
| 526 |
| 527 |
| 528</pre> |
| </td> |
| <td> |
| <pre class="code"><span class="info file"># File 'rb/lib/selenium/client/legacy_driver.rb', line 526</span> |
| |
| <span class='kw'>def</span> <span class='id identifier rubyid_add_selection'>add_selection</span><span class='lparen'>(</span><span class='id identifier rubyid_locator'>locator</span><span class='comma'>,</span><span class='id identifier rubyid_optionLocator'>optionLocator</span><span class='rparen'>)</span> |
| <span class='id identifier rubyid_remote_control_command'>remote_control_command</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>addSelection</span><span class='tstring_end'>"</span></span><span class='comma'>,</span> <span class='lbracket'>[</span><span class='id identifier rubyid_locator'>locator</span><span class='comma'>,</span><span class='id identifier rubyid_optionLocator'>optionLocator</span><span class='comma'>,</span><span class='rbracket'>]</span><span class='rparen'>)</span> |
| <span class='kw'>end</span></pre> |
| </td> |
| </tr> |
| </table> |
| </div> |
| |
| <div class="method_details "> |
| <h3 class="signature " id="allow_native_xpath-instance_method"> |
| |
| - (<tt>Object</tt>) <strong>allow_native_xpath</strong>(allow) |
| |
| |
| |
| |
| |
| </h3><div class="docstring"> |
| <div class="discussion"> |
| |
| <p>Specifies whether Selenium should use the native in-browser implementation |
| of XPath (if any native version is available); if you pass "false" to this |
| function, we will always use our pure-JavaScript xpath library. Using the |
| pure-JS xpath library can improve the consistency of xpath element locators |
| between different browser vendors, but the pure-JS version is much slower |
| than the native implementations.</p> |
| |
| <p>'allow' is boolean, true means we'll prefer to use native XPath; false |
| means we'll only use JS XPath</p> |
| |
| |
| </div> |
| </div> |
| <div class="tags"> |
| |
| |
| </div><table class="source_code"> |
| <tr> |
| <td> |
| <pre class="lines"> |
| |
| |
| 1365 |
| 1366 |
| 1367</pre> |
| </td> |
| <td> |
| <pre class="code"><span class="info file"># File 'rb/lib/selenium/client/legacy_driver.rb', line 1365</span> |
| |
| <span class='kw'>def</span> <span class='id identifier rubyid_allow_native_xpath'>allow_native_xpath</span><span class='lparen'>(</span><span class='id identifier rubyid_allow'>allow</span><span class='rparen'>)</span> |
| <span class='id identifier rubyid_remote_control_command'>remote_control_command</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>allowNativeXpath</span><span class='tstring_end'>"</span></span><span class='comma'>,</span> <span class='lbracket'>[</span><span class='id identifier rubyid_allow'>allow</span><span class='comma'>,</span><span class='rbracket'>]</span><span class='rparen'>)</span> |
| <span class='kw'>end</span></pre> |
| </td> |
| </tr> |
| </table> |
| </div> |
| |
| <div class="method_details "> |
| <h3 class="signature " id="alt_key_down-instance_method"> |
| |
| - (<tt>Object</tt>) <strong>alt_key_down</strong> |
| |
| |
| |
| |
| |
| </h3><div class="docstring"> |
| <div class="discussion"> |
| |
| <p>Press the alt key and hold it down until doAltUp() is called or a new page |
| is loaded.</p> |
| |
| |
| </div> |
| </div> |
| <div class="tags"> |
| |
| |
| </div><table class="source_code"> |
| <tr> |
| <td> |
| <pre class="lines"> |
| |
| |
| 255 |
| 256 |
| 257</pre> |
| </td> |
| <td> |
| <pre class="code"><span class="info file"># File 'rb/lib/selenium/client/legacy_driver.rb', line 255</span> |
| |
| <span class='kw'>def</span> <span class='id identifier rubyid_alt_key_down'>alt_key_down</span><span class='lparen'>(</span><span class='rparen'>)</span> |
| <span class='id identifier rubyid_remote_control_command'>remote_control_command</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>altKeyDown</span><span class='tstring_end'>"</span></span><span class='comma'>,</span> <span class='lbracket'>[</span><span class='rbracket'>]</span><span class='rparen'>)</span> |
| <span class='kw'>end</span></pre> |
| </td> |
| </tr> |
| </table> |
| </div> |
| |
| <div class="method_details "> |
| <h3 class="signature " id="alt_key_up-instance_method"> |
| |
| - (<tt>Object</tt>) <strong>alt_key_up</strong> |
| |
| |
| |
| |
| |
| </h3><div class="docstring"> |
| <div class="discussion"> |
| |
| <p>Release the alt key.</p> |
| |
| |
| </div> |
| </div> |
| <div class="tags"> |
| |
| |
| </div><table class="source_code"> |
| <tr> |
| <td> |
| <pre class="lines"> |
| |
| |
| 262 |
| 263 |
| 264</pre> |
| </td> |
| <td> |
| <pre class="code"><span class="info file"># File 'rb/lib/selenium/client/legacy_driver.rb', line 262</span> |
| |
| <span class='kw'>def</span> <span class='id identifier rubyid_alt_key_up'>alt_key_up</span><span class='lparen'>(</span><span class='rparen'>)</span> |
| <span class='id identifier rubyid_remote_control_command'>remote_control_command</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>altKeyUp</span><span class='tstring_end'>"</span></span><span class='comma'>,</span> <span class='lbracket'>[</span><span class='rbracket'>]</span><span class='rparen'>)</span> |
| <span class='kw'>end</span></pre> |
| </td> |
| </tr> |
| </table> |
| </div> |
| |
| <div class="method_details "> |
| <h3 class="signature " id="answer_on_next_prompt-instance_method"> |
| |
| - (<tt>Object</tt>) <strong>answer_on_next_prompt</strong>(answer) |
| |
| |
| |
| |
| |
| </h3><div class="docstring"> |
| <div class="discussion"> |
| |
| <p>Instructs Selenium to return the specified answer string in response to the |
| next JavaScript prompt [window.prompt()].</p> |
| |
| <p>'answer' is the answer to give in response to the prompt pop-up</p> |
| |
| |
| </div> |
| </div> |
| <div class="tags"> |
| |
| |
| </div><table class="source_code"> |
| <tr> |
| <td> |
| <pre class="lines"> |
| |
| |
| 775 |
| 776 |
| 777</pre> |
| </td> |
| <td> |
| <pre class="code"><span class="info file"># File 'rb/lib/selenium/client/legacy_driver.rb', line 775</span> |
| |
| <span class='kw'>def</span> <span class='id identifier rubyid_answer_on_next_prompt'>answer_on_next_prompt</span><span class='lparen'>(</span><span class='id identifier rubyid_answer'>answer</span><span class='rparen'>)</span> |
| <span class='id identifier rubyid_remote_control_command'>remote_control_command</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>answerOnNextPrompt</span><span class='tstring_end'>"</span></span><span class='comma'>,</span> <span class='lbracket'>[</span><span class='id identifier rubyid_answer'>answer</span><span class='comma'>,</span><span class='rbracket'>]</span><span class='rparen'>)</span> |
| <span class='kw'>end</span></pre> |
| </td> |
| </tr> |
| </table> |
| </div> |
| |
| <div class="method_details "> |
| <h3 class="signature " id="assign_id-instance_method"> |
| |
| - (<tt>Object</tt>) <strong>assign_id</strong>(locator, identifier) |
| |
| |
| |
| |
| |
| </h3><div class="docstring"> |
| <div class="discussion"> |
| |
| <p>Temporarily sets the "id" attribute of the specified element, so you can |
| locate it in the future using its ID rather than a slow/complicated XPath. |
| This ID will disappear once the page is reloaded.</p> |
| |
| <p>'locator' is an element locator pointing to an element 'identifier' is a |
| string to be used as the ID of the specified element</p> |
| |
| |
| </div> |
| </div> |
| <div class="tags"> |
| |
| |
| </div><table class="source_code"> |
| <tr> |
| <td> |
| <pre class="lines"> |
| |
| |
| 1352 |
| 1353 |
| 1354</pre> |
| </td> |
| <td> |
| <pre class="code"><span class="info file"># File 'rb/lib/selenium/client/legacy_driver.rb', line 1352</span> |
| |
| <span class='kw'>def</span> <span class='id identifier rubyid_assign_id'>assign_id</span><span class='lparen'>(</span><span class='id identifier rubyid_locator'>locator</span><span class='comma'>,</span><span class='id identifier rubyid_identifier'>identifier</span><span class='rparen'>)</span> |
| <span class='id identifier rubyid_remote_control_command'>remote_control_command</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>assignId</span><span class='tstring_end'>"</span></span><span class='comma'>,</span> <span class='lbracket'>[</span><span class='id identifier rubyid_locator'>locator</span><span class='comma'>,</span><span class='id identifier rubyid_identifier'>identifier</span><span class='comma'>,</span><span class='rbracket'>]</span><span class='rparen'>)</span> |
| <span class='kw'>end</span></pre> |
| </td> |
| </tr> |
| </table> |
| </div> |
| |
| <div class="method_details "> |
| <h3 class="signature " id="attach_file-instance_method"> |
| |
| - (<tt>Object</tt>) <strong>attach_file</strong>(fieldLocator, fileLocator) |
| |
| |
| |
| |
| |
| </h3><div class="docstring"> |
| <div class="discussion"> |
| |
| <p>Sets a file input (upload) field to the file listed in fileLocator</p> |
| |
| <p>'fieldLocator' is an element locator 'fileLocator' is a URL pointing to the |
| specified file. Before the file can be set in the input field |
| (fieldLocator), Selenium RC may need to transfer the file to the local |
| machine before attaching the file in a web page form. This is common in |
| selenium grid configurations where the RC server driving the browser is |
| not the same machine that started the test. Supported Browsers: Firefox |
| ("*chrome") only.</p> |
| |
| |
| </div> |
| </div> |
| <div class="tags"> |
| |
| |
| </div><table class="source_code"> |
| <tr> |
| <td> |
| <pre class="lines"> |
| |
| |
| 1631 |
| 1632 |
| 1633</pre> |
| </td> |
| <td> |
| <pre class="code"><span class="info file"># File 'rb/lib/selenium/client/legacy_driver.rb', line 1631</span> |
| |
| <span class='kw'>def</span> <span class='id identifier rubyid_attach_file'>attach_file</span><span class='lparen'>(</span><span class='id identifier rubyid_fieldLocator'>fieldLocator</span><span class='comma'>,</span><span class='id identifier rubyid_fileLocator'>fileLocator</span><span class='rparen'>)</span> |
| <span class='id identifier rubyid_remote_control_command'>remote_control_command</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>attachFile</span><span class='tstring_end'>"</span></span><span class='comma'>,</span> <span class='lbracket'>[</span><span class='id identifier rubyid_fieldLocator'>fieldLocator</span><span class='comma'>,</span><span class='id identifier rubyid_fileLocator'>fileLocator</span><span class='comma'>,</span><span class='rbracket'>]</span><span class='rparen'>)</span> |
| <span class='kw'>end</span></pre> |
| </td> |
| </tr> |
| </table> |
| </div> |
| |
| <div class="method_details "> |
| <h3 class="signature " id="capture_entire_page_screenshot-instance_method"> |
| |
| - (<tt>Object</tt>) <strong>capture_entire_page_screenshot</strong>(filename, kwargs) |
| |
| |
| |
| |
| |
| </h3><div class="docstring"> |
| <div class="discussion"> |
| |
| <p>Saves the entire contents of the current window canvas to a PNG file. |
| Contrast this with the captureScreenshot command, which captures the |
| contents of the OS viewport (i.e. whatever is currently being displayed on |
| the monitor), and is implemented in the RC only. Currently this only works |
| in Firefox when running in chrome mode, and in IE non-HTA using the |
| EXPERIMENTAL "Snapsie" utility. The Firefox implementation is mostly |
| borrowed from the Screengrab! Firefox extension. Please see <a |
| href="http://www.screengrab.org">www.screengrab.org</a> and <a |
| href="http://snapsie.sourceforge.net">snapsie.sourceforge.net</a>/ for |
| details.</p> |
| |
| <p>'filename' is the path to the file to persist the screenshot as. No |
| filename extension will be appended by default. |
| Directories will not be created if they do not exist, |
| and an exception will be thrown, possibly by native code.</p> |
| <table class="rdoc-list"><tr><td class="rdoc-term"><p>'kwargs' is a kwargs string that modifies the way the screenshot is captured. Example: "background=#CCFFDD" . Currently valid options: * background</p></td> |
| <td> |
| <p>the background CSS for the HTML document. This may be |
| useful to set for capturing screenshots of |
| less-than-ideal layouts, for example where absolute |
| positioning causes the calculation of the canvas |
| dimension to fail and a black background is exposed |
| (possibly obscuring black text).</p> |
| </td></tr></table> |
| |
| |
| </div> |
| </div> |
| <div class="tags"> |
| |
| |
| </div><table class="source_code"> |
| <tr> |
| <td> |
| <pre class="lines"> |
| |
| |
| 1565 |
| 1566 |
| 1567</pre> |
| </td> |
| <td> |
| <pre class="code"><span class="info file"># File 'rb/lib/selenium/client/legacy_driver.rb', line 1565</span> |
| |
| <span class='kw'>def</span> <span class='id identifier rubyid_capture_entire_page_screenshot'>capture_entire_page_screenshot</span><span class='lparen'>(</span><span class='id identifier rubyid_filename'>filename</span><span class='comma'>,</span><span class='id identifier rubyid_kwargs'>kwargs</span><span class='rparen'>)</span> |
| <span class='id identifier rubyid_remote_control_command'>remote_control_command</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>captureEntirePageScreenshot</span><span class='tstring_end'>"</span></span><span class='comma'>,</span> <span class='lbracket'>[</span><span class='id identifier rubyid_filename'>filename</span><span class='comma'>,</span><span class='id identifier rubyid_kwargs'>kwargs</span><span class='comma'>,</span><span class='rbracket'>]</span><span class='rparen'>)</span> |
| <span class='kw'>end</span></pre> |
| </td> |
| </tr> |
| </table> |
| </div> |
| |
| <div class="method_details "> |
| <h3 class="signature " id="capture_entire_page_screenshot_to_string-instance_method"> |
| |
| - (<tt>Object</tt>) <strong>capture_entire_page_screenshot_to_string</strong>(kwargs) |
| |
| |
| |
| |
| |
| </h3><div class="docstring"> |
| <div class="discussion"> |
| |
| <p>Downloads a screenshot of the browser current window canvas to a based 64 |
| encoded PNG file. The <em>entire</em> windows canvas is captured, including |
| parts rendered outside of the current view port.</p> |
| |
| <p>Currently this only works in Mozilla and when running in chrome mode.</p> |
| |
| <p>'kwargs' is A kwargs string that modifies the way the screenshot is |
| captured. Example: "background=#CCFFDD". This may be useful to set for |
| capturing screenshots of less-than-ideal layouts, for example where |
| absolute positioning causes the calculation of the canvas dimension to fail |
| and a black background is exposed (possibly obscuring black text).</p> |
| |
| |
| </div> |
| </div> |
| <div class="tags"> |
| |
| |
| </div><table class="source_code"> |
| <tr> |
| <td> |
| <pre class="lines"> |
| |
| |
| 1658 |
| 1659 |
| 1660</pre> |
| </td> |
| <td> |
| <pre class="code"><span class="info file"># File 'rb/lib/selenium/client/legacy_driver.rb', line 1658</span> |
| |
| <span class='kw'>def</span> <span class='id identifier rubyid_capture_entire_page_screenshot_to_string'>capture_entire_page_screenshot_to_string</span><span class='lparen'>(</span><span class='id identifier rubyid_kwargs'>kwargs</span><span class='rparen'>)</span> |
| <span class='kw'>return</span> <span class='id identifier rubyid_string_command'>string_command</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>captureEntirePageScreenshotToString</span><span class='tstring_end'>"</span></span><span class='comma'>,</span> <span class='lbracket'>[</span><span class='id identifier rubyid_kwargs'>kwargs</span><span class='comma'>,</span><span class='rbracket'>]</span><span class='rparen'>)</span> |
| <span class='kw'>end</span></pre> |
| </td> |
| </tr> |
| </table> |
| </div> |
| |
| <div class="method_details "> |
| <h3 class="signature " id="capture_screenshot-instance_method"> |
| |
| - (<tt>Object</tt>) <strong>capture_screenshot</strong>(filename) |
| |
| |
| |
| |
| |
| </h3><div class="docstring"> |
| <div class="discussion"> |
| |
| <p>Captures a PNG screenshot to the specified file.</p> |
| |
| <p>'filename' is the absolute path to the file to be written, e.g. |
| "c:blahscreenshot.png"</p> |
| |
| |
| </div> |
| </div> |
| <div class="tags"> |
| |
| |
| </div><table class="source_code"> |
| <tr> |
| <td> |
| <pre class="lines"> |
| |
| |
| 1639 |
| 1640 |
| 1641</pre> |
| </td> |
| <td> |
| <pre class="code"><span class="info file"># File 'rb/lib/selenium/client/legacy_driver.rb', line 1639</span> |
| |
| <span class='kw'>def</span> <span class='id identifier rubyid_capture_screenshot'>capture_screenshot</span><span class='lparen'>(</span><span class='id identifier rubyid_filename'>filename</span><span class='rparen'>)</span> |
| <span class='id identifier rubyid_remote_control_command'>remote_control_command</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>captureScreenshot</span><span class='tstring_end'>"</span></span><span class='comma'>,</span> <span class='lbracket'>[</span><span class='id identifier rubyid_filename'>filename</span><span class='comma'>,</span><span class='rbracket'>]</span><span class='rparen'>)</span> |
| <span class='kw'>end</span></pre> |
| </td> |
| </tr> |
| </table> |
| </div> |
| |
| <div class="method_details "> |
| <h3 class="signature " id="capture_screenshot_to_string-instance_method"> |
| |
| - (<tt>Object</tt>) <strong>capture_screenshot_to_string</strong> |
| |
| |
| |
| |
| |
| </h3><div class="docstring"> |
| <div class="discussion"> |
| |
| <p>Capture a PNG screenshot. It then returns the file as a base 64 encoded |
| string.</p> |
| |
| |
| </div> |
| </div> |
| <div class="tags"> |
| |
| |
| </div><table class="source_code"> |
| <tr> |
| <td> |
| <pre class="lines"> |
| |
| |
| 1646 |
| 1647 |
| 1648</pre> |
| </td> |
| <td> |
| <pre class="code"><span class="info file"># File 'rb/lib/selenium/client/legacy_driver.rb', line 1646</span> |
| |
| <span class='kw'>def</span> <span class='id identifier rubyid_capture_screenshot_to_string'>capture_screenshot_to_string</span><span class='lparen'>(</span><span class='rparen'>)</span> |
| <span class='kw'>return</span> <span class='id identifier rubyid_string_command'>string_command</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>captureScreenshotToString</span><span class='tstring_end'>"</span></span><span class='comma'>,</span> <span class='lbracket'>[</span><span class='rbracket'>]</span><span class='rparen'>)</span> |
| <span class='kw'>end</span></pre> |
| </td> |
| </tr> |
| </table> |
| </div> |
| |
| <div class="method_details "> |
| <h3 class="signature " id="check-instance_method"> |
| |
| - (<tt>Object</tt>) <strong>check</strong>(locator) |
| |
| |
| |
| |
| |
| </h3><div class="docstring"> |
| <div class="discussion"> |
| |
| <p>Check a toggle-button (checkbox/radio)</p> |
| |
| <p>'locator' is an element locator</p> |
| |
| |
| </div> |
| </div> |
| <div class="tags"> |
| |
| |
| </div><table class="source_code"> |
| <tr> |
| <td> |
| <pre class="lines"> |
| |
| |
| 464 |
| 465 |
| 466</pre> |
| </td> |
| <td> |
| <pre class="code"><span class="info file"># File 'rb/lib/selenium/client/legacy_driver.rb', line 464</span> |
| |
| <span class='kw'>def</span> <span class='id identifier rubyid_check'>check</span><span class='lparen'>(</span><span class='id identifier rubyid_locator'>locator</span><span class='rparen'>)</span> |
| <span class='id identifier rubyid_remote_control_command'>remote_control_command</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>check</span><span class='tstring_end'>"</span></span><span class='comma'>,</span> <span class='lbracket'>[</span><span class='id identifier rubyid_locator'>locator</span><span class='comma'>,</span><span class='rbracket'>]</span><span class='rparen'>)</span> |
| <span class='kw'>end</span></pre> |
| </td> |
| </tr> |
| </table> |
| </div> |
| |
| <div class="method_details "> |
| <h3 class="signature " id="choose_cancel_on_next_confirmation-instance_method"> |
| |
| - (<tt>Object</tt>) <strong>choose_cancel_on_next_confirmation</strong> |
| |
| |
| |
| |
| |
| </h3><div class="docstring"> |
| <div class="discussion"> |
| |
| <p>By default, Selenium's overridden window.confirm() function will return |
| true, as if the user had manually clicked OK; after running this command, |
| the next call to confirm() will return false, as if the user had clicked |
| Cancel. Selenium will then resume using the default behavior for future |
| confirmations, automatically returning true (OK) unless/until you |
| explicitly call this command for each confirmation.</p> |
| |
| <p>Take note - every time a confirmation comes up, you must consume it with a |
| corresponding getConfirmation, or else the next selenium operation will |
| fail.</p> |
| |
| |
| </div> |
| </div> |
| <div class="tags"> |
| |
| |
| </div><table class="source_code"> |
| <tr> |
| <td> |
| <pre class="lines"> |
| |
| |
| 744 |
| 745 |
| 746</pre> |
| </td> |
| <td> |
| <pre class="code"><span class="info file"># File 'rb/lib/selenium/client/legacy_driver.rb', line 744</span> |
| |
| <span class='kw'>def</span> <span class='id identifier rubyid_choose_cancel_on_next_confirmation'>choose_cancel_on_next_confirmation</span><span class='lparen'>(</span><span class='rparen'>)</span> |
| <span class='id identifier rubyid_remote_control_command'>remote_control_command</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>chooseCancelOnNextConfirmation</span><span class='tstring_end'>"</span></span><span class='comma'>,</span> <span class='lbracket'>[</span><span class='rbracket'>]</span><span class='rparen'>)</span> |
| <span class='kw'>end</span></pre> |
| </td> |
| </tr> |
| </table> |
| </div> |
| |
| <div class="method_details "> |
| <h3 class="signature " id="choose_ok_on_next_confirmation-instance_method"> |
| |
| - (<tt>Object</tt>) <strong>choose_ok_on_next_confirmation</strong> |
| |
| |
| |
| |
| |
| </h3><div class="docstring"> |
| <div class="discussion"> |
| |
| <p>Undo the effect of calling chooseCancelOnNextConfirmation. Note that |
| Selenium's overridden window.confirm() function will normally automatically |
| return true, as if the user had manually clicked OK, so you shouldn't need |
| to use this command unless for some reason you need to change your mind |
| prior to the next confirmation. After any confirmation, Selenium will |
| resume using the default behavior for future confirmations, automatically |
| returning true (OK) unless/until you explicitly call |
| chooseCancelOnNextConfirmation for each confirmation.</p> |
| |
| <p>Take note - every time a confirmation comes up, you must consume it with a |
| corresponding getConfirmation, or else the next selenium operation will |
| fail.</p> |
| |
| |
| </div> |
| </div> |
| <div class="tags"> |
| |
| |
| </div><table class="source_code"> |
| <tr> |
| <td> |
| <pre class="lines"> |
| |
| |
| 766 |
| 767 |
| 768</pre> |
| </td> |
| <td> |
| <pre class="code"><span class="info file"># File 'rb/lib/selenium/client/legacy_driver.rb', line 766</span> |
| |
| <span class='kw'>def</span> <span class='id identifier rubyid_choose_ok_on_next_confirmation'>choose_ok_on_next_confirmation</span><span class='lparen'>(</span><span class='rparen'>)</span> |
| <span class='id identifier rubyid_remote_control_command'>remote_control_command</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>chooseOkOnNextConfirmation</span><span class='tstring_end'>"</span></span><span class='comma'>,</span> <span class='lbracket'>[</span><span class='rbracket'>]</span><span class='rparen'>)</span> |
| <span class='kw'>end</span></pre> |
| </td> |
| </tr> |
| </table> |
| </div> |
| |
| <div class="method_details "> |
| <h3 class="signature " id="click-instance_method"> |
| |
| - (<tt>Object</tt>) <strong>click</strong>(locator) |
| |
| |
| |
| |
| |
| </h3><div class="docstring"> |
| <div class="discussion"> |
| |
| <p>Clicks on a link, button, checkbox or radio button. If the click action |
| causes a new page to load (like a link usually does), call |
| waitForPageToLoad.</p> |
| |
| <p>'locator' is an element locator</p> |
| |
| |
| </div> |
| </div> |
| <div class="tags"> |
| |
| |
| </div><table class="source_code"> |
| <tr> |
| <td> |
| <pre class="lines"> |
| |
| |
| 144 |
| 145 |
| 146</pre> |
| </td> |
| <td> |
| <pre class="code"><span class="info file"># File 'rb/lib/selenium/client/legacy_driver.rb', line 144</span> |
| |
| <span class='kw'>def</span> <span class='id identifier rubyid_click'>click</span><span class='lparen'>(</span><span class='id identifier rubyid_locator'>locator</span><span class='rparen'>)</span> |
| <span class='id identifier rubyid_remote_control_command'>remote_control_command</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>click</span><span class='tstring_end'>"</span></span><span class='comma'>,</span> <span class='lbracket'>[</span><span class='id identifier rubyid_locator'>locator</span><span class='comma'>,</span><span class='rbracket'>]</span><span class='rparen'>)</span> |
| <span class='kw'>end</span></pre> |
| </td> |
| </tr> |
| </table> |
| </div> |
| |
| <div class="method_details "> |
| <h3 class="signature " id="click_at-instance_method"> |
| |
| - (<tt>Object</tt>) <strong>click_at</strong>(locator, coordString) |
| |
| |
| |
| |
| |
| </h3><div class="docstring"> |
| <div class="discussion"> |
| |
| <p>Clicks on a link, button, checkbox or radio button. If the click action |
| causes a new page to load (like a link usually does), call |
| waitForPageToLoad.</p> |
| |
| <p>'locator' is an element locator 'coordString' is specifies the x,y position |
| (i.e. - 10,20) of the mouse event relative to the element returned by |
| the locator.</p> |
| |
| |
| </div> |
| </div> |
| <div class="tags"> |
| |
| |
| </div><table class="source_code"> |
| <tr> |
| <td> |
| <pre class="lines"> |
| |
| |
| 173 |
| 174 |
| 175</pre> |
| </td> |
| <td> |
| <pre class="code"><span class="info file"># File 'rb/lib/selenium/client/legacy_driver.rb', line 173</span> |
| |
| <span class='kw'>def</span> <span class='id identifier rubyid_click_at'>click_at</span><span class='lparen'>(</span><span class='id identifier rubyid_locator'>locator</span><span class='comma'>,</span><span class='id identifier rubyid_coordString'>coordString</span><span class='rparen'>)</span> |
| <span class='id identifier rubyid_remote_control_command'>remote_control_command</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>clickAt</span><span class='tstring_end'>"</span></span><span class='comma'>,</span> <span class='lbracket'>[</span><span class='id identifier rubyid_locator'>locator</span><span class='comma'>,</span><span class='id identifier rubyid_coordString'>coordString</span><span class='comma'>,</span><span class='rbracket'>]</span><span class='rparen'>)</span> |
| <span class='kw'>end</span></pre> |
| </td> |
| </tr> |
| </table> |
| </div> |
| |
| <div class="method_details "> |
| <h3 class="signature " id="close-instance_method"> |
| |
| - (<tt>Object</tt>) <strong>close</strong> |
| |
| |
| |
| |
| |
| </h3><div class="docstring"> |
| <div class="discussion"> |
| |
| <p>Simulates the user clicking the "close" button in the titlebar of a popup |
| window or tab.</p> |
| |
| |
| </div> |
| </div> |
| <div class="tags"> |
| |
| |
| </div><table class="source_code"> |
| <tr> |
| <td> |
| <pre class="lines"> |
| |
| |
| 797 |
| 798 |
| 799</pre> |
| </td> |
| <td> |
| <pre class="code"><span class="info file"># File 'rb/lib/selenium/client/legacy_driver.rb', line 797</span> |
| |
| <span class='kw'>def</span> <span class='id identifier rubyid_close'>close</span><span class='lparen'>(</span><span class='rparen'>)</span> |
| <span class='id identifier rubyid_remote_control_command'>remote_control_command</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>close</span><span class='tstring_end'>"</span></span><span class='comma'>,</span> <span class='lbracket'>[</span><span class='rbracket'>]</span><span class='rparen'>)</span> |
| <span class='kw'>end</span></pre> |
| </td> |
| </tr> |
| </table> |
| </div> |
| |
| <div class="method_details "> |
| <h3 class="signature " id="context_menu-instance_method"> |
| |
| - (<tt>Object</tt>) <strong>context_menu</strong>(locator) |
| |
| |
| |
| |
| |
| </h3><div class="docstring"> |
| <div class="discussion"> |
| |
| <p>Simulates opening the context menu for the specified element (as might |
| happen if the user "right-clicked" on the element).</p> |
| |
| <p>'locator' is an element locator</p> |
| |
| |
| </div> |
| </div> |
| <div class="tags"> |
| |
| |
| </div><table class="source_code"> |
| <tr> |
| <td> |
| <pre class="lines"> |
| |
| |
| 162 |
| 163 |
| 164</pre> |
| </td> |
| <td> |
| <pre class="code"><span class="info file"># File 'rb/lib/selenium/client/legacy_driver.rb', line 162</span> |
| |
| <span class='kw'>def</span> <span class='id identifier rubyid_context_menu'>context_menu</span><span class='lparen'>(</span><span class='id identifier rubyid_locator'>locator</span><span class='rparen'>)</span> |
| <span class='id identifier rubyid_remote_control_command'>remote_control_command</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>contextMenu</span><span class='tstring_end'>"</span></span><span class='comma'>,</span> <span class='lbracket'>[</span><span class='id identifier rubyid_locator'>locator</span><span class='comma'>,</span><span class='rbracket'>]</span><span class='rparen'>)</span> |
| <span class='kw'>end</span></pre> |
| </td> |
| </tr> |
| </table> |
| </div> |
| |
| <div class="method_details "> |
| <h3 class="signature " id="context_menu_at-instance_method"> |
| |
| - (<tt>Object</tt>) <strong>context_menu_at</strong>(locator, coordString) |
| |
| |
| |
| |
| |
| </h3><div class="docstring"> |
| <div class="discussion"> |
| |
| <p>Simulates opening the context menu for the specified element (as might |
| happen if the user "right-clicked" on the element).</p> |
| |
| <p>'locator' is an element locator 'coordString' is specifies the x,y position |
| (i.e. - 10,20) of the mouse event relative to the element returned by |
| the locator.</p> |
| |
| |
| </div> |
| </div> |
| <div class="tags"> |
| |
| |
| </div><table class="source_code"> |
| <tr> |
| <td> |
| <pre class="lines"> |
| |
| |
| 193 |
| 194 |
| 195</pre> |
| </td> |
| <td> |
| <pre class="code"><span class="info file"># File 'rb/lib/selenium/client/legacy_driver.rb', line 193</span> |
| |
| <span class='kw'>def</span> <span class='id identifier rubyid_context_menu_at'>context_menu_at</span><span class='lparen'>(</span><span class='id identifier rubyid_locator'>locator</span><span class='comma'>,</span><span class='id identifier rubyid_coordString'>coordString</span><span class='rparen'>)</span> |
| <span class='id identifier rubyid_remote_control_command'>remote_control_command</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>contextMenuAt</span><span class='tstring_end'>"</span></span><span class='comma'>,</span> <span class='lbracket'>[</span><span class='id identifier rubyid_locator'>locator</span><span class='comma'>,</span><span class='id identifier rubyid_coordString'>coordString</span><span class='comma'>,</span><span class='rbracket'>]</span><span class='rparen'>)</span> |
| <span class='kw'>end</span></pre> |
| </td> |
| </tr> |
| </table> |
| </div> |
| |
| <div class="method_details "> |
| <h3 class="signature " id="control_key_down-instance_method"> |
| |
| - (<tt>Object</tt>) <strong>control_key_down</strong> |
| |
| |
| |
| |
| |
| </h3><div class="docstring"> |
| <div class="discussion"> |
| |
| <p>Press the control key and hold it down until doControlUp() is called or a |
| new page is loaded.</p> |
| |
| |
| </div> |
| </div> |
| <div class="tags"> |
| |
| |
| </div><table class="source_code"> |
| <tr> |
| <td> |
| <pre class="lines"> |
| |
| |
| 269 |
| 270 |
| 271</pre> |
| </td> |
| <td> |
| <pre class="code"><span class="info file"># File 'rb/lib/selenium/client/legacy_driver.rb', line 269</span> |
| |
| <span class='kw'>def</span> <span class='id identifier rubyid_control_key_down'>control_key_down</span><span class='lparen'>(</span><span class='rparen'>)</span> |
| <span class='id identifier rubyid_remote_control_command'>remote_control_command</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>controlKeyDown</span><span class='tstring_end'>"</span></span><span class='comma'>,</span> <span class='lbracket'>[</span><span class='rbracket'>]</span><span class='rparen'>)</span> |
| <span class='kw'>end</span></pre> |
| </td> |
| </tr> |
| </table> |
| </div> |
| |
| <div class="method_details "> |
| <h3 class="signature " id="control_key_up-instance_method"> |
| |
| - (<tt>Object</tt>) <strong>control_key_up</strong> |
| |
| |
| |
| |
| |
| </h3><div class="docstring"> |
| <div class="discussion"> |
| |
| <p>Release the control key.</p> |
| |
| |
| </div> |
| </div> |
| <div class="tags"> |
| |
| |
| </div><table class="source_code"> |
| <tr> |
| <td> |
| <pre class="lines"> |
| |
| |
| 276 |
| 277 |
| 278</pre> |
| </td> |
| <td> |
| <pre class="code"><span class="info file"># File 'rb/lib/selenium/client/legacy_driver.rb', line 276</span> |
| |
| <span class='kw'>def</span> <span class='id identifier rubyid_control_key_up'>control_key_up</span><span class='lparen'>(</span><span class='rparen'>)</span> |
| <span class='id identifier rubyid_remote_control_command'>remote_control_command</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>controlKeyUp</span><span class='tstring_end'>"</span></span><span class='comma'>,</span> <span class='lbracket'>[</span><span class='rbracket'>]</span><span class='rparen'>)</span> |
| <span class='kw'>end</span></pre> |
| </td> |
| </tr> |
| </table> |
| </div> |
| |
| <div class="method_details "> |
| <h3 class="signature " id="create_cookie-instance_method"> |
| |
| - (<tt>Object</tt>) <strong>create_cookie</strong>(nameValuePair, optionsString) |
| |
| |
| |
| |
| |
| </h3><div class="docstring"> |
| <div class="discussion"> |
| |
| <p>Create a new cookie whose path and domain are same with those of current |
| page under test, unless you specified a path for this cookie explicitly.</p> |
| |
| <p>'nameValuePair' is name and value of the cookie in a format "name=value" |
| 'optionsString' is options for the cookie. Currently supported options |
| include 'path', 'max_age' and 'domain'. the optionsString's format is |
| "path=/path/, max_age=60, domain=.foo.com". The order of options are |
| irrelevant, the unit of the value of 'max_age' is second. Note that |
| specifying a domain that isn't a subset of the current domain will |
| usually fail.</p> |
| |
| |
| </div> |
| </div> |
| <div class="tags"> |
| |
| |
| </div><table class="source_code"> |
| <tr> |
| <td> |
| <pre class="lines"> |
| |
| |
| 1474 |
| 1475 |
| 1476</pre> |
| </td> |
| <td> |
| <pre class="code"><span class="info file"># File 'rb/lib/selenium/client/legacy_driver.rb', line 1474</span> |
| |
| <span class='kw'>def</span> <span class='id identifier rubyid_create_cookie'>create_cookie</span><span class='lparen'>(</span><span class='id identifier rubyid_nameValuePair'>nameValuePair</span><span class='comma'>,</span><span class='id identifier rubyid_optionsString'>optionsString</span><span class='rparen'>)</span> |
| <span class='id identifier rubyid_remote_control_command'>remote_control_command</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>createCookie</span><span class='tstring_end'>"</span></span><span class='comma'>,</span> <span class='lbracket'>[</span><span class='id identifier rubyid_nameValuePair'>nameValuePair</span><span class='comma'>,</span><span class='id identifier rubyid_optionsString'>optionsString</span><span class='comma'>,</span><span class='rbracket'>]</span><span class='rparen'>)</span> |
| <span class='kw'>end</span></pre> |
| </td> |
| </tr> |
| </table> |
| </div> |
| |
| <div class="method_details "> |
| <h3 class="signature " id="delete_all_visible_cookies-instance_method"> |
| |
| - (<tt>Object</tt>) <strong>delete_all_visible_cookies</strong> |
| |
| |
| |
| |
| |
| </h3><div class="docstring"> |
| <div class="discussion"> |
| |
| <p>Calls deleteCookie with recurse=true on all cookies visible to the current |
| page. As noted on the documentation for deleteCookie, recurse=true can be |
| much slower than simply deleting the cookies using a known domain/path.</p> |
| |
| |
| </div> |
| </div> |
| <div class="tags"> |
| |
| |
| </div><table class="source_code"> |
| <tr> |
| <td> |
| <pre class="lines"> |
| |
| |
| 1501 |
| 1502 |
| 1503</pre> |
| </td> |
| <td> |
| <pre class="code"><span class="info file"># File 'rb/lib/selenium/client/legacy_driver.rb', line 1501</span> |
| |
| <span class='kw'>def</span> <span class='id identifier rubyid_delete_all_visible_cookies'>delete_all_visible_cookies</span><span class='lparen'>(</span><span class='rparen'>)</span> |
| <span class='id identifier rubyid_remote_control_command'>remote_control_command</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>deleteAllVisibleCookies</span><span class='tstring_end'>"</span></span><span class='comma'>,</span> <span class='lbracket'>[</span><span class='rbracket'>]</span><span class='rparen'>)</span> |
| <span class='kw'>end</span></pre> |
| </td> |
| </tr> |
| </table> |
| </div> |
| |
| <div class="method_details "> |
| <h3 class="signature " id="delete_cookie-instance_method"> |
| |
| - (<tt>Object</tt>) <strong>delete_cookie</strong>(name, optionsString) |
| |
| |
| |
| |
| |
| </h3><div class="docstring"> |
| <div class="discussion"> |
| |
| <p>Delete a named cookie with specified path and domain. Be careful; to |
| delete a cookie, you need to delete it using the exact same path and domain |
| that were used to create the cookie. If the path is wrong, or the domain is |
| wrong, the cookie simply won't be deleted. Also note that specifying a |
| domain that isn't a subset of the current domain will usually fail.</p> |
| |
| <p>Since there's no way to discover at runtime the original path and domain of |
| a given cookie, we've added an option called 'recurse' to try all |
| sub-domains of the current domain with all paths that are a subset of the |
| current path. Beware; this option can be slow. In big-O notation, it |
| operates in O(n*m) time, where n is the number of dots in the domain name |
| and m is the number of slashes in the path.</p> |
| |
| <p>'name' is the name of the cookie to be deleted 'optionsString' is options |
| for the cookie. Currently supported options include 'path', 'domain' |
| and 'recurse.' The optionsString's format is "path=/path/, domain=.foo.com, |
| recurse=true". The order of options are irrelevant. Note that |
| specifying a domain that isn't a subset of the current domain will |
| usually fail.</p> |
| |
| |
| </div> |
| </div> |
| <div class="tags"> |
| |
| |
| </div><table class="source_code"> |
| <tr> |
| <td> |
| <pre class="lines"> |
| |
| |
| 1492 |
| 1493 |
| 1494</pre> |
| </td> |
| <td> |
| <pre class="code"><span class="info file"># File 'rb/lib/selenium/client/legacy_driver.rb', line 1492</span> |
| |
| <span class='kw'>def</span> <span class='id identifier rubyid_delete_cookie'>delete_cookie</span><span class='lparen'>(</span><span class='id identifier rubyid_name'>name</span><span class='comma'>,</span><span class='id identifier rubyid_optionsString'>optionsString</span><span class='rparen'>)</span> |
| <span class='id identifier rubyid_remote_control_command'>remote_control_command</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>deleteCookie</span><span class='tstring_end'>"</span></span><span class='comma'>,</span> <span class='lbracket'>[</span><span class='id identifier rubyid_name'>name</span><span class='comma'>,</span><span class='id identifier rubyid_optionsString'>optionsString</span><span class='comma'>,</span><span class='rbracket'>]</span><span class='rparen'>)</span> |
| <span class='kw'>end</span></pre> |
| </td> |
| </tr> |
| </table> |
| </div> |
| |
| <div class="method_details "> |
| <h3 class="signature " id="deselect_pop_up-instance_method"> |
| |
| - (<tt>Object</tt>) <strong>deselect_pop_up</strong> |
| |
| |
| |
| |
| |
| </h3><div class="docstring"> |
| <div class="discussion"> |
| |
| <p>Selects the main window. Functionally equivalent to using |
| <tt>selectWindow()</tt> and specifying no value for <tt>windowID</tt>.</p> |
| |
| |
| </div> |
| </div> |
| <div class="tags"> |
| |
| |
| </div><table class="source_code"> |
| <tr> |
| <td> |
| <pre class="lines"> |
| |
| |
| 666 |
| 667 |
| 668</pre> |
| </td> |
| <td> |
| <pre class="code"><span class="info file"># File 'rb/lib/selenium/client/legacy_driver.rb', line 666</span> |
| |
| <span class='kw'>def</span> <span class='id identifier rubyid_deselect_pop_up'>deselect_pop_up</span><span class='lparen'>(</span><span class='rparen'>)</span> |
| <span class='id identifier rubyid_remote_control_command'>remote_control_command</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>deselectPopUp</span><span class='tstring_end'>"</span></span><span class='comma'>,</span> <span class='lbracket'>[</span><span class='rbracket'>]</span><span class='rparen'>)</span> |
| <span class='kw'>end</span></pre> |
| </td> |
| </tr> |
| </table> |
| </div> |
| |
| <div class="method_details "> |
| <h3 class="signature " id="double_click-instance_method"> |
| |
| - (<tt>Object</tt>) <strong>double_click</strong>(locator) |
| |
| |
| |
| |
| |
| </h3><div class="docstring"> |
| <div class="discussion"> |
| |
| <p>Double clicks on a link, button, checkbox or radio button. If the double |
| click action causes a new page to load (like a link usually does), call |
| waitForPageToLoad.</p> |
| |
| <p>'locator' is an element locator</p> |
| |
| |
| </div> |
| </div> |
| <div class="tags"> |
| |
| |
| </div><table class="source_code"> |
| <tr> |
| <td> |
| <pre class="lines"> |
| |
| |
| 154 |
| 155 |
| 156</pre> |
| </td> |
| <td> |
| <pre class="code"><span class="info file"># File 'rb/lib/selenium/client/legacy_driver.rb', line 154</span> |
| |
| <span class='kw'>def</span> <span class='id identifier rubyid_double_click'>double_click</span><span class='lparen'>(</span><span class='id identifier rubyid_locator'>locator</span><span class='rparen'>)</span> |
| <span class='id identifier rubyid_remote_control_command'>remote_control_command</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>doubleClick</span><span class='tstring_end'>"</span></span><span class='comma'>,</span> <span class='lbracket'>[</span><span class='id identifier rubyid_locator'>locator</span><span class='comma'>,</span><span class='rbracket'>]</span><span class='rparen'>)</span> |
| <span class='kw'>end</span></pre> |
| </td> |
| </tr> |
| </table> |
| </div> |
| |
| <div class="method_details "> |
| <h3 class="signature " id="double_click_at-instance_method"> |
| |
| - (<tt>Object</tt>) <strong>double_click_at</strong>(locator, coordString) |
| |
| |
| |
| |
| |
| </h3><div class="docstring"> |
| <div class="discussion"> |
| |
| <p>Doubleclicks on a link, button, checkbox or radio button. If the action |
| causes a new page to load (like a link usually does), call |
| waitForPageToLoad.</p> |
| |
| <p>'locator' is an element locator 'coordString' is specifies the x,y position |
| (i.e. - 10,20) of the mouse event relative to the element returned by |
| the locator.</p> |
| |
| |
| </div> |
| </div> |
| <div class="tags"> |
| |
| |
| </div><table class="source_code"> |
| <tr> |
| <td> |
| <pre class="lines"> |
| |
| |
| 184 |
| 185 |
| 186</pre> |
| </td> |
| <td> |
| <pre class="code"><span class="info file"># File 'rb/lib/selenium/client/legacy_driver.rb', line 184</span> |
| |
| <span class='kw'>def</span> <span class='id identifier rubyid_double_click_at'>double_click_at</span><span class='lparen'>(</span><span class='id identifier rubyid_locator'>locator</span><span class='comma'>,</span><span class='id identifier rubyid_coordString'>coordString</span><span class='rparen'>)</span> |
| <span class='id identifier rubyid_remote_control_command'>remote_control_command</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>doubleClickAt</span><span class='tstring_end'>"</span></span><span class='comma'>,</span> <span class='lbracket'>[</span><span class='id identifier rubyid_locator'>locator</span><span class='comma'>,</span><span class='id identifier rubyid_coordString'>coordString</span><span class='comma'>,</span><span class='rbracket'>]</span><span class='rparen'>)</span> |
| <span class='kw'>end</span></pre> |
| </td> |
| </tr> |
| </table> |
| </div> |
| |
| <div class="method_details "> |
| <h3 class="signature " id="drag_and_drop-instance_method"> |
| |
| - (<tt>Object</tt>) <strong>drag_and_drop</strong>(locator, movementsString) |
| |
| |
| |
| |
| |
| </h3><div class="docstring"> |
| <div class="discussion"> |
| |
| <p>Drags an element a certain distance and then drops it</p> |
| |
| <p>'locator' is an element locator 'movementsString' is offset in pixels from |
| the current location to which the element should be moved, e.g., "+70,-300"</p> |
| |
| |
| </div> |
| </div> |
| <div class="tags"> |
| |
| |
| </div><table class="source_code"> |
| <tr> |
| <td> |
| <pre class="lines"> |
| |
| |
| 1185 |
| 1186 |
| 1187</pre> |
| </td> |
| <td> |
| <pre class="code"><span class="info file"># File 'rb/lib/selenium/client/legacy_driver.rb', line 1185</span> |
| |
| <span class='kw'>def</span> <span class='id identifier rubyid_drag_and_drop'>drag_and_drop</span><span class='lparen'>(</span><span class='id identifier rubyid_locator'>locator</span><span class='comma'>,</span><span class='id identifier rubyid_movementsString'>movementsString</span><span class='rparen'>)</span> |
| <span class='id identifier rubyid_remote_control_command'>remote_control_command</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>dragAndDrop</span><span class='tstring_end'>"</span></span><span class='comma'>,</span> <span class='lbracket'>[</span><span class='id identifier rubyid_locator'>locator</span><span class='comma'>,</span><span class='id identifier rubyid_movementsString'>movementsString</span><span class='comma'>,</span><span class='rbracket'>]</span><span class='rparen'>)</span> |
| <span class='kw'>end</span></pre> |
| </td> |
| </tr> |
| </table> |
| </div> |
| |
| <div class="method_details "> |
| <h3 class="signature " id="drag_and_drop_to_object-instance_method"> |
| |
| - (<tt>Object</tt>) <strong>drag_and_drop_to_object</strong>(locatorOfObjectToBeDragged, locatorOfDragDestinationObject) |
| |
| |
| |
| |
| |
| </h3><div class="docstring"> |
| <div class="discussion"> |
| |
| <p>Drags an element and drops it on another element</p> |
| |
| <p>'locatorOfObjectToBeDragged' is an element to be dragged |
| 'locatorOfDragDestinationObject' is an element whose location (i.e., whose |
| center-most pixel) will be the point where locatorOfObjectToBeDragged is |
| dropped</p> |
| |
| |
| </div> |
| </div> |
| <div class="tags"> |
| |
| |
| </div><table class="source_code"> |
| <tr> |
| <td> |
| <pre class="lines"> |
| |
| |
| 1194 |
| 1195 |
| 1196</pre> |
| </td> |
| <td> |
| <pre class="code"><span class="info file"># File 'rb/lib/selenium/client/legacy_driver.rb', line 1194</span> |
| |
| <span class='kw'>def</span> <span class='id identifier rubyid_drag_and_drop_to_object'>drag_and_drop_to_object</span><span class='lparen'>(</span><span class='id identifier rubyid_locatorOfObjectToBeDragged'>locatorOfObjectToBeDragged</span><span class='comma'>,</span><span class='id identifier rubyid_locatorOfDragDestinationObject'>locatorOfDragDestinationObject</span><span class='rparen'>)</span> |
| <span class='id identifier rubyid_remote_control_command'>remote_control_command</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>dragAndDropToObject</span><span class='tstring_end'>"</span></span><span class='comma'>,</span> <span class='lbracket'>[</span><span class='id identifier rubyid_locatorOfObjectToBeDragged'>locatorOfObjectToBeDragged</span><span class='comma'>,</span><span class='id identifier rubyid_locatorOfDragDestinationObject'>locatorOfDragDestinationObject</span><span class='comma'>,</span><span class='rbracket'>]</span><span class='rparen'>)</span> |
| <span class='kw'>end</span></pre> |
| </td> |
| </tr> |
| </table> |
| </div> |
| |
| <div class="method_details "> |
| <h3 class="signature " id="dragdrop-instance_method"> |
| |
| - (<tt>Object</tt>) <strong>dragdrop</strong>(locator, movementsString) |
| |
| |
| |
| |
| |
| </h3><div class="docstring"> |
| <div class="discussion"> |
| |
| <p>deprecated - use dragAndDrop instead</p> |
| |
| <p>'locator' is an element locator 'movementsString' is offset in pixels from |
| the current location to which the element should be moved, e.g., "+70,-300"</p> |
| |
| |
| </div> |
| </div> |
| <div class="tags"> |
| |
| |
| </div><table class="source_code"> |
| <tr> |
| <td> |
| <pre class="lines"> |
| |
| |
| 1155 |
| 1156 |
| 1157</pre> |
| </td> |
| <td> |
| <pre class="code"><span class="info file"># File 'rb/lib/selenium/client/legacy_driver.rb', line 1155</span> |
| |
| <span class='kw'>def</span> <span class='id identifier rubyid_dragdrop'>dragdrop</span><span class='lparen'>(</span><span class='id identifier rubyid_locator'>locator</span><span class='comma'>,</span><span class='id identifier rubyid_movementsString'>movementsString</span><span class='rparen'>)</span> |
| <span class='id identifier rubyid_remote_control_command'>remote_control_command</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>dragdrop</span><span class='tstring_end'>"</span></span><span class='comma'>,</span> <span class='lbracket'>[</span><span class='id identifier rubyid_locator'>locator</span><span class='comma'>,</span><span class='id identifier rubyid_movementsString'>movementsString</span><span class='comma'>,</span><span class='rbracket'>]</span><span class='rparen'>)</span> |
| <span class='kw'>end</span></pre> |
| </td> |
| </tr> |
| </table> |
| </div> |
| |
| <div class="method_details "> |
| <h3 class="signature " id="fire_event-instance_method"> |
| |
| - (<tt>Object</tt>) <strong>fire_event</strong>(locator, eventName) |
| |
| |
| |
| |
| |
| </h3><div class="docstring"> |
| <div class="discussion"> |
| |
| <p>Explicitly simulate an event, to trigger the corresponding |
| "on<em>event</em>" handler.</p> |
| |
| <p>'locator' is an element locator 'eventName' is the event name, e.g. "focus" |
| or "blur"</p> |
| |
| |
| </div> |
| </div> |
| <div class="tags"> |
| |
| |
| </div><table class="source_code"> |
| <tr> |
| <td> |
| <pre class="lines"> |
| |
| |
| 203 |
| 204 |
| 205</pre> |
| </td> |
| <td> |
| <pre class="code"><span class="info file"># File 'rb/lib/selenium/client/legacy_driver.rb', line 203</span> |
| |
| <span class='kw'>def</span> <span class='id identifier rubyid_fire_event'>fire_event</span><span class='lparen'>(</span><span class='id identifier rubyid_locator'>locator</span><span class='comma'>,</span><span class='id identifier rubyid_eventName'>eventName</span><span class='rparen'>)</span> |
| <span class='id identifier rubyid_remote_control_command'>remote_control_command</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>fireEvent</span><span class='tstring_end'>"</span></span><span class='comma'>,</span> <span class='lbracket'>[</span><span class='id identifier rubyid_locator'>locator</span><span class='comma'>,</span><span class='id identifier rubyid_eventName'>eventName</span><span class='comma'>,</span><span class='rbracket'>]</span><span class='rparen'>)</span> |
| <span class='kw'>end</span></pre> |
| </td> |
| </tr> |
| </table> |
| </div> |
| |
| <div class="method_details "> |
| <h3 class="signature " id="focus-instance_method"> |
| |
| - (<tt>Object</tt>) <strong>focus</strong>(locator) |
| |
| |
| |
| |
| |
| </h3><div class="docstring"> |
| <div class="discussion"> |
| |
| <p>Move the focus to the specified element; for example, if the element is an |
| input field, move the cursor to that field.</p> |
| |
| <p>'locator' is an element locator</p> |
| |
| |
| </div> |
| </div> |
| <div class="tags"> |
| |
| |
| </div><table class="source_code"> |
| <tr> |
| <td> |
| <pre class="lines"> |
| |
| |
| 211 |
| 212 |
| 213</pre> |
| </td> |
| <td> |
| <pre class="code"><span class="info file"># File 'rb/lib/selenium/client/legacy_driver.rb', line 211</span> |
| |
| <span class='kw'>def</span> <span class='id identifier rubyid_focus'>focus</span><span class='lparen'>(</span><span class='id identifier rubyid_locator'>locator</span><span class='rparen'>)</span> |
| <span class='id identifier rubyid_remote_control_command'>remote_control_command</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>focus</span><span class='tstring_end'>"</span></span><span class='comma'>,</span> <span class='lbracket'>[</span><span class='id identifier rubyid_locator'>locator</span><span class='comma'>,</span><span class='rbracket'>]</span><span class='rparen'>)</span> |
| <span class='kw'>end</span></pre> |
| </td> |
| </tr> |
| </table> |
| </div> |
| |
| <div class="method_details "> |
| <h3 class="signature " id="get_alert-instance_method"> |
| |
| - (<tt>Object</tt>) <strong>get_alert</strong> |
| |
| |
| |
| |
| |
| </h3><div class="docstring"> |
| <div class="discussion"> |
| |
| <p>Retrieves the message of a JavaScript alert generated during the previous |
| action, or fail if there were no alerts.</p> |
| |
| <p>Getting an alert has the same effect as manually clicking OK. If an alert |
| is generated but you do not consume it with getAlert, the next Selenium |
| action will fail. Under Selenium, JavaScript alerts will NOT pop up a |
| visible alert dialog. Selenium does NOT support JavaScript alerts that are |
| generated in a page's onload() event handler. In this case a visible dialog |
| WILL be generated and Selenium will hang until someone manually clicks OK.</p> |
| |
| |
| </div> |
| </div> |
| <div class="tags"> |
| |
| |
| </div><table class="source_code"> |
| <tr> |
| <td> |
| <pre class="lines"> |
| |
| |
| 850 |
| 851 |
| 852</pre> |
| </td> |
| <td> |
| <pre class="code"><span class="info file"># File 'rb/lib/selenium/client/legacy_driver.rb', line 850</span> |
| |
| <span class='kw'>def</span> <span class='id identifier rubyid_get_alert'>get_alert</span><span class='lparen'>(</span><span class='rparen'>)</span> |
| <span class='kw'>return</span> <span class='id identifier rubyid_string_command'>string_command</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>getAlert</span><span class='tstring_end'>"</span></span><span class='comma'>,</span> <span class='lbracket'>[</span><span class='rbracket'>]</span><span class='rparen'>)</span> |
| <span class='kw'>end</span></pre> |
| </td> |
| </tr> |
| </table> |
| </div> |
| |
| <div class="method_details "> |
| <h3 class="signature " id="get_all_buttons-instance_method"> |
| |
| - (<tt>Object</tt>) <strong>get_all_buttons</strong> |
| |
| |
| |
| |
| |
| </h3><div class="docstring"> |
| <div class="discussion"> |
| |
| <p>Returns the IDs of all buttons on the page.</p> |
| |
| <p>If a given button has no ID, it will appear as "" in this array.</p> |
| |
| |
| </div> |
| </div> |
| <div class="tags"> |
| |
| |
| </div><table class="source_code"> |
| <tr> |
| <td> |
| <pre class="lines"> |
| |
| |
| 1118 |
| 1119 |
| 1120</pre> |
| </td> |
| <td> |
| <pre class="code"><span class="info file"># File 'rb/lib/selenium/client/legacy_driver.rb', line 1118</span> |
| |
| <span class='kw'>def</span> <span class='id identifier rubyid_get_all_buttons'>get_all_buttons</span><span class='lparen'>(</span><span class='rparen'>)</span> |
| <span class='kw'>return</span> <span class='id identifier rubyid_string_array_command'>string_array_command</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>getAllButtons</span><span class='tstring_end'>"</span></span><span class='comma'>,</span> <span class='lbracket'>[</span><span class='rbracket'>]</span><span class='rparen'>)</span> |
| <span class='kw'>end</span></pre> |
| </td> |
| </tr> |
| </table> |
| </div> |
| |
| <div class="method_details "> |
| <h3 class="signature " id="get_all_fields-instance_method"> |
| |
| - (<tt>Object</tt>) <strong>get_all_fields</strong> |
| |
| |
| |
| |
| |
| </h3><div class="docstring"> |
| <div class="discussion"> |
| |
| <p>Returns the IDs of all input fields on the page.</p> |
| |
| <p>If a given field has no ID, it will appear as "" in this array.</p> |
| |
| |
| </div> |
| </div> |
| <div class="tags"> |
| |
| |
| </div><table class="source_code"> |
| <tr> |
| <td> |
| <pre class="lines"> |
| |
| |
| 1138 |
| 1139 |
| 1140</pre> |
| </td> |
| <td> |
| <pre class="code"><span class="info file"># File 'rb/lib/selenium/client/legacy_driver.rb', line 1138</span> |
| |
| <span class='kw'>def</span> <span class='id identifier rubyid_get_all_fields'>get_all_fields</span><span class='lparen'>(</span><span class='rparen'>)</span> |
| <span class='kw'>return</span> <span class='id identifier rubyid_string_array_command'>string_array_command</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>getAllFields</span><span class='tstring_end'>"</span></span><span class='comma'>,</span> <span class='lbracket'>[</span><span class='rbracket'>]</span><span class='rparen'>)</span> |
| <span class='kw'>end</span></pre> |
| </td> |
| </tr> |
| </table> |
| </div> |
| |
| <div class="method_details "> |
| <h3 class="signature " id="get_all_links-instance_method"> |
| |
| - (<tt>Object</tt>) <strong>get_all_links</strong> |
| |
| |
| |
| |
| |
| </h3><div class="docstring"> |
| <div class="discussion"> |
| |
| <p>Returns the IDs of all links on the page.</p> |
| |
| <p>If a given link has no ID, it will appear as "" in this array.</p> |
| |
| |
| </div> |
| </div> |
| <div class="tags"> |
| |
| |
| </div><table class="source_code"> |
| <tr> |
| <td> |
| <pre class="lines"> |
| |
| |
| 1128 |
| 1129 |
| 1130</pre> |
| </td> |
| <td> |
| <pre class="code"><span class="info file"># File 'rb/lib/selenium/client/legacy_driver.rb', line 1128</span> |
| |
| <span class='kw'>def</span> <span class='id identifier rubyid_get_all_links'>get_all_links</span><span class='lparen'>(</span><span class='rparen'>)</span> |
| <span class='kw'>return</span> <span class='id identifier rubyid_string_array_command'>string_array_command</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>getAllLinks</span><span class='tstring_end'>"</span></span><span class='comma'>,</span> <span class='lbracket'>[</span><span class='rbracket'>]</span><span class='rparen'>)</span> |
| <span class='kw'>end</span></pre> |
| </td> |
| </tr> |
| </table> |
| </div> |
| |
| <div class="method_details "> |
| <h3 class="signature " id="get_all_window_ids-instance_method"> |
| |
| - (<tt>Object</tt>) <strong>get_all_window_ids</strong> |
| |
| |
| |
| |
| |
| </h3><div class="docstring"> |
| <div class="discussion"> |
| |
| <p>Returns the IDs of all windows that the browser knows about in an array.</p> |
| |
| |
| </div> |
| </div> |
| <div class="tags"> |
| |
| |
| </div><table class="source_code"> |
| <tr> |
| <td> |
| <pre class="lines"> |
| |
| |
| 1215 |
| 1216 |
| 1217</pre> |
| </td> |
| <td> |
| <pre class="code"><span class="info file"># File 'rb/lib/selenium/client/legacy_driver.rb', line 1215</span> |
| |
| <span class='kw'>def</span> <span class='id identifier rubyid_get_all_window_ids'>get_all_window_ids</span><span class='lparen'>(</span><span class='rparen'>)</span> |
| <span class='kw'>return</span> <span class='id identifier rubyid_string_array_command'>string_array_command</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>getAllWindowIds</span><span class='tstring_end'>"</span></span><span class='comma'>,</span> <span class='lbracket'>[</span><span class='rbracket'>]</span><span class='rparen'>)</span> |
| <span class='kw'>end</span></pre> |
| </td> |
| </tr> |
| </table> |
| </div> |
| |
| <div class="method_details "> |
| <h3 class="signature " id="get_all_window_names-instance_method"> |
| |
| - (<tt>Object</tt>) <strong>get_all_window_names</strong> |
| |
| |
| |
| |
| |
| </h3><div class="docstring"> |
| <div class="discussion"> |
| |
| <p>Returns the names of all windows that the browser knows about in an array.</p> |
| |
| |
| </div> |
| </div> |
| <div class="tags"> |
| |
| |
| </div><table class="source_code"> |
| <tr> |
| <td> |
| <pre class="lines"> |
| |
| |
| 1222 |
| 1223 |
| 1224</pre> |
| </td> |
| <td> |
| <pre class="code"><span class="info file"># File 'rb/lib/selenium/client/legacy_driver.rb', line 1222</span> |
| |
| <span class='kw'>def</span> <span class='id identifier rubyid_get_all_window_names'>get_all_window_names</span><span class='lparen'>(</span><span class='rparen'>)</span> |
| <span class='kw'>return</span> <span class='id identifier rubyid_string_array_command'>string_array_command</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>getAllWindowNames</span><span class='tstring_end'>"</span></span><span class='comma'>,</span> <span class='lbracket'>[</span><span class='rbracket'>]</span><span class='rparen'>)</span> |
| <span class='kw'>end</span></pre> |
| </td> |
| </tr> |
| </table> |
| </div> |
| |
| <div class="method_details "> |
| <h3 class="signature " id="get_all_window_titles-instance_method"> |
| |
| - (<tt>Object</tt>) <strong>get_all_window_titles</strong> |
| |
| |
| |
| |
| |
| </h3><div class="docstring"> |
| <div class="discussion"> |
| |
| <p>Returns the titles of all windows that the browser knows about in an array.</p> |
| |
| |
| </div> |
| </div> |
| <div class="tags"> |
| |
| |
| </div><table class="source_code"> |
| <tr> |
| <td> |
| <pre class="lines"> |
| |
| |
| 1229 |
| 1230 |
| 1231</pre> |
| </td> |
| <td> |
| <pre class="code"><span class="info file"># File 'rb/lib/selenium/client/legacy_driver.rb', line 1229</span> |
| |
| <span class='kw'>def</span> <span class='id identifier rubyid_get_all_window_titles'>get_all_window_titles</span><span class='lparen'>(</span><span class='rparen'>)</span> |
| <span class='kw'>return</span> <span class='id identifier rubyid_string_array_command'>string_array_command</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>getAllWindowTitles</span><span class='tstring_end'>"</span></span><span class='comma'>,</span> <span class='lbracket'>[</span><span class='rbracket'>]</span><span class='rparen'>)</span> |
| <span class='kw'>end</span></pre> |
| </td> |
| </tr> |
| </table> |
| </div> |
| |
| <div class="method_details "> |
| <h3 class="signature " id="get_attribute-instance_method"> |
| |
| - (<tt>Object</tt>) <strong>get_attribute</strong>(attributeLocator) |
| |
| |
| |
| |
| |
| </h3><div class="docstring"> |
| <div class="discussion"> |
| |
| <p>Gets the value of an element attribute. The value of the attribute may |
| differ across browsers (this is the case for the "style" attribute, for |
| example).</p> |
| |
| <p>'attributeLocator' is an element locator followed by an @ sign and then the |
| name of the attribute, e.g. "foo@bar"</p> |
| |
| |
| </div> |
| </div> |
| <div class="tags"> |
| |
| |
| </div><table class="source_code"> |
| <tr> |
| <td> |
| <pre class="lines"> |
| |
| |
| 1071 |
| 1072 |
| 1073</pre> |
| </td> |
| <td> |
| <pre class="code"><span class="info file"># File 'rb/lib/selenium/client/legacy_driver.rb', line 1071</span> |
| |
| <span class='kw'>def</span> <span class='id identifier rubyid_get_attribute'>get_attribute</span><span class='lparen'>(</span><span class='id identifier rubyid_attributeLocator'>attributeLocator</span><span class='rparen'>)</span> |
| <span class='kw'>return</span> <span class='id identifier rubyid_string_command'>string_command</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>getAttribute</span><span class='tstring_end'>"</span></span><span class='comma'>,</span> <span class='lbracket'>[</span><span class='id identifier rubyid_attributeLocator'>attributeLocator</span><span class='comma'>,</span><span class='rbracket'>]</span><span class='rparen'>)</span> |
| <span class='kw'>end</span></pre> |
| </td> |
| </tr> |
| </table> |
| </div> |
| |
| <div class="method_details "> |
| <h3 class="signature " id="get_attribute_from_all_windows-instance_method"> |
| |
| - (<tt>Object</tt>) <strong>get_attribute_from_all_windows</strong>(attributeName) |
| |
| |
| |
| |
| |
| </h3><div class="docstring"> |
| <div class="discussion"> |
| |
| <p>Returns an array of JavaScript property values from all known windows |
| having one.</p> |
| |
| <p>'attributeName' is name of an attribute on the windows</p> |
| |
| |
| </div> |
| </div> |
| <div class="tags"> |
| |
| |
| </div><table class="source_code"> |
| <tr> |
| <td> |
| <pre class="lines"> |
| |
| |
| 1146 |
| 1147 |
| 1148</pre> |
| </td> |
| <td> |
| <pre class="code"><span class="info file"># File 'rb/lib/selenium/client/legacy_driver.rb', line 1146</span> |
| |
| <span class='kw'>def</span> <span class='id identifier rubyid_get_attribute_from_all_windows'>get_attribute_from_all_windows</span><span class='lparen'>(</span><span class='id identifier rubyid_attributeName'>attributeName</span><span class='rparen'>)</span> |
| <span class='kw'>return</span> <span class='id identifier rubyid_string_array_command'>string_array_command</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>getAttributeFromAllWindows</span><span class='tstring_end'>"</span></span><span class='comma'>,</span> <span class='lbracket'>[</span><span class='id identifier rubyid_attributeName'>attributeName</span><span class='comma'>,</span><span class='rbracket'>]</span><span class='rparen'>)</span> |
| <span class='kw'>end</span></pre> |
| </td> |
| </tr> |
| </table> |
| </div> |
| |
| <div class="method_details "> |
| <h3 class="signature " id="get_body_text-instance_method"> |
| |
| - (<tt>Object</tt>) <strong>get_body_text</strong> |
| |
| |
| |
| |
| |
| </h3><div class="docstring"> |
| <div class="discussion"> |
| |
| <p>Gets the entire text of the page.</p> |
| |
| |
| </div> |
| </div> |
| <div class="tags"> |
| |
| |
| </div><table class="source_code"> |
| <tr> |
| <td> |
| <pre class="lines"> |
| |
| |
| 918 |
| 919 |
| 920</pre> |
| </td> |
| <td> |
| <pre class="code"><span class="info file"># File 'rb/lib/selenium/client/legacy_driver.rb', line 918</span> |
| |
| <span class='kw'>def</span> <span class='id identifier rubyid_get_body_text'>get_body_text</span><span class='lparen'>(</span><span class='rparen'>)</span> |
| <span class='kw'>return</span> <span class='id identifier rubyid_string_command'>string_command</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>getBodyText</span><span class='tstring_end'>"</span></span><span class='comma'>,</span> <span class='lbracket'>[</span><span class='rbracket'>]</span><span class='rparen'>)</span> |
| <span class='kw'>end</span></pre> |
| </td> |
| </tr> |
| </table> |
| </div> |
| |
| <div class="method_details "> |
| <h3 class="signature " id="get_confirmation-instance_method"> |
| |
| - (<tt>Object</tt>) <strong>get_confirmation</strong> |
| |
| |
| |
| |
| |
| </h3><div class="docstring"> |
| <div class="discussion"> |
| |
| <p>Retrieves the message of a JavaScript confirmation dialog generated during |
| the previous action.</p> |
| |
| <p>By default, the confirm function will return true, having the same effect |
| as manually clicking OK. This can be changed by prior execution of the |
| chooseCancelOnNextConfirmation command.</p> |
| |
| <p>If an confirmation is generated but you do not consume it with |
| getConfirmation, the next Selenium action will fail.</p> |
| |
| <p>NOTE: under Selenium, JavaScript confirmations will NOT pop up a visible |
| dialog.</p> |
| |
| <p>NOTE: Selenium does NOT support JavaScript confirmations that are generated |
| in a page's onload() event handler. In this case a visible dialog WILL be |
| generated and Selenium will hang until you manually click OK.</p> |
| |
| |
| </div> |
| </div> |
| <div class="tags"> |
| |
| |
| </div><table class="source_code"> |
| <tr> |
| <td> |
| <pre class="lines"> |
| |
| |
| 879 |
| 880 |
| 881</pre> |
| </td> |
| <td> |
| <pre class="code"><span class="info file"># File 'rb/lib/selenium/client/legacy_driver.rb', line 879</span> |
| |
| <span class='kw'>def</span> <span class='id identifier rubyid_get_confirmation'>get_confirmation</span><span class='lparen'>(</span><span class='rparen'>)</span> |
| <span class='kw'>return</span> <span class='id identifier rubyid_string_command'>string_command</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>getConfirmation</span><span class='tstring_end'>"</span></span><span class='comma'>,</span> <span class='lbracket'>[</span><span class='rbracket'>]</span><span class='rparen'>)</span> |
| <span class='kw'>end</span></pre> |
| </td> |
| </tr> |
| </table> |
| </div> |
| |
| <div class="method_details "> |
| <h3 class="signature " id="get_cookie-instance_method"> |
| |
| - (<tt>Object</tt>) <strong>get_cookie</strong> |
| |
| |
| |
| |
| |
| </h3><div class="docstring"> |
| <div class="discussion"> |
| |
| <p>Return all cookies of the current page under test.</p> |
| |
| |
| </div> |
| </div> |
| <div class="tags"> |
| |
| |
| </div><table class="source_code"> |
| <tr> |
| <td> |
| <pre class="lines"> |
| |
| |
| 1448 |
| 1449 |
| 1450</pre> |
| </td> |
| <td> |
| <pre class="code"><span class="info file"># File 'rb/lib/selenium/client/legacy_driver.rb', line 1448</span> |
| |
| <span class='kw'>def</span> <span class='id identifier rubyid_get_cookie'>get_cookie</span><span class='lparen'>(</span><span class='rparen'>)</span> |
| <span class='kw'>return</span> <span class='id identifier rubyid_string_command'>string_command</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>getCookie</span><span class='tstring_end'>"</span></span><span class='comma'>,</span> <span class='lbracket'>[</span><span class='rbracket'>]</span><span class='rparen'>)</span> |
| <span class='kw'>end</span></pre> |
| </td> |
| </tr> |
| </table> |
| </div> |
| |
| <div class="method_details "> |
| <h3 class="signature " id="get_cookie_by_name-instance_method"> |
| |
| - (<tt>Object</tt>) <strong>get_cookie_by_name</strong>(name) |
| |
| |
| |
| |
| |
| </h3><div class="docstring"> |
| <div class="discussion"> |
| |
| <p>Returns the value of the cookie with the specified name, or throws an error |
| if the cookie is not present.</p> |
| |
| <p>'name' is the name of the cookie</p> |
| |
| |
| </div> |
| </div> |
| <div class="tags"> |
| |
| |
| </div><table class="source_code"> |
| <tr> |
| <td> |
| <pre class="lines"> |
| |
| |
| 1456 |
| 1457 |
| 1458</pre> |
| </td> |
| <td> |
| <pre class="code"><span class="info file"># File 'rb/lib/selenium/client/legacy_driver.rb', line 1456</span> |
| |
| <span class='kw'>def</span> <span class='id identifier rubyid_get_cookie_by_name'>get_cookie_by_name</span><span class='lparen'>(</span><span class='id identifier rubyid_name'>name</span><span class='rparen'>)</span> |
| <span class='kw'>return</span> <span class='id identifier rubyid_string_command'>string_command</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>getCookieByName</span><span class='tstring_end'>"</span></span><span class='comma'>,</span> <span class='lbracket'>[</span><span class='id identifier rubyid_name'>name</span><span class='comma'>,</span><span class='rbracket'>]</span><span class='rparen'>)</span> |
| <span class='kw'>end</span></pre> |
| </td> |
| </tr> |
| </table> |
| </div> |
| |
| <div class="method_details "> |
| <h3 class="signature " id="get_css_count-instance_method"> |
| |
| - (<tt>Object</tt>) <strong>get_css_count</strong>(css) |
| |
| |
| |
| |
| |
| </h3><div class="docstring"> |
| <div class="discussion"> |
| |
| <p>Returns the number of nodes that match the specified css selector, eg. |
| "css=table" would give the number of tables.</p> |
| |
| <p>'css' is the css selector to evaluate. do NOT wrap this expression in a |
| 'count()' function; we will do that for you.</p> |
| |
| |
| </div> |
| </div> |
| <div class="tags"> |
| |
| |
| </div><table class="source_code"> |
| <tr> |
| <td> |
| <pre class="lines"> |
| |
| |
| 1341 |
| 1342 |
| 1343</pre> |
| </td> |
| <td> |
| <pre class="code"><span class="info file"># File 'rb/lib/selenium/client/legacy_driver.rb', line 1341</span> |
| |
| <span class='kw'>def</span> <span class='id identifier rubyid_get_css_count'>get_css_count</span><span class='lparen'>(</span><span class='id identifier rubyid_css'>css</span><span class='rparen'>)</span> |
| <span class='kw'>return</span> <span class='id identifier rubyid_number_command'>number_command</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>getCssCount</span><span class='tstring_end'>"</span></span><span class='comma'>,</span> <span class='lbracket'>[</span><span class='id identifier rubyid_css'>css</span><span class='comma'>,</span><span class='rbracket'>]</span><span class='rparen'>)</span> |
| <span class='kw'>end</span></pre> |
| </td> |
| </tr> |
| </table> |
| </div> |
| |
| <div class="method_details "> |
| <h3 class="signature " id="get_cursor_position-instance_method"> |
| |
| - (<tt>Object</tt>) <strong>get_cursor_position</strong>(locator) |
| |
| |
| |
| |
| |
| </h3><div class="docstring"> |
| <div class="discussion"> |
| |
| <p>Retrieves the text cursor position in the given input element or textarea; |
| beware, this may not work perfectly on all browsers.</p> |
| |
| <p>Specifically, if the cursor/selection has been cleared by JavaScript, this |
| command will tend to return the position of the last location of the |
| cursor, even though the cursor is now gone from the page. This is filed as |
| SEL-243.</p> |
| |
| <p>This method will fail if the specified element isn't an input element or |
| textarea, or there is no cursor in the element.</p> |
| |
| <p>'locator' is an element locator pointing to an input element or textarea</p> |
| |
| |
| </div> |
| </div> |
| <div class="tags"> |
| |
| |
| </div><table class="source_code"> |
| <tr> |
| <td> |
| <pre class="lines"> |
| |
| |
| 1311 |
| 1312 |
| 1313</pre> |
| </td> |
| <td> |
| <pre class="code"><span class="info file"># File 'rb/lib/selenium/client/legacy_driver.rb', line 1311</span> |
| |
| <span class='kw'>def</span> <span class='id identifier rubyid_get_cursor_position'>get_cursor_position</span><span class='lparen'>(</span><span class='id identifier rubyid_locator'>locator</span><span class='rparen'>)</span> |
| <span class='kw'>return</span> <span class='id identifier rubyid_number_command'>number_command</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>getCursorPosition</span><span class='tstring_end'>"</span></span><span class='comma'>,</span> <span class='lbracket'>[</span><span class='id identifier rubyid_locator'>locator</span><span class='comma'>,</span><span class='rbracket'>]</span><span class='rparen'>)</span> |
| <span class='kw'>end</span></pre> |
| </td> |
| </tr> |
| </table> |
| </div> |
| |
| <div class="method_details "> |
| <h3 class="signature " id="get_element_height-instance_method"> |
| |
| - (<tt>Object</tt>) <strong>get_element_height</strong>(locator) |
| |
| |
| |
| |
| |
| </h3><div class="docstring"> |
| <div class="discussion"> |
| |
| <p>Retrieves the height of an element</p> |
| |
| <p>'locator' is an element locator pointing to an element</p> |
| |
| |
| </div> |
| </div> |
| <div class="tags"> |
| |
| |
| </div><table class="source_code"> |
| <tr> |
| <td> |
| <pre class="lines"> |
| |
| |
| 1298 |
| 1299 |
| 1300</pre> |
| </td> |
| <td> |
| <pre class="code"><span class="info file"># File 'rb/lib/selenium/client/legacy_driver.rb', line 1298</span> |
| |
| <span class='kw'>def</span> <span class='id identifier rubyid_get_element_height'>get_element_height</span><span class='lparen'>(</span><span class='id identifier rubyid_locator'>locator</span><span class='rparen'>)</span> |
| <span class='kw'>return</span> <span class='id identifier rubyid_number_command'>number_command</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>getElementHeight</span><span class='tstring_end'>"</span></span><span class='comma'>,</span> <span class='lbracket'>[</span><span class='id identifier rubyid_locator'>locator</span><span class='comma'>,</span><span class='rbracket'>]</span><span class='rparen'>)</span> |
| <span class='kw'>end</span></pre> |
| </td> |
| </tr> |
| </table> |
| </div> |
| |
| <div class="method_details "> |
| <h3 class="signature " id="get_element_index-instance_method"> |
| |
| - (<tt>Object</tt>) <strong>get_element_index</strong>(locator) |
| |
| |
| |
| |
| |
| </h3><div class="docstring"> |
| <div class="discussion"> |
| |
| <p>Get the relative index of an element to its parent (starting from 0). The |
| comment node and empty text node will be ignored.</p> |
| |
| <p>'locator' is an element locator pointing to an element</p> |
| |
| |
| </div> |
| </div> |
| <div class="tags"> |
| |
| |
| </div><table class="source_code"> |
| <tr> |
| <td> |
| <pre class="lines"> |
| |
| |
| 1256 |
| 1257 |
| 1258</pre> |
| </td> |
| <td> |
| <pre class="code"><span class="info file"># File 'rb/lib/selenium/client/legacy_driver.rb', line 1256</span> |
| |
| <span class='kw'>def</span> <span class='id identifier rubyid_get_element_index'>get_element_index</span><span class='lparen'>(</span><span class='id identifier rubyid_locator'>locator</span><span class='rparen'>)</span> |
| <span class='kw'>return</span> <span class='id identifier rubyid_number_command'>number_command</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>getElementIndex</span><span class='tstring_end'>"</span></span><span class='comma'>,</span> <span class='lbracket'>[</span><span class='id identifier rubyid_locator'>locator</span><span class='comma'>,</span><span class='rbracket'>]</span><span class='rparen'>)</span> |
| <span class='kw'>end</span></pre> |
| </td> |
| </tr> |
| </table> |
| </div> |
| |
| <div class="method_details "> |
| <h3 class="signature " id="get_element_position_left-instance_method"> |
| |
| - (<tt>Object</tt>) <strong>get_element_position_left</strong>(locator) |
| |
| |
| |
| |
| |
| </h3><div class="docstring"> |
| <div class="discussion"> |
| |
| <p>Retrieves the horizontal position of an element</p> |
| |
| <p>'locator' is an element locator pointing to an element OR an element itself</p> |
| |
| |
| </div> |
| </div> |
| <div class="tags"> |
| |
| |
| </div><table class="source_code"> |
| <tr> |
| <td> |
| <pre class="lines"> |
| |
| |
| 1274 |
| 1275 |
| 1276</pre> |
| </td> |
| <td> |
| <pre class="code"><span class="info file"># File 'rb/lib/selenium/client/legacy_driver.rb', line 1274</span> |
| |
| <span class='kw'>def</span> <span class='id identifier rubyid_get_element_position_left'>get_element_position_left</span><span class='lparen'>(</span><span class='id identifier rubyid_locator'>locator</span><span class='rparen'>)</span> |
| <span class='kw'>return</span> <span class='id identifier rubyid_number_command'>number_command</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>getElementPositionLeft</span><span class='tstring_end'>"</span></span><span class='comma'>,</span> <span class='lbracket'>[</span><span class='id identifier rubyid_locator'>locator</span><span class='comma'>,</span><span class='rbracket'>]</span><span class='rparen'>)</span> |
| <span class='kw'>end</span></pre> |
| </td> |
| </tr> |
| </table> |
| </div> |
| |
| <div class="method_details "> |
| <h3 class="signature " id="get_element_position_top-instance_method"> |
| |
| - (<tt>Object</tt>) <strong>get_element_position_top</strong>(locator) |
| |
| |
| |
| |
| |
| </h3><div class="docstring"> |
| <div class="discussion"> |
| |
| <p>Retrieves the vertical position of an element</p> |
| |
| <p>'locator' is an element locator pointing to an element OR an element itself</p> |
| |
| |
| </div> |
| </div> |
| <div class="tags"> |
| |
| |
| </div><table class="source_code"> |
| <tr> |
| <td> |
| <pre class="lines"> |
| |
| |
| 1282 |
| 1283 |
| 1284</pre> |
| </td> |
| <td> |
| <pre class="code"><span class="info file"># File 'rb/lib/selenium/client/legacy_driver.rb', line 1282</span> |
| |
| <span class='kw'>def</span> <span class='id identifier rubyid_get_element_position_top'>get_element_position_top</span><span class='lparen'>(</span><span class='id identifier rubyid_locator'>locator</span><span class='rparen'>)</span> |
| <span class='kw'>return</span> <span class='id identifier rubyid_number_command'>number_command</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>getElementPositionTop</span><span class='tstring_end'>"</span></span><span class='comma'>,</span> <span class='lbracket'>[</span><span class='id identifier rubyid_locator'>locator</span><span class='comma'>,</span><span class='rbracket'>]</span><span class='rparen'>)</span> |
| <span class='kw'>end</span></pre> |
| </td> |
| </tr> |
| </table> |
| </div> |
| |
| <div class="method_details "> |
| <h3 class="signature " id="get_element_width-instance_method"> |
| |
| - (<tt>Object</tt>) <strong>get_element_width</strong>(locator) |
| |
| |
| |
| |
| |
| </h3><div class="docstring"> |
| <div class="discussion"> |
| |
| <p>Retrieves the width of an element</p> |
| |
| <p>'locator' is an element locator pointing to an element</p> |
| |
| |
| </div> |
| </div> |
| <div class="tags"> |
| |
| |
| </div><table class="source_code"> |
| <tr> |
| <td> |
| <pre class="lines"> |
| |
| |
| 1290 |
| 1291 |
| 1292</pre> |
| </td> |
| <td> |
| <pre class="code"><span class="info file"># File 'rb/lib/selenium/client/legacy_driver.rb', line 1290</span> |
| |
| <span class='kw'>def</span> <span class='id identifier rubyid_get_element_width'>get_element_width</span><span class='lparen'>(</span><span class='id identifier rubyid_locator'>locator</span><span class='rparen'>)</span> |
| <span class='kw'>return</span> <span class='id identifier rubyid_number_command'>number_command</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>getElementWidth</span><span class='tstring_end'>"</span></span><span class='comma'>,</span> <span class='lbracket'>[</span><span class='id identifier rubyid_locator'>locator</span><span class='comma'>,</span><span class='rbracket'>]</span><span class='rparen'>)</span> |
| <span class='kw'>end</span></pre> |
| </td> |
| </tr> |
| </table> |
| </div> |
| |
| <div class="method_details "> |
| <h3 class="signature " id="get_eval-instance_method"> |
| |
| - (<tt>Object</tt>) <strong>get_eval</strong>(script) |
| |
| |
| |
| |
| |
| </h3><div class="docstring"> |
| <div class="discussion"> |
| |
| <p>Gets the result of evaluating the specified JavaScript snippet. The |
| snippet may have multiple lines, but only the result of the last line will |
| be returned.</p> |
| |
| <p>Note that, by default, the snippet will run in the context of the |
| "selenium" object itself, so <tt>this</tt> will refer to the Selenium |
| object. Use <tt>window</tt> to refer to the window of your application, |
| e.g. <tt>window.document.getElementById('foo')</tt> If you need to use a |
| locator to refer to a single element in your application page, you can use |
| <tt>this.browserbot.findElement("id=foo")</tt> where "id=foo" is |
| your locator.</p> |
| |
| <p>'script' is the JavaScript snippet to run</p> |
| |
| |
| </div> |
| </div> |
| <div class="tags"> |
| |
| |
| </div><table class="source_code"> |
| <tr> |
| <td> |
| <pre class="lines"> |
| |
| |
| 964 |
| 965 |
| 966</pre> |
| </td> |
| <td> |
| <pre class="code"><span class="info file"># File 'rb/lib/selenium/client/legacy_driver.rb', line 964</span> |
| |
| <span class='kw'>def</span> <span class='id identifier rubyid_get_eval'>get_eval</span><span class='lparen'>(</span><span class='id identifier rubyid_script'>script</span><span class='rparen'>)</span> |
| <span class='kw'>return</span> <span class='id identifier rubyid_string_command'>string_command</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>getEval</span><span class='tstring_end'>"</span></span><span class='comma'>,</span> <span class='lbracket'>[</span><span class='id identifier rubyid_script'>script</span><span class='comma'>,</span><span class='rbracket'>]</span><span class='rparen'>)</span> |
| <span class='kw'>end</span></pre> |
| </td> |
| </tr> |
| </table> |
| </div> |
| |
| <div class="method_details "> |
| <h3 class="signature " id="get_expression-instance_method"> |
| |
| - (<tt>Object</tt>) <strong>get_expression</strong>(expression) |
| |
| |
| |
| |
| |
| </h3><div class="docstring"> |
| <div class="discussion"> |
| |
| <p>Returns the specified expression.</p> |
| |
| <p>This is useful because of JavaScript preprocessing. It is used to generate |
| commands like assertExpression and waitForExpression.</p> |
| |
| <p>'expression' is the value to return</p> |
| |
| |
| </div> |
| </div> |
| <div class="tags"> |
| |
| |
| </div><table class="source_code"> |
| <tr> |
| <td> |
| <pre class="lines"> |
| |
| |
| 1323 |
| 1324 |
| 1325</pre> |
| </td> |
| <td> |
| <pre class="code"><span class="info file"># File 'rb/lib/selenium/client/legacy_driver.rb', line 1323</span> |
| |
| <span class='kw'>def</span> <span class='id identifier rubyid_get_expression'>get_expression</span><span class='lparen'>(</span><span class='id identifier rubyid_expression'>expression</span><span class='rparen'>)</span> |
| <span class='kw'>return</span> <span class='id identifier rubyid_string_command'>string_command</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>getExpression</span><span class='tstring_end'>"</span></span><span class='comma'>,</span> <span class='lbracket'>[</span><span class='id identifier rubyid_expression'>expression</span><span class='comma'>,</span><span class='rbracket'>]</span><span class='rparen'>)</span> |
| <span class='kw'>end</span></pre> |
| </td> |
| </tr> |
| </table> |
| </div> |
| |
| <div class="method_details "> |
| <h3 class="signature " id="get_html_source-instance_method"> |
| |
| - (<tt>Object</tt>) <strong>get_html_source</strong> |
| |
| |
| |
| |
| |
| </h3><div class="docstring"> |
| <div class="discussion"> |
| |
| <p>Returns the entire HTML source between the opening and closing "html" tags.</p> |
| |
| |
| </div> |
| </div> |
| <div class="tags"> |
| |
| |
| </div><table class="source_code"> |
| <tr> |
| <td> |
| <pre class="lines"> |
| |
| |
| 1237 |
| 1238 |
| 1239</pre> |
| </td> |
| <td> |
| <pre class="code"><span class="info file"># File 'rb/lib/selenium/client/legacy_driver.rb', line 1237</span> |
| |
| <span class='kw'>def</span> <span class='id identifier rubyid_get_html_source'>get_html_source</span><span class='lparen'>(</span><span class='rparen'>)</span> |
| <span class='kw'>return</span> <span class='id identifier rubyid_string_command'>string_command</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>getHtmlSource</span><span class='tstring_end'>"</span></span><span class='comma'>,</span> <span class='lbracket'>[</span><span class='rbracket'>]</span><span class='rparen'>)</span> |
| <span class='kw'>end</span></pre> |
| </td> |
| </tr> |
| </table> |
| </div> |
| |
| <div class="method_details "> |
| <h3 class="signature " id="get_location-instance_method"> |
| |
| - (<tt>Object</tt>) <strong>get_location</strong> |
| |
| |
| |
| |
| |
| </h3><div class="docstring"> |
| <div class="discussion"> |
| |
| <p>Gets the absolute URL of the current page.</p> |
| |
| |
| </div> |
| </div> |
| <div class="tags"> |
| |
| |
| </div><table class="source_code"> |
| <tr> |
| <td> |
| <pre class="lines"> |
| |
| |
| 904 |
| 905 |
| 906</pre> |
| </td> |
| <td> |
| <pre class="code"><span class="info file"># File 'rb/lib/selenium/client/legacy_driver.rb', line 904</span> |
| |
| <span class='kw'>def</span> <span class='id identifier rubyid_get_location'>get_location</span><span class='lparen'>(</span><span class='rparen'>)</span> |
| <span class='kw'>return</span> <span class='id identifier rubyid_string_command'>string_command</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>getLocation</span><span class='tstring_end'>"</span></span><span class='comma'>,</span> <span class='lbracket'>[</span><span class='rbracket'>]</span><span class='rparen'>)</span> |
| <span class='kw'>end</span></pre> |
| </td> |
| </tr> |
| </table> |
| </div> |
| |
| <div class="method_details "> |
| <h3 class="signature " id="get_mouse_speed-instance_method"> |
| |
| - (<tt>Object</tt>) <strong>get_mouse_speed</strong> |
| |
| |
| |
| |
| |
| </h3><div class="docstring"> |
| <div class="discussion"> |
| |
| <p>Returns the number of pixels between "mousemove" events during dragAndDrop |
| commands (default=10).</p> |
| |
| |
| </div> |
| </div> |
| <div class="tags"> |
| |
| |
| </div><table class="source_code"> |
| <tr> |
| <td> |
| <pre class="lines"> |
| |
| |
| 1176 |
| 1177 |
| 1178</pre> |
| </td> |
| <td> |
| <pre class="code"><span class="info file"># File 'rb/lib/selenium/client/legacy_driver.rb', line 1176</span> |
| |
| <span class='kw'>def</span> <span class='id identifier rubyid_get_mouse_speed'>get_mouse_speed</span><span class='lparen'>(</span><span class='rparen'>)</span> |
| <span class='kw'>return</span> <span class='id identifier rubyid_number_command'>number_command</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>getMouseSpeed</span><span class='tstring_end'>"</span></span><span class='comma'>,</span> <span class='lbracket'>[</span><span class='rbracket'>]</span><span class='rparen'>)</span> |
| <span class='kw'>end</span></pre> |
| </td> |
| </tr> |
| </table> |
| </div> |
| |
| <div class="method_details "> |
| <h3 class="signature " id="get_prompt-instance_method"> |
| |
| - (<tt>Object</tt>) <strong>get_prompt</strong> |
| |
| |
| |
| |
| |
| </h3><div class="docstring"> |
| <div class="discussion"> |
| |
| <p>Retrieves the message of a JavaScript question prompt dialog generated |
| during the previous action.</p> |
| |
| <p>Successful handling of the prompt requires prior execution of the |
| answerOnNextPrompt command. If a prompt is generated but you do not |
| get/verify it, the next Selenium action will fail. NOTE: under Selenium, |
| JavaScript prompts will NOT pop up a visible dialog. NOTE: Selenium does |
| NOT support JavaScript prompts that are generated in a page's onload() |
| event handler. In this case a visible dialog WILL be generated and Selenium |
| will hang until someone manually clicks OK.</p> |
| |
| |
| </div> |
| </div> |
| <div class="tags"> |
| |
| |
| </div><table class="source_code"> |
| <tr> |
| <td> |
| <pre class="lines"> |
| |
| |
| 897 |
| 898 |
| 899</pre> |
| </td> |
| <td> |
| <pre class="code"><span class="info file"># File 'rb/lib/selenium/client/legacy_driver.rb', line 897</span> |
| |
| <span class='kw'>def</span> <span class='id identifier rubyid_get_prompt'>get_prompt</span><span class='lparen'>(</span><span class='rparen'>)</span> |
| <span class='kw'>return</span> <span class='id identifier rubyid_string_command'>string_command</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>getPrompt</span><span class='tstring_end'>"</span></span><span class='comma'>,</span> <span class='lbracket'>[</span><span class='rbracket'>]</span><span class='rparen'>)</span> |
| <span class='kw'>end</span></pre> |
| </td> |
| </tr> |
| </table> |
| </div> |
| |
| <div class="method_details "> |
| <h3 class="signature " id="get_select_options-instance_method"> |
| |
| - (<tt>Object</tt>) <strong>get_select_options</strong>(selectLocator) |
| |
| |
| |
| |
| |
| </h3><div class="docstring"> |
| <div class="discussion"> |
| |
| <p>Gets all option labels in the specified select drop-down.</p> |
| |
| <p>'selectLocator' is an element locator identifying a drop-down menu</p> |
| |
| |
| </div> |
| </div> |
| <div class="tags"> |
| |
| |
| </div><table class="source_code"> |
| <tr> |
| <td> |
| <pre class="lines"> |
| |
| |
| 1061 |
| 1062 |
| 1063</pre> |
| </td> |
| <td> |
| <pre class="code"><span class="info file"># File 'rb/lib/selenium/client/legacy_driver.rb', line 1061</span> |
| |
| <span class='kw'>def</span> <span class='id identifier rubyid_get_select_options'>get_select_options</span><span class='lparen'>(</span><span class='id identifier rubyid_selectLocator'>selectLocator</span><span class='rparen'>)</span> |
| <span class='kw'>return</span> <span class='id identifier rubyid_string_array_command'>string_array_command</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>getSelectOptions</span><span class='tstring_end'>"</span></span><span class='comma'>,</span> <span class='lbracket'>[</span><span class='id identifier rubyid_selectLocator'>selectLocator</span><span class='comma'>,</span><span class='rbracket'>]</span><span class='rparen'>)</span> |
| <span class='kw'>end</span></pre> |
| </td> |
| </tr> |
| </table> |
| </div> |
| |
| <div class="method_details "> |
| <h3 class="signature " id="get_selected_id-instance_method"> |
| |
| - (<tt>Object</tt>) <strong>get_selected_id</strong>(selectLocator) |
| |
| |
| |
| |
| |
| </h3><div class="docstring"> |
| <div class="discussion"> |
| |
| <p>Gets option element ID for selected option in the specified select element.</p> |
| |
| <p>'selectLocator' is an element locator identifying a drop-down menu</p> |
| |
| |
| </div> |
| </div> |
| <div class="tags"> |
| |
| |
| </div><table class="source_code"> |
| <tr> |
| <td> |
| <pre class="lines"> |
| |
| |
| 1045 |
| 1046 |
| 1047</pre> |
| </td> |
| <td> |
| <pre class="code"><span class="info file"># File 'rb/lib/selenium/client/legacy_driver.rb', line 1045</span> |
| |
| <span class='kw'>def</span> <span class='id identifier rubyid_get_selected_id'>get_selected_id</span><span class='lparen'>(</span><span class='id identifier rubyid_selectLocator'>selectLocator</span><span class='rparen'>)</span> |
| <span class='kw'>return</span> <span class='id identifier rubyid_string_command'>string_command</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>getSelectedId</span><span class='tstring_end'>"</span></span><span class='comma'>,</span> <span class='lbracket'>[</span><span class='id identifier rubyid_selectLocator'>selectLocator</span><span class='comma'>,</span><span class='rbracket'>]</span><span class='rparen'>)</span> |
| <span class='kw'>end</span></pre> |
| </td> |
| </tr> |
| </table> |
| </div> |
| |
| <div class="method_details "> |
| <h3 class="signature " id="get_selected_ids-instance_method"> |
| |
| - (<tt>Object</tt>) <strong>get_selected_ids</strong>(selectLocator) |
| |
| |
| |
| |
| |
| </h3><div class="docstring"> |
| <div class="discussion"> |
| |
| <p>Gets all option element IDs for selected options in the specified select or |
| multi-select element.</p> |
| |
| <p>'selectLocator' is an element locator identifying a drop-down menu</p> |
| |
| |
| </div> |
| </div> |
| <div class="tags"> |
| |
| |
| </div><table class="source_code"> |
| <tr> |
| <td> |
| <pre class="lines"> |
| |
| |
| 1037 |
| 1038 |
| 1039</pre> |
| </td> |
| <td> |
| <pre class="code"><span class="info file"># File 'rb/lib/selenium/client/legacy_driver.rb', line 1037</span> |
| |
| <span class='kw'>def</span> <span class='id identifier rubyid_get_selected_ids'>get_selected_ids</span><span class='lparen'>(</span><span class='id identifier rubyid_selectLocator'>selectLocator</span><span class='rparen'>)</span> |
| <span class='kw'>return</span> <span class='id identifier rubyid_string_array_command'>string_array_command</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>getSelectedIds</span><span class='tstring_end'>"</span></span><span class='comma'>,</span> <span class='lbracket'>[</span><span class='id identifier rubyid_selectLocator'>selectLocator</span><span class='comma'>,</span><span class='rbracket'>]</span><span class='rparen'>)</span> |
| <span class='kw'>end</span></pre> |
| </td> |
| </tr> |
| </table> |
| </div> |
| |
| <div class="method_details "> |
| <h3 class="signature " id="get_selected_index-instance_method"> |
| |
| - (<tt>Object</tt>) <strong>get_selected_index</strong>(selectLocator) |
| |
| |
| |
| |
| |
| </h3><div class="docstring"> |
| <div class="discussion"> |
| |
| <p>Gets option index (option number, starting at 0) for selected option in the |
| specified select element.</p> |
| |
| <p>'selectLocator' is an element locator identifying a drop-down menu</p> |
| |
| |
| </div> |
| </div> |
| <div class="tags"> |
| |
| |
| </div><table class="source_code"> |
| <tr> |
| <td> |
| <pre class="lines"> |
| |
| |
| 1029 |
| 1030 |
| 1031</pre> |
| </td> |
| <td> |
| <pre class="code"><span class="info file"># File 'rb/lib/selenium/client/legacy_driver.rb', line 1029</span> |
| |
| <span class='kw'>def</span> <span class='id identifier rubyid_get_selected_index'>get_selected_index</span><span class='lparen'>(</span><span class='id identifier rubyid_selectLocator'>selectLocator</span><span class='rparen'>)</span> |
| <span class='kw'>return</span> <span class='id identifier rubyid_string_command'>string_command</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>getSelectedIndex</span><span class='tstring_end'>"</span></span><span class='comma'>,</span> <span class='lbracket'>[</span><span class='id identifier rubyid_selectLocator'>selectLocator</span><span class='comma'>,</span><span class='rbracket'>]</span><span class='rparen'>)</span> |
| <span class='kw'>end</span></pre> |
| </td> |
| </tr> |
| </table> |
| </div> |
| |
| <div class="method_details "> |
| <h3 class="signature " id="get_selected_indexes-instance_method"> |
| |
| - (<tt>Object</tt>) <strong>get_selected_indexes</strong>(selectLocator) |
| |
| |
| |
| |
| |
| </h3><div class="docstring"> |
| <div class="discussion"> |
| |
| <p>Gets all option indexes (option number, starting at 0) for selected options |
| in the specified select or multi-select element.</p> |
| |
| <p>'selectLocator' is an element locator identifying a drop-down menu</p> |
| |
| |
| </div> |
| </div> |
| <div class="tags"> |
| |
| |
| </div><table class="source_code"> |
| <tr> |
| <td> |
| <pre class="lines"> |
| |
| |
| 1021 |
| 1022 |
| 1023</pre> |
| </td> |
| <td> |
| <pre class="code"><span class="info file"># File 'rb/lib/selenium/client/legacy_driver.rb', line 1021</span> |
| |
| <span class='kw'>def</span> <span class='id identifier rubyid_get_selected_indexes'>get_selected_indexes</span><span class='lparen'>(</span><span class='id identifier rubyid_selectLocator'>selectLocator</span><span class='rparen'>)</span> |
| <span class='kw'>return</span> <span class='id identifier rubyid_string_array_command'>string_array_command</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>getSelectedIndexes</span><span class='tstring_end'>"</span></span><span class='comma'>,</span> <span class='lbracket'>[</span><span class='id identifier rubyid_selectLocator'>selectLocator</span><span class='comma'>,</span><span class='rbracket'>]</span><span class='rparen'>)</span> |
| <span class='kw'>end</span></pre> |
| </td> |
| </tr> |
| </table> |
| </div> |
| |
| <div class="method_details "> |
| <h3 class="signature " id="get_selected_label-instance_method"> |
| |
| - (<tt>Object</tt>) <strong>get_selected_label</strong>(selectLocator) |
| |
| |
| |
| |
| |
| </h3><div class="docstring"> |
| <div class="discussion"> |
| |
| <p>Gets option label (visible text) for selected option in the specified |
| select element.</p> |
| |
| <p>'selectLocator' is an element locator identifying a drop-down menu</p> |
| |
| |
| </div> |
| </div> |
| <div class="tags"> |
| |
| |
| </div><table class="source_code"> |
| <tr> |
| <td> |
| <pre class="lines"> |
| |
| |
| 997 |
| 998 |
| 999</pre> |
| </td> |
| <td> |
| <pre class="code"><span class="info file"># File 'rb/lib/selenium/client/legacy_driver.rb', line 997</span> |
| |
| <span class='kw'>def</span> <span class='id identifier rubyid_get_selected_label'>get_selected_label</span><span class='lparen'>(</span><span class='id identifier rubyid_selectLocator'>selectLocator</span><span class='rparen'>)</span> |
| <span class='kw'>return</span> <span class='id identifier rubyid_string_command'>string_command</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>getSelectedLabel</span><span class='tstring_end'>"</span></span><span class='comma'>,</span> <span class='lbracket'>[</span><span class='id identifier rubyid_selectLocator'>selectLocator</span><span class='comma'>,</span><span class='rbracket'>]</span><span class='rparen'>)</span> |
| <span class='kw'>end</span></pre> |
| </td> |
| </tr> |
| </table> |
| </div> |
| |
| <div class="method_details "> |
| <h3 class="signature " id="get_selected_labels-instance_method"> |
| |
| - (<tt>Object</tt>) <strong>get_selected_labels</strong>(selectLocator) |
| |
| |
| |
| |
| |
| </h3><div class="docstring"> |
| <div class="discussion"> |
| |
| <p>Gets all option labels (visible text) for selected options in the specified |
| select or multi-select element.</p> |
| |
| <p>'selectLocator' is an element locator identifying a drop-down menu</p> |
| |
| |
| </div> |
| </div> |
| <div class="tags"> |
| |
| |
| </div><table class="source_code"> |
| <tr> |
| <td> |
| <pre class="lines"> |
| |
| |
| 989 |
| 990 |
| 991</pre> |
| </td> |
| <td> |
| <pre class="code"><span class="info file"># File 'rb/lib/selenium/client/legacy_driver.rb', line 989</span> |
| |
| <span class='kw'>def</span> <span class='id identifier rubyid_get_selected_labels'>get_selected_labels</span><span class='lparen'>(</span><span class='id identifier rubyid_selectLocator'>selectLocator</span><span class='rparen'>)</span> |
| <span class='kw'>return</span> <span class='id identifier rubyid_string_array_command'>string_array_command</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>getSelectedLabels</span><span class='tstring_end'>"</span></span><span class='comma'>,</span> <span class='lbracket'>[</span><span class='id identifier rubyid_selectLocator'>selectLocator</span><span class='comma'>,</span><span class='rbracket'>]</span><span class='rparen'>)</span> |
| <span class='kw'>end</span></pre> |
| </td> |
| </tr> |
| </table> |
| </div> |
| |
| <div class="method_details "> |
| <h3 class="signature " id="get_selected_value-instance_method"> |
| |
| - (<tt>Object</tt>) <strong>get_selected_value</strong>(selectLocator) |
| |
| |
| |
| |
| |
| </h3><div class="docstring"> |
| <div class="discussion"> |
| |
| <p>Gets option value (value attribute) for selected option in the specified |
| select element.</p> |
| |
| <p>'selectLocator' is an element locator identifying a drop-down menu</p> |
| |
| |
| </div> |
| </div> |
| <div class="tags"> |
| |
| |
| </div><table class="source_code"> |
| <tr> |
| <td> |
| <pre class="lines"> |
| |
| |
| 1013 |
| 1014 |
| 1015</pre> |
| </td> |
| <td> |
| <pre class="code"><span class="info file"># File 'rb/lib/selenium/client/legacy_driver.rb', line 1013</span> |
| |
| <span class='kw'>def</span> <span class='id identifier rubyid_get_selected_value'>get_selected_value</span><span class='lparen'>(</span><span class='id identifier rubyid_selectLocator'>selectLocator</span><span class='rparen'>)</span> |
| <span class='kw'>return</span> <span class='id identifier rubyid_string_command'>string_command</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>getSelectedValue</span><span class='tstring_end'>"</span></span><span class='comma'>,</span> <span class='lbracket'>[</span><span class='id identifier rubyid_selectLocator'>selectLocator</span><span class='comma'>,</span><span class='rbracket'>]</span><span class='rparen'>)</span> |
| <span class='kw'>end</span></pre> |
| </td> |
| </tr> |
| </table> |
| </div> |
| |
| <div class="method_details "> |
| <h3 class="signature " id="get_selected_values-instance_method"> |
| |
| - (<tt>Object</tt>) <strong>get_selected_values</strong>(selectLocator) |
| |
| |
| |
| |
| |
| </h3><div class="docstring"> |
| <div class="discussion"> |
| |
| <p>Gets all option values (value attributes) for selected options in the |
| specified select or multi-select element.</p> |
| |
| <p>'selectLocator' is an element locator identifying a drop-down menu</p> |
| |
| |
| </div> |
| </div> |
| <div class="tags"> |
| |
| |
| </div><table class="source_code"> |
| <tr> |
| <td> |
| <pre class="lines"> |
| |
| |
| 1005 |
| 1006 |
| 1007</pre> |
| </td> |
| <td> |
| <pre class="code"><span class="info file"># File 'rb/lib/selenium/client/legacy_driver.rb', line 1005</span> |
| |
| <span class='kw'>def</span> <span class='id identifier rubyid_get_selected_values'>get_selected_values</span><span class='lparen'>(</span><span class='id identifier rubyid_selectLocator'>selectLocator</span><span class='rparen'>)</span> |
| <span class='kw'>return</span> <span class='id identifier rubyid_string_array_command'>string_array_command</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>getSelectedValues</span><span class='tstring_end'>"</span></span><span class='comma'>,</span> <span class='lbracket'>[</span><span class='id identifier rubyid_selectLocator'>selectLocator</span><span class='comma'>,</span><span class='rbracket'>]</span><span class='rparen'>)</span> |
| <span class='kw'>end</span></pre> |
| </td> |
| </tr> |
| </table> |
| </div> |
| |
| <div class="method_details "> |
| <h3 class="signature " id="get_speed-instance_method"> |
| |
| - (<tt>Object</tt>) <strong>get_speed</strong> |
| |
| |
| |
| |
| |
| </h3><div class="docstring"> |
| <div class="discussion"> |
| |
| <p>Get execution speed (i.e., get the millisecond length of the delay |
| following each selenium operation). By default, there is no such delay, |
| i.e., the delay is 0 milliseconds.</p> |
| |
| <p>See also setSpeed.</p> |
| |
| |
| </div> |
| </div> |
| <div class="tags"> |
| |
| |
| </div><table class="source_code"> |
| <tr> |
| <td> |
| <pre class="lines"> |
| |
| |
| 456 |
| 457 |
| 458</pre> |
| </td> |
| <td> |
| <pre class="code"><span class="info file"># File 'rb/lib/selenium/client/legacy_driver.rb', line 456</span> |
| |
| <span class='kw'>def</span> <span class='id identifier rubyid_get_speed'>get_speed</span><span class='lparen'>(</span><span class='rparen'>)</span> |
| <span class='kw'>return</span> <span class='id identifier rubyid_string_command'>string_command</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>getSpeed</span><span class='tstring_end'>"</span></span><span class='comma'>,</span> <span class='lbracket'>[</span><span class='rbracket'>]</span><span class='rparen'>)</span> |
| <span class='kw'>end</span></pre> |
| </td> |
| </tr> |
| </table> |
| </div> |
| |
| <div class="method_details "> |
| <h3 class="signature " id="get_table-instance_method"> |
| |
| - (<tt>Object</tt>) <strong>get_table</strong>(tableCellAddress) |
| |
| |
| |
| |
| |
| </h3><div class="docstring"> |
| <div class="discussion"> |
| |
| <p>Gets the text from a cell of a table. The cellAddress syntax |
| tableLocator.row.column, where row and column start at 0.</p> |
| |
| <p>'tableCellAddress' is a cell address, e.g. "foo.1.4"</p> |
| |
| |
| </div> |
| </div> |
| <div class="tags"> |
| |
| |
| </div><table class="source_code"> |
| <tr> |
| <td> |
| <pre class="lines"> |
| |
| |
| 981 |
| 982 |
| 983</pre> |
| </td> |
| <td> |
| <pre class="code"><span class="info file"># File 'rb/lib/selenium/client/legacy_driver.rb', line 981</span> |
| |
| <span class='kw'>def</span> <span class='id identifier rubyid_get_table'>get_table</span><span class='lparen'>(</span><span class='id identifier rubyid_tableCellAddress'>tableCellAddress</span><span class='rparen'>)</span> |
| <span class='kw'>return</span> <span class='id identifier rubyid_string_command'>string_command</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>getTable</span><span class='tstring_end'>"</span></span><span class='comma'>,</span> <span class='lbracket'>[</span><span class='id identifier rubyid_tableCellAddress'>tableCellAddress</span><span class='comma'>,</span><span class='rbracket'>]</span><span class='rparen'>)</span> |
| <span class='kw'>end</span></pre> |
| </td> |
| </tr> |
| </table> |
| </div> |
| |
| <div class="method_details "> |
| <h3 class="signature " id="get_text-instance_method"> |
| |
| - (<tt>Object</tt>) <strong>get_text</strong>(locator) |
| |
| |
| |
| |
| |
| </h3><div class="docstring"> |
| <div class="discussion"> |
| |
| <p>Gets the text of an element. This works for any element that contains text. |
| This command uses either the textContent (Mozilla-like browsers) or the |
| innerText (IE-like browsers) of the element, which is the rendered text |
| shown to the user.</p> |
| |
| <p>'locator' is an element locator</p> |
| |
| |
| </div> |
| </div> |
| <div class="tags"> |
| |
| |
| </div><table class="source_code"> |
| <tr> |
| <td> |
| <pre class="lines"> |
| |
| |
| 939 |
| 940 |
| 941</pre> |
| </td> |
| <td> |
| <pre class="code"><span class="info file"># File 'rb/lib/selenium/client/legacy_driver.rb', line 939</span> |
| |
| <span class='kw'>def</span> <span class='id identifier rubyid_get_text'>get_text</span><span class='lparen'>(</span><span class='id identifier rubyid_locator'>locator</span><span class='rparen'>)</span> |
| <span class='kw'>return</span> <span class='id identifier rubyid_string_command'>string_command</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>getText</span><span class='tstring_end'>"</span></span><span class='comma'>,</span> <span class='lbracket'>[</span><span class='id identifier rubyid_locator'>locator</span><span class='comma'>,</span><span class='rbracket'>]</span><span class='rparen'>)</span> |
| <span class='kw'>end</span></pre> |
| </td> |
| </tr> |
| </table> |
| </div> |
| |
| <div class="method_details "> |
| <h3 class="signature " id="get_title-instance_method"> |
| |
| - (<tt>Object</tt>) <strong>get_title</strong> |
| |
| |
| |
| |
| |
| </h3><div class="docstring"> |
| <div class="discussion"> |
| |
| <p>Gets the title of the current page.</p> |
| |
| |
| </div> |
| </div> |
| <div class="tags"> |
| |
| |
| </div><table class="source_code"> |
| <tr> |
| <td> |
| <pre class="lines"> |
| |
| |
| 911 |
| 912 |
| 913</pre> |
| </td> |
| <td> |
| <pre class="code"><span class="info file"># File 'rb/lib/selenium/client/legacy_driver.rb', line 911</span> |
| |
| <span class='kw'>def</span> <span class='id identifier rubyid_get_title'>get_title</span><span class='lparen'>(</span><span class='rparen'>)</span> |
| <span class='kw'>return</span> <span class='id identifier rubyid_string_command'>string_command</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>getTitle</span><span class='tstring_end'>"</span></span><span class='comma'>,</span> <span class='lbracket'>[</span><span class='rbracket'>]</span><span class='rparen'>)</span> |
| <span class='kw'>end</span></pre> |
| </td> |
| </tr> |
| </table> |
| </div> |
| |
| <div class="method_details "> |
| <h3 class="signature " id="get_value-instance_method"> |
| |
| - (<tt>Object</tt>) <strong>get_value</strong>(locator) |
| |
| |
| |
| |
| |
| </h3><div class="docstring"> |
| <div class="discussion"> |
| |
| <p>Gets the (whitespace-trimmed) value of an input field (or anything else |
| with a value parameter). For checkbox/radio elements, the value will be |
| "on" or "off" depending on whether the element is checked or not.</p> |
| |
| <p>'locator' is an element locator</p> |
| |
| |
| </div> |
| </div> |
| <div class="tags"> |
| |
| |
| </div><table class="source_code"> |
| <tr> |
| <td> |
| <pre class="lines"> |
| |
| |
| 928 |
| 929 |
| 930</pre> |
| </td> |
| <td> |
| <pre class="code"><span class="info file"># File 'rb/lib/selenium/client/legacy_driver.rb', line 928</span> |
| |
| <span class='kw'>def</span> <span class='id identifier rubyid_get_value'>get_value</span><span class='lparen'>(</span><span class='id identifier rubyid_locator'>locator</span><span class='rparen'>)</span> |
| <span class='kw'>return</span> <span class='id identifier rubyid_string_command'>string_command</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>getValue</span><span class='tstring_end'>"</span></span><span class='comma'>,</span> <span class='lbracket'>[</span><span class='id identifier rubyid_locator'>locator</span><span class='comma'>,</span><span class='rbracket'>]</span><span class='rparen'>)</span> |
| <span class='kw'>end</span></pre> |
| </td> |
| </tr> |
| </table> |
| </div> |
| |
| <div class="method_details "> |
| <h3 class="signature " id="get_whether_this_frame_match_frame_expression-instance_method"> |
| |
| - (<tt>Object</tt>) <strong>get_whether_this_frame_match_frame_expression</strong>(currentFrameString, target) |
| |
| |
| |
| |
| |
| </h3><div class="docstring"> |
| <div class="discussion"> |
| |
| <p>Determine whether current/locator identify the frame containing this |
| running code.</p> |
| |
| <p>This is useful in proxy injection mode, where this code runs in every |
| browser frame and window, and sometimes the selenium server needs to |
| identify the "current" frame. In this case, when the test calls |
| selectFrame, this routine is called for each frame to figure out which one |
| has been selected. The selected frame will return true, while all others |
| will return false.</p> |
| |
| <p>'currentFrameString' is starting frame 'target' is new frame (which might |
| be relative to the current one)</p> |
| |
| |
| </div> |
| </div> |
| <div class="tags"> |
| |
| |
| </div><table class="source_code"> |
| <tr> |
| <td> |
| <pre class="lines"> |
| |
| |
| 698 |
| 699 |
| 700</pre> |
| </td> |
| <td> |
| <pre class="code"><span class="info file"># File 'rb/lib/selenium/client/legacy_driver.rb', line 698</span> |
| |
| <span class='kw'>def</span> <span class='id identifier rubyid_get_whether_this_frame_match_frame_expression'>get_whether_this_frame_match_frame_expression</span><span class='lparen'>(</span><span class='id identifier rubyid_currentFrameString'>currentFrameString</span><span class='comma'>,</span><span class='id identifier rubyid_target'>target</span><span class='rparen'>)</span> |
| <span class='kw'>return</span> <span class='id identifier rubyid_boolean_command'>boolean_command</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>getWhetherThisFrameMatchFrameExpression</span><span class='tstring_end'>"</span></span><span class='comma'>,</span> <span class='lbracket'>[</span><span class='id identifier rubyid_currentFrameString'>currentFrameString</span><span class='comma'>,</span><span class='id identifier rubyid_target'>target</span><span class='comma'>,</span><span class='rbracket'>]</span><span class='rparen'>)</span> |
| <span class='kw'>end</span></pre> |
| </td> |
| </tr> |
| </table> |
| </div> |
| |
| <div class="method_details "> |
| <h3 class="signature " id="get_whether_this_window_match_window_expression-instance_method"> |
| |
| - (<tt>Object</tt>) <strong>get_whether_this_window_match_window_expression</strong>(currentWindowString, target) |
| |
| |
| |
| |
| |
| </h3><div class="docstring"> |
| <div class="discussion"> |
| |
| <p>Determine whether currentWindowString plus target identify the window |
| containing this running code.</p> |
| |
| <p>This is useful in proxy injection mode, where this code runs in every |
| browser frame and window, and sometimes the selenium server needs to |
| identify the "current" window. In this case, when the test calls |
| selectWindow, this routine is called for each window to figure out which |
| one has been selected. The selected window will return true, while all |
| others will return false.</p> |
| |
| <p>'currentWindowString' is starting window 'target' is new window (which |
| might be relative to the current one, e.g., "_parent")</p> |
| |
| |
| </div> |
| </div> |
| <div class="tags"> |
| |
| |
| </div><table class="source_code"> |
| <tr> |
| <td> |
| <pre class="lines"> |
| |
| |
| 714 |
| 715 |
| 716</pre> |
| </td> |
| <td> |
| <pre class="code"><span class="info file"># File 'rb/lib/selenium/client/legacy_driver.rb', line 714</span> |
| |
| <span class='kw'>def</span> <span class='id identifier rubyid_get_whether_this_window_match_window_expression'>get_whether_this_window_match_window_expression</span><span class='lparen'>(</span><span class='id identifier rubyid_currentWindowString'>currentWindowString</span><span class='comma'>,</span><span class='id identifier rubyid_target'>target</span><span class='rparen'>)</span> |
| <span class='kw'>return</span> <span class='id identifier rubyid_boolean_command'>boolean_command</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>getWhetherThisWindowMatchWindowExpression</span><span class='tstring_end'>"</span></span><span class='comma'>,</span> <span class='lbracket'>[</span><span class='id identifier rubyid_currentWindowString'>currentWindowString</span><span class='comma'>,</span><span class='id identifier rubyid_target'>target</span><span class='comma'>,</span><span class='rbracket'>]</span><span class='rparen'>)</span> |
| <span class='kw'>end</span></pre> |
| </td> |
| </tr> |
| </table> |
| </div> |
| |
| <div class="method_details "> |
| <h3 class="signature " id="get_xpath_count-instance_method"> |
| |
| - (<tt>Object</tt>) <strong>get_xpath_count</strong>(xpath) |
| |
| |
| |
| |
| |
| </h3><div class="docstring"> |
| <div class="discussion"> |
| |
| <p>Returns the number of nodes that match the specified xpath, eg. "//table" |
| would give the number of tables.</p> |
| |
| <p>'xpath' is the xpath expression to evaluate. do NOT wrap this expression in |
| a 'count()' function; we will do that for you.</p> |
| |
| |
| </div> |
| </div> |
| <div class="tags"> |
| |
| |
| </div><table class="source_code"> |
| <tr> |
| <td> |
| <pre class="lines"> |
| |
| |
| 1332 |
| 1333 |
| 1334</pre> |
| </td> |
| <td> |
| <pre class="code"><span class="info file"># File 'rb/lib/selenium/client/legacy_driver.rb', line 1332</span> |
| |
| <span class='kw'>def</span> <span class='id identifier rubyid_get_xpath_count'>get_xpath_count</span><span class='lparen'>(</span><span class='id identifier rubyid_xpath'>xpath</span><span class='rparen'>)</span> |
| <span class='kw'>return</span> <span class='id identifier rubyid_number_command'>number_command</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>getXpathCount</span><span class='tstring_end'>"</span></span><span class='comma'>,</span> <span class='lbracket'>[</span><span class='id identifier rubyid_xpath'>xpath</span><span class='comma'>,</span><span class='rbracket'>]</span><span class='rparen'>)</span> |
| <span class='kw'>end</span></pre> |
| </td> |
| </tr> |
| </table> |
| </div> |
| |
| <div class="method_details "> |
| <h3 class="signature " id="go_back-instance_method"> |
| |
| - (<tt>Object</tt>) <strong>go_back</strong> |
| |
| |
| |
| |
| |
| </h3><div class="docstring"> |
| <div class="discussion"> |
| |
| <p>Simulates the user clicking the "back" button on their browser.</p> |
| |
| |
| </div> |
| </div> |
| <div class="tags"> |
| |
| |
| </div><table class="source_code"> |
| <tr> |
| <td> |
| <pre class="lines"> |
| |
| |
| 782 |
| 783 |
| 784</pre> |
| </td> |
| <td> |
| <pre class="code"><span class="info file"># File 'rb/lib/selenium/client/legacy_driver.rb', line 782</span> |
| |
| <span class='kw'>def</span> <span class='id identifier rubyid_go_back'>go_back</span><span class='lparen'>(</span><span class='rparen'>)</span> |
| <span class='id identifier rubyid_remote_control_command'>remote_control_command</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>goBack</span><span class='tstring_end'>"</span></span><span class='comma'>,</span> <span class='lbracket'>[</span><span class='rbracket'>]</span><span class='rparen'>)</span> |
| <span class='kw'>end</span></pre> |
| </td> |
| </tr> |
| </table> |
| </div> |
| |
| <div class="method_details "> |
| <h3 class="signature " id="highlight-instance_method"> |
| |
| - (<tt>Object</tt>) <strong>highlight</strong>(locator) |
| |
| |
| |
| |
| |
| </h3><div class="docstring"> |
| <div class="discussion"> |
| |
| <p>Briefly changes the backgroundColor of the specified element yellow. |
| Useful for debugging.</p> |
| |
| <p>'locator' is an element locator</p> |
| |
| |
| </div> |
| </div> |
| <div class="tags"> |
| |
| |
| </div><table class="source_code"> |
| <tr> |
| <td> |
| <pre class="lines"> |
| |
| |
| 947 |
| 948 |
| 949</pre> |
| </td> |
| <td> |
| <pre class="code"><span class="info file"># File 'rb/lib/selenium/client/legacy_driver.rb', line 947</span> |
| |
| <span class='kw'>def</span> <span class='id identifier rubyid_highlight'>highlight</span><span class='lparen'>(</span><span class='id identifier rubyid_locator'>locator</span><span class='rparen'>)</span> |
| <span class='id identifier rubyid_remote_control_command'>remote_control_command</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>highlight</span><span class='tstring_end'>"</span></span><span class='comma'>,</span> <span class='lbracket'>[</span><span class='id identifier rubyid_locator'>locator</span><span class='comma'>,</span><span class='rbracket'>]</span><span class='rparen'>)</span> |
| <span class='kw'>end</span></pre> |
| </td> |
| </tr> |
| </table> |
| </div> |
| |
| <div class="method_details "> |
| <h3 class="signature " id="ignore_attributes_without_value-instance_method"> |
| |
| - (<tt>Object</tt>) <strong>ignore_attributes_without_value</strong>(ignore) |
| |
| |
| |
| |
| |
| </h3><div class="docstring"> |
| <div class="discussion"> |
| |
| <p>Specifies whether Selenium will ignore xpath attributes that have no value, |
| i.e. are the empty string, when using the non-native xpath evaluation |
| engine. You'd want to do this for performance reasons in IE. However, this |
| could break certain xpaths, for example an xpath that looks for an |
| attribute whose value is NOT the empty string.</p> |
| |
| <p>The hope is that such xpaths are relatively rare, but the user should have |
| the option of using them. Note that this only influences xpath evaluation |
| when using the ajaxslt engine (i.e. not "javascript-xpath").</p> |
| |
| <p>'ignore' is boolean, true means we'll ignore attributes without value |
| at the expense of xpath "correctness"; false means |
| we'll sacrifice speed for correctness.</p> |
| |
| |
| </div> |
| </div> |
| <div class="tags"> |
| |
| |
| </div><table class="source_code"> |
| <tr> |
| <td> |
| <pre class="lines"> |
| |
| |
| 1381 |
| 1382 |
| 1383</pre> |
| </td> |
| <td> |
| <pre class="code"><span class="info file"># File 'rb/lib/selenium/client/legacy_driver.rb', line 1381</span> |
| |
| <span class='kw'>def</span> <span class='id identifier rubyid_ignore_attributes_without_value'>ignore_attributes_without_value</span><span class='lparen'>(</span><span class='id identifier rubyid_ignore'>ignore</span><span class='rparen'>)</span> |
| <span class='id identifier rubyid_remote_control_command'>remote_control_command</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>ignoreAttributesWithoutValue</span><span class='tstring_end'>"</span></span><span class='comma'>,</span> <span class='lbracket'>[</span><span class='id identifier rubyid_ignore'>ignore</span><span class='comma'>,</span><span class='rbracket'>]</span><span class='rparen'>)</span> |
| <span class='kw'>end</span></pre> |
| </td> |
| </tr> |
| </table> |
| </div> |
| |
| <div class="method_details "> |
| <h3 class="signature " id="is_alert_present-instance_method"> |
| |
| - (<tt>Object</tt>) <strong>is_alert_present</strong> |
| |
| |
| |
| |
| |
| </h3><div class="docstring"> |
| <div class="discussion"> |
| |
| <p>Has an alert occurred?</p> |
| |
| <p>This function never throws an exception</p> |
| |
| |
| </div> |
| </div> |
| <div class="tags"> |
| |
| |
| </div><table class="source_code"> |
| <tr> |
| <td> |
| <pre class="lines"> |
| |
| |
| 809 |
| 810 |
| 811</pre> |
| </td> |
| <td> |
| <pre class="code"><span class="info file"># File 'rb/lib/selenium/client/legacy_driver.rb', line 809</span> |
| |
| <span class='kw'>def</span> <span class='id identifier rubyid_is_alert_present'>is_alert_present</span><span class='lparen'>(</span><span class='rparen'>)</span> |
| <span class='kw'>return</span> <span class='id identifier rubyid_boolean_command'>boolean_command</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>isAlertPresent</span><span class='tstring_end'>"</span></span><span class='comma'>,</span> <span class='lbracket'>[</span><span class='rbracket'>]</span><span class='rparen'>)</span> |
| <span class='kw'>end</span></pre> |
| </td> |
| </tr> |
| </table> |
| </div> |
| |
| <div class="method_details "> |
| <h3 class="signature " id="is_checked-instance_method"> |
| |
| - (<tt>Object</tt>) <strong>is_checked</strong>(locator) |
| |
| |
| |
| |
| |
| </h3><div class="docstring"> |
| <div class="discussion"> |
| |
| <p>Gets whether a toggle-button (checkbox/radio) is checked. Fails if the |
| specified element doesn't exist or isn't a toggle-button.</p> |
| |
| <p>'locator' is an element locator pointing to a checkbox or radio button</p> |
| |
| |
| </div> |
| </div> |
| <div class="tags"> |
| |
| |
| </div><table class="source_code"> |
| <tr> |
| <td> |
| <pre class="lines"> |
| |
| |
| 972 |
| 973 |
| 974</pre> |
| </td> |
| <td> |
| <pre class="code"><span class="info file"># File 'rb/lib/selenium/client/legacy_driver.rb', line 972</span> |
| |
| <span class='kw'>def</span> <span class='id identifier rubyid_is_checked'>is_checked</span><span class='lparen'>(</span><span class='id identifier rubyid_locator'>locator</span><span class='rparen'>)</span> |
| <span class='kw'>return</span> <span class='id identifier rubyid_boolean_command'>boolean_command</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>isChecked</span><span class='tstring_end'>"</span></span><span class='comma'>,</span> <span class='lbracket'>[</span><span class='id identifier rubyid_locator'>locator</span><span class='comma'>,</span><span class='rbracket'>]</span><span class='rparen'>)</span> |
| <span class='kw'>end</span></pre> |
| </td> |
| </tr> |
| </table> |
| </div> |
| |
| <div class="method_details "> |
| <h3 class="signature " id="is_confirmation_present-instance_method"> |
| |
| - (<tt>Object</tt>) <strong>is_confirmation_present</strong> |
| |
| |
| |
| |
| |
| </h3><div class="docstring"> |
| <div class="discussion"> |
| |
| <p>Has confirm() been called?</p> |
| |
| <p>This function never throws an exception</p> |
| |
| |
| </div> |
| </div> |
| <div class="tags"> |
| |
| |
| </div><table class="source_code"> |
| <tr> |
| <td> |
| <pre class="lines"> |
| |
| |
| 833 |
| 834 |
| 835</pre> |
| </td> |
| <td> |
| <pre class="code"><span class="info file"># File 'rb/lib/selenium/client/legacy_driver.rb', line 833</span> |
| |
| <span class='kw'>def</span> <span class='id identifier rubyid_is_confirmation_present'>is_confirmation_present</span><span class='lparen'>(</span><span class='rparen'>)</span> |
| <span class='kw'>return</span> <span class='id identifier rubyid_boolean_command'>boolean_command</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>isConfirmationPresent</span><span class='tstring_end'>"</span></span><span class='comma'>,</span> <span class='lbracket'>[</span><span class='rbracket'>]</span><span class='rparen'>)</span> |
| <span class='kw'>end</span></pre> |
| </td> |
| </tr> |
| </table> |
| </div> |
| |
| <div class="method_details "> |
| <h3 class="signature " id="is_cookie_present-instance_method"> |
| |
| - (<tt>Object</tt>) <strong>is_cookie_present</strong>(name) |
| |
| |
| |
| |
| |
| </h3><div class="docstring"> |
| <div class="discussion"> |
| |
| <p>Returns true if a cookie with the specified name is present, or false |
| otherwise.</p> |
| |
| <p>'name' is the name of the cookie</p> |
| |
| |
| </div> |
| </div> |
| <div class="tags"> |
| |
| |
| </div><table class="source_code"> |
| <tr> |
| <td> |
| <pre class="lines"> |
| |
| |
| 1464 |
| 1465 |
| 1466</pre> |
| </td> |
| <td> |
| <pre class="code"><span class="info file"># File 'rb/lib/selenium/client/legacy_driver.rb', line 1464</span> |
| |
| <span class='kw'>def</span> <span class='id identifier rubyid_is_cookie_present'>is_cookie_present</span><span class='lparen'>(</span><span class='id identifier rubyid_name'>name</span><span class='rparen'>)</span> |
| <span class='kw'>return</span> <span class='id identifier rubyid_boolean_command'>boolean_command</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>isCookiePresent</span><span class='tstring_end'>"</span></span><span class='comma'>,</span> <span class='lbracket'>[</span><span class='id identifier rubyid_name'>name</span><span class='comma'>,</span><span class='rbracket'>]</span><span class='rparen'>)</span> |
| <span class='kw'>end</span></pre> |
| </td> |
| </tr> |
| </table> |
| </div> |
| |
| <div class="method_details "> |
| <h3 class="signature " id="is_editable-instance_method"> |
| |
| - (<tt>Object</tt>) <strong>is_editable</strong>(locator) |
| |
| |
| |
| |
| |
| </h3><div class="docstring"> |
| <div class="discussion"> |
| |
| <p>Determines whether the specified input element is editable, ie hasn't been |
| disabled. This method will fail if the specified element isn't an input |
| element.</p> |
| |
| <p>'locator' is an element locator</p> |
| |
| |
| </div> |
| </div> |
| <div class="tags"> |
| |
| |
| </div><table class="source_code"> |
| <tr> |
| <td> |
| <pre class="lines"> |
| |
| |
| 1108 |
| 1109 |
| 1110</pre> |
| </td> |
| <td> |
| <pre class="code"><span class="info file"># File 'rb/lib/selenium/client/legacy_driver.rb', line 1108</span> |
| |
| <span class='kw'>def</span> <span class='id identifier rubyid_is_editable'>is_editable</span><span class='lparen'>(</span><span class='id identifier rubyid_locator'>locator</span><span class='rparen'>)</span> |
| <span class='kw'>return</span> <span class='id identifier rubyid_boolean_command'>boolean_command</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>isEditable</span><span class='tstring_end'>"</span></span><span class='comma'>,</span> <span class='lbracket'>[</span><span class='id identifier rubyid_locator'>locator</span><span class='comma'>,</span><span class='rbracket'>]</span><span class='rparen'>)</span> |
| <span class='kw'>end</span></pre> |
| </td> |
| </tr> |
| </table> |
| </div> |
| |
| <div class="method_details "> |
| <h3 class="signature " id="is_element_present-instance_method"> |
| |
| - (<tt>Object</tt>) <strong>is_element_present</strong>(locator) |
| |
| |
| |
| |
| |
| </h3><div class="docstring"> |
| <div class="discussion"> |
| |
| <p>Verifies that the specified element is somewhere on the page.</p> |
| |
| <p>'locator' is an element locator</p> |
| |
| |
| </div> |
| </div> |
| <div class="tags"> |
| |
| |
| </div><table class="source_code"> |
| <tr> |
| <td> |
| <pre class="lines"> |
| |
| |
| 1087 |
| 1088 |
| 1089</pre> |
| </td> |
| <td> |
| <pre class="code"><span class="info file"># File 'rb/lib/selenium/client/legacy_driver.rb', line 1087</span> |
| |
| <span class='kw'>def</span> <span class='id identifier rubyid_is_element_present'>is_element_present</span><span class='lparen'>(</span><span class='id identifier rubyid_locator'>locator</span><span class='rparen'>)</span> |
| <span class='kw'>return</span> <span class='id identifier rubyid_boolean_command'>boolean_command</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>isElementPresent</span><span class='tstring_end'>"</span></span><span class='comma'>,</span> <span class='lbracket'>[</span><span class='id identifier rubyid_locator'>locator</span><span class='comma'>,</span><span class='rbracket'>]</span><span class='rparen'>)</span> |
| <span class='kw'>end</span></pre> |
| </td> |
| </tr> |
| </table> |
| </div> |
| |
| <div class="method_details "> |
| <h3 class="signature " id="is_ordered-instance_method"> |
| |
| - (<tt>Object</tt>) <strong>is_ordered</strong>(locator1, locator2) |
| |
| |
| |
| |
| |
| </h3><div class="docstring"> |
| <div class="discussion"> |
| |
| <p>Check if these two elements have same parent and are ordered siblings in |
| the DOM. Two same elements will not be considered ordered.</p> |
| |
| <p>'locator1' is an element locator pointing to the first element 'locator2' |
| is an element locator pointing to the second element</p> |
| |
| |
| </div> |
| </div> |
| <div class="tags"> |
| |
| |
| </div><table class="source_code"> |
| <tr> |
| <td> |
| <pre class="lines"> |
| |
| |
| 1266 |
| 1267 |
| 1268</pre> |
| </td> |
| <td> |
| <pre class="code"><span class="info file"># File 'rb/lib/selenium/client/legacy_driver.rb', line 1266</span> |
| |
| <span class='kw'>def</span> <span class='id identifier rubyid_is_ordered'>is_ordered</span><span class='lparen'>(</span><span class='id identifier rubyid_locator1'>locator1</span><span class='comma'>,</span><span class='id identifier rubyid_locator2'>locator2</span><span class='rparen'>)</span> |
| <span class='kw'>return</span> <span class='id identifier rubyid_boolean_command'>boolean_command</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>isOrdered</span><span class='tstring_end'>"</span></span><span class='comma'>,</span> <span class='lbracket'>[</span><span class='id identifier rubyid_locator1'>locator1</span><span class='comma'>,</span><span class='id identifier rubyid_locator2'>locator2</span><span class='comma'>,</span><span class='rbracket'>]</span><span class='rparen'>)</span> |
| <span class='kw'>end</span></pre> |
| </td> |
| </tr> |
| </table> |
| </div> |
| |
| <div class="method_details "> |
| <h3 class="signature " id="is_prompt_present-instance_method"> |
| |
| - (<tt>Object</tt>) <strong>is_prompt_present</strong> |
| |
| |
| |
| |
| |
| </h3><div class="docstring"> |
| <div class="discussion"> |
| |
| <p>Has a prompt occurred?</p> |
| |
| <p>This function never throws an exception</p> |
| |
| |
| </div> |
| </div> |
| <div class="tags"> |
| |
| |
| </div><table class="source_code"> |
| <tr> |
| <td> |
| <pre class="lines"> |
| |
| |
| 821 |
| 822 |
| 823</pre> |
| </td> |
| <td> |
| <pre class="code"><span class="info file"># File 'rb/lib/selenium/client/legacy_driver.rb', line 821</span> |
| |
| <span class='kw'>def</span> <span class='id identifier rubyid_is_prompt_present'>is_prompt_present</span><span class='lparen'>(</span><span class='rparen'>)</span> |
| <span class='kw'>return</span> <span class='id identifier rubyid_boolean_command'>boolean_command</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>isPromptPresent</span><span class='tstring_end'>"</span></span><span class='comma'>,</span> <span class='lbracket'>[</span><span class='rbracket'>]</span><span class='rparen'>)</span> |
| <span class='kw'>end</span></pre> |
| </td> |
| </tr> |
| </table> |
| </div> |
| |
| <div class="method_details "> |
| <h3 class="signature " id="is_something_selected-instance_method"> |
| |
| - (<tt>Object</tt>) <strong>is_something_selected</strong>(selectLocator) |
| |
| |
| |
| |
| |
| </h3><div class="docstring"> |
| <div class="discussion"> |
| |
| <p>Determines whether some option in a drop-down menu is selected.</p> |
| |
| <p>'selectLocator' is an element locator identifying a drop-down menu</p> |
| |
| |
| </div> |
| </div> |
| <div class="tags"> |
| |
| |
| </div><table class="source_code"> |
| <tr> |
| <td> |
| <pre class="lines"> |
| |
| |
| 1053 |
| 1054 |
| 1055</pre> |
| </td> |
| <td> |
| <pre class="code"><span class="info file"># File 'rb/lib/selenium/client/legacy_driver.rb', line 1053</span> |
| |
| <span class='kw'>def</span> <span class='id identifier rubyid_is_something_selected'>is_something_selected</span><span class='lparen'>(</span><span class='id identifier rubyid_selectLocator'>selectLocator</span><span class='rparen'>)</span> |
| <span class='kw'>return</span> <span class='id identifier rubyid_boolean_command'>boolean_command</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>isSomethingSelected</span><span class='tstring_end'>"</span></span><span class='comma'>,</span> <span class='lbracket'>[</span><span class='id identifier rubyid_selectLocator'>selectLocator</span><span class='comma'>,</span><span class='rbracket'>]</span><span class='rparen'>)</span> |
| <span class='kw'>end</span></pre> |
| </td> |
| </tr> |
| </table> |
| </div> |
| |
| <div class="method_details "> |
| <h3 class="signature " id="is_text_present-instance_method"> |
| |
| - (<tt>Object</tt>) <strong>is_text_present</strong>(pattern) |
| |
| |
| |
| |
| |
| </h3><div class="docstring"> |
| <div class="discussion"> |
| |
| <p>Verifies that the specified text pattern appears somewhere on the rendered |
| page shown to the user.</p> |
| |
| <p>'pattern' is a pattern to match with the text of the page</p> |
| |
| |
| </div> |
| </div> |
| <div class="tags"> |
| |
| |
| </div><table class="source_code"> |
| <tr> |
| <td> |
| <pre class="lines"> |
| |
| |
| 1079 |
| 1080 |
| 1081</pre> |
| </td> |
| <td> |
| <pre class="code"><span class="info file"># File 'rb/lib/selenium/client/legacy_driver.rb', line 1079</span> |
| |
| <span class='kw'>def</span> <span class='id identifier rubyid_is_text_present'>is_text_present</span><span class='lparen'>(</span><span class='id identifier rubyid_pattern'>pattern</span><span class='rparen'>)</span> |
| <span class='kw'>return</span> <span class='id identifier rubyid_boolean_command'>boolean_command</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>isTextPresent</span><span class='tstring_end'>"</span></span><span class='comma'>,</span> <span class='lbracket'>[</span><span class='id identifier rubyid_pattern'>pattern</span><span class='comma'>,</span><span class='rbracket'>]</span><span class='rparen'>)</span> |
| <span class='kw'>end</span></pre> |
| </td> |
| </tr> |
| </table> |
| </div> |
| |
| <div class="method_details "> |
| <h3 class="signature " id="is_visible-instance_method"> |
| |
| - (<tt>Object</tt>) <strong>is_visible</strong>(locator) |
| |
| |
| |
| |
| |
| </h3><div class="docstring"> |
| <div class="discussion"> |
| |
| <p>Determines if the specified element is visible. An element can be rendered |
| invisible by setting the CSS "visibility" property to "hidden", or the |
| "display" property to "none", either for the element itself or one if its |
| ancestors. This method will fail if the element is not present.</p> |
| |
| <p>'locator' is an element locator</p> |
| |
| |
| </div> |
| </div> |
| <div class="tags"> |
| |
| |
| </div><table class="source_code"> |
| <tr> |
| <td> |
| <pre class="lines"> |
| |
| |
| 1099 |
| 1100 |
| 1101</pre> |
| </td> |
| <td> |
| <pre class="code"><span class="info file"># File 'rb/lib/selenium/client/legacy_driver.rb', line 1099</span> |
| |
| <span class='kw'>def</span> <span class='id identifier rubyid_is_visible'>is_visible</span><span class='lparen'>(</span><span class='id identifier rubyid_locator'>locator</span><span class='rparen'>)</span> |
| <span class='kw'>return</span> <span class='id identifier rubyid_boolean_command'>boolean_command</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>isVisible</span><span class='tstring_end'>"</span></span><span class='comma'>,</span> <span class='lbracket'>[</span><span class='id identifier rubyid_locator'>locator</span><span class='comma'>,</span><span class='rbracket'>]</span><span class='rparen'>)</span> |
| <span class='kw'>end</span></pre> |
| </td> |
| </tr> |
| </table> |
| </div> |
| |
| <div class="method_details "> |
| <h3 class="signature " id="key_down-instance_method"> |
| |
| - (<tt>Object</tt>) <strong>key_down</strong>(locator, keySequence) |
| |
| |
| |
| |
| |
| </h3><div class="docstring"> |
| <div class="discussion"> |
| |
| <p>Simulates a user pressing a key (without releasing it yet).</p> |
| |
| <p>'locator' is an element locator 'keySequence' is Either be a string("" |
| followed by the numeric keycode of the key to be pressed, normally the |
| ASCII value of that key), or a single character. For example: "w", "119".</p> |
| |
| |
| </div> |
| </div> |
| <div class="tags"> |
| |
| |
| </div><table class="source_code"> |
| <tr> |
| <td> |
| <pre class="lines"> |
| |
| |
| 285 |
| 286 |
| 287</pre> |
| </td> |
| <td> |
| <pre class="code"><span class="info file"># File 'rb/lib/selenium/client/legacy_driver.rb', line 285</span> |
| |
| <span class='kw'>def</span> <span class='id identifier rubyid_key_down'>key_down</span><span class='lparen'>(</span><span class='id identifier rubyid_locator'>locator</span><span class='comma'>,</span><span class='id identifier rubyid_keySequence'>keySequence</span><span class='rparen'>)</span> |
| <span class='id identifier rubyid_remote_control_command'>remote_control_command</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>keyDown</span><span class='tstring_end'>"</span></span><span class='comma'>,</span> <span class='lbracket'>[</span><span class='id identifier rubyid_locator'>locator</span><span class='comma'>,</span><span class='id identifier rubyid_keySequence'>keySequence</span><span class='comma'>,</span><span class='rbracket'>]</span><span class='rparen'>)</span> |
| <span class='kw'>end</span></pre> |
| </td> |
| </tr> |
| </table> |
| </div> |
| |
| <div class="method_details "> |
| <h3 class="signature " id="key_down_native-instance_method"> |
| |
| - (<tt>Object</tt>) <strong>key_down_native</strong>(keycode) |
| |
| |
| |
| |
| |
| </h3><div class="docstring"> |
| <div class="discussion"> |
| |
| <p>Simulates a user pressing a key (without releasing it yet) by sending a |
| native operating system keystroke. This function uses the java.awt.Robot |
| class to send a keystroke; this more accurately simulates typing a key on |
| the keyboard. It does not honor settings from the shiftKeyDown, |
| controlKeyDown, altKeyDown and metaKeyDown commands, and does not target |
| any particular HTML element. To send a keystroke to a particular element, |
| focus on the element first before running this command.</p> |
| |
| <p>'keycode' is an integer keycode number corresponding to a |
| java.awt.event.KeyEvent; note that Java keycodes are NOT the same thing as |
| JavaScript keycodes!</p> |
| |
| |
| </div> |
| </div> |
| <div class="tags"> |
| |
| |
| </div><table class="source_code"> |
| <tr> |
| <td> |
| <pre class="lines"> |
| |
| |
| 1689 |
| 1690 |
| 1691</pre> |
| </td> |
| <td> |
| <pre class="code"><span class="info file"># File 'rb/lib/selenium/client/legacy_driver.rb', line 1689</span> |
| |
| <span class='kw'>def</span> <span class='id identifier rubyid_key_down_native'>key_down_native</span><span class='lparen'>(</span><span class='id identifier rubyid_keycode'>keycode</span><span class='rparen'>)</span> |
| <span class='id identifier rubyid_remote_control_command'>remote_control_command</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>keyDownNative</span><span class='tstring_end'>"</span></span><span class='comma'>,</span> <span class='lbracket'>[</span><span class='id identifier rubyid_keycode'>keycode</span><span class='comma'>,</span><span class='rbracket'>]</span><span class='rparen'>)</span> |
| <span class='kw'>end</span></pre> |
| </td> |
| </tr> |
| </table> |
| </div> |
| |
| <div class="method_details "> |
| <h3 class="signature " id="key_press-instance_method"> |
| |
| - (<tt>Object</tt>) <strong>key_press</strong>(locator, keySequence) |
| |
| |
| |
| |
| |
| </h3><div class="docstring"> |
| <div class="discussion"> |
| |
| <p>Simulates a user pressing and releasing a key.</p> |
| |
| <p>'locator' is an element locator 'keySequence' is Either be a string("" |
| followed by the numeric keycode of the key to be pressed, normally the |
| ASCII value of that key), or a single character. For example: "w", "119".</p> |
| |
| |
| </div> |
| </div> |
| <div class="tags"> |
| |
| |
| </div><table class="source_code"> |
| <tr> |
| <td> |
| <pre class="lines"> |
| |
| |
| 220 |
| 221 |
| 222</pre> |
| </td> |
| <td> |
| <pre class="code"><span class="info file"># File 'rb/lib/selenium/client/legacy_driver.rb', line 220</span> |
| |
| <span class='kw'>def</span> <span class='id identifier rubyid_key_press'>key_press</span><span class='lparen'>(</span><span class='id identifier rubyid_locator'>locator</span><span class='comma'>,</span><span class='id identifier rubyid_keySequence'>keySequence</span><span class='rparen'>)</span> |
| <span class='id identifier rubyid_remote_control_command'>remote_control_command</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>keyPress</span><span class='tstring_end'>"</span></span><span class='comma'>,</span> <span class='lbracket'>[</span><span class='id identifier rubyid_locator'>locator</span><span class='comma'>,</span><span class='id identifier rubyid_keySequence'>keySequence</span><span class='comma'>,</span><span class='rbracket'>]</span><span class='rparen'>)</span> |
| <span class='kw'>end</span></pre> |
| </td> |
| </tr> |
| </table> |
| </div> |
| |
| <div class="method_details "> |
| <h3 class="signature " id="key_press_native-instance_method"> |
| |
| - (<tt>Object</tt>) <strong>key_press_native</strong>(keycode) |
| |
| |
| |
| |
| |
| </h3><div class="docstring"> |
| <div class="discussion"> |
| |
| <p>Simulates a user pressing and releasing a key by sending a native operating |
| system keystroke. This function uses the java.awt.Robot class to send a |
| keystroke; this more accurately simulates typing a key on the keyboard. It |
| does not honor settings from the shiftKeyDown, controlKeyDown, altKeyDown |
| and metaKeyDown commands, and does not target any particular HTML element. |
| To send a keystroke to a particular element, focus on the element first |
| before running this command.</p> |
| |
| <p>'keycode' is an integer keycode number corresponding to a |
| java.awt.event.KeyEvent; note that Java keycodes are NOT the same thing as |
| JavaScript keycodes!</p> |
| |
| |
| </div> |
| </div> |
| <div class="tags"> |
| |
| |
| </div><table class="source_code"> |
| <tr> |
| <td> |
| <pre class="lines"> |
| |
| |
| 1713 |
| 1714 |
| 1715</pre> |
| </td> |
| <td> |
| <pre class="code"><span class="info file"># File 'rb/lib/selenium/client/legacy_driver.rb', line 1713</span> |
| |
| <span class='kw'>def</span> <span class='id identifier rubyid_key_press_native'>key_press_native</span><span class='lparen'>(</span><span class='id identifier rubyid_keycode'>keycode</span><span class='rparen'>)</span> |
| <span class='id identifier rubyid_remote_control_command'>remote_control_command</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>keyPressNative</span><span class='tstring_end'>"</span></span><span class='comma'>,</span> <span class='lbracket'>[</span><span class='id identifier rubyid_keycode'>keycode</span><span class='comma'>,</span><span class='rbracket'>]</span><span class='rparen'>)</span> |
| <span class='kw'>end</span></pre> |
| </td> |
| </tr> |
| </table> |
| </div> |
| |
| <div class="method_details "> |
| <h3 class="signature " id="key_up-instance_method"> |
| |
| - (<tt>Object</tt>) <strong>key_up</strong>(locator, keySequence) |
| |
| |
| |
| |
| |
| </h3><div class="docstring"> |
| <div class="discussion"> |
| |
| <p>Simulates a user releasing a key.</p> |
| |
| <p>'locator' is an element locator 'keySequence' is Either be a string("" |
| followed by the numeric keycode of the key to be pressed, normally the |
| ASCII value of that key), or a single character. For example: "w", "119".</p> |
| |
| |
| </div> |
| </div> |
| <div class="tags"> |
| |
| |
| </div><table class="source_code"> |
| <tr> |
| <td> |
| <pre class="lines"> |
| |
| |
| 294 |
| 295 |
| 296</pre> |
| </td> |
| <td> |
| <pre class="code"><span class="info file"># File 'rb/lib/selenium/client/legacy_driver.rb', line 294</span> |
| |
| <span class='kw'>def</span> <span class='id identifier rubyid_key_up'>key_up</span><span class='lparen'>(</span><span class='id identifier rubyid_locator'>locator</span><span class='comma'>,</span><span class='id identifier rubyid_keySequence'>keySequence</span><span class='rparen'>)</span> |
| <span class='id identifier rubyid_remote_control_command'>remote_control_command</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>keyUp</span><span class='tstring_end'>"</span></span><span class='comma'>,</span> <span class='lbracket'>[</span><span class='id identifier rubyid_locator'>locator</span><span class='comma'>,</span><span class='id identifier rubyid_keySequence'>keySequence</span><span class='comma'>,</span><span class='rbracket'>]</span><span class='rparen'>)</span> |
| <span class='kw'>end</span></pre> |
| </td> |
| </tr> |
| </table> |
| </div> |
| |
| <div class="method_details "> |
| <h3 class="signature " id="key_up_native-instance_method"> |
| |
| - (<tt>Object</tt>) <strong>key_up_native</strong>(keycode) |
| |
| |
| |
| |
| |
| </h3><div class="docstring"> |
| <div class="discussion"> |
| |
| <p>Simulates a user releasing a key by sending a native operating system |
| keystroke. This function uses the java.awt.Robot class to send a keystroke; |
| this more accurately simulates typing a key on the keyboard. It does not |
| honor settings from the shiftKeyDown, controlKeyDown, altKeyDown and |
| metaKeyDown commands, and does not target any particular HTML element. To |
| send a keystroke to a particular element, focus on the element first before |
| running this command.</p> |
| |
| <p>'keycode' is an integer keycode number corresponding to a |
| java.awt.event.KeyEvent; note that Java keycodes are NOT the same thing as |
| JavaScript keycodes!</p> |
| |
| |
| </div> |
| </div> |
| <div class="tags"> |
| |
| |
| </div><table class="source_code"> |
| <tr> |
| <td> |
| <pre class="lines"> |
| |
| |
| 1701 |
| 1702 |
| 1703</pre> |
| </td> |
| <td> |
| <pre class="code"><span class="info file"># File 'rb/lib/selenium/client/legacy_driver.rb', line 1701</span> |
| |
| <span class='kw'>def</span> <span class='id identifier rubyid_key_up_native'>key_up_native</span><span class='lparen'>(</span><span class='id identifier rubyid_keycode'>keycode</span><span class='rparen'>)</span> |
| <span class='id identifier rubyid_remote_control_command'>remote_control_command</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>keyUpNative</span><span class='tstring_end'>"</span></span><span class='comma'>,</span> <span class='lbracket'>[</span><span class='id identifier rubyid_keycode'>keycode</span><span class='comma'>,</span><span class='rbracket'>]</span><span class='rparen'>)</span> |
| <span class='kw'>end</span></pre> |
| </td> |
| </tr> |
| </table> |
| </div> |
| |
| <div class="method_details "> |
| <h3 class="signature " id="meta_key_down-instance_method"> |
| |
| - (<tt>Object</tt>) <strong>meta_key_down</strong> |
| |
| |
| |
| |
| |
| </h3><div class="docstring"> |
| <div class="discussion"> |
| |
| <p>Press the meta key and hold it down until doMetaUp() is called or a new |
| page is loaded.</p> |
| |
| |
| </div> |
| </div> |
| <div class="tags"> |
| |
| |
| </div><table class="source_code"> |
| <tr> |
| <td> |
| <pre class="lines"> |
| |
| |
| 241 |
| 242 |
| 243</pre> |
| </td> |
| <td> |
| <pre class="code"><span class="info file"># File 'rb/lib/selenium/client/legacy_driver.rb', line 241</span> |
| |
| <span class='kw'>def</span> <span class='id identifier rubyid_meta_key_down'>meta_key_down</span><span class='lparen'>(</span><span class='rparen'>)</span> |
| <span class='id identifier rubyid_remote_control_command'>remote_control_command</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>metaKeyDown</span><span class='tstring_end'>"</span></span><span class='comma'>,</span> <span class='lbracket'>[</span><span class='rbracket'>]</span><span class='rparen'>)</span> |
| <span class='kw'>end</span></pre> |
| </td> |
| </tr> |
| </table> |
| </div> |
| |
| <div class="method_details "> |
| <h3 class="signature " id="meta_key_up-instance_method"> |
| |
| - (<tt>Object</tt>) <strong>meta_key_up</strong> |
| |
| |
| |
| |
| |
| </h3><div class="docstring"> |
| <div class="discussion"> |
| |
| <p>Release the meta key.</p> |
| |
| |
| </div> |
| </div> |
| <div class="tags"> |
| |
| |
| </div><table class="source_code"> |
| <tr> |
| <td> |
| <pre class="lines"> |
| |
| |
| 248 |
| 249 |
| 250</pre> |
| </td> |
| <td> |
| <pre class="code"><span class="info file"># File 'rb/lib/selenium/client/legacy_driver.rb', line 248</span> |
| |
| <span class='kw'>def</span> <span class='id identifier rubyid_meta_key_up'>meta_key_up</span><span class='lparen'>(</span><span class='rparen'>)</span> |
| <span class='id identifier rubyid_remote_control_command'>remote_control_command</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>metaKeyUp</span><span class='tstring_end'>"</span></span><span class='comma'>,</span> <span class='lbracket'>[</span><span class='rbracket'>]</span><span class='rparen'>)</span> |
| <span class='kw'>end</span></pre> |
| </td> |
| </tr> |
| </table> |
| </div> |
| |
| <div class="method_details "> |
| <h3 class="signature " id="mouse_down-instance_method"> |
| |
| - (<tt>Object</tt>) <strong>mouse_down</strong>(locator) |
| |
| |
| |
| |
| |
| </h3><div class="docstring"> |
| <div class="discussion"> |
| |
| <p>Simulates a user pressing the left mouse button (without releasing it yet) |
| on the specified element.</p> |
| |
| <p>'locator' is an element locator</p> |
| |
| |
| </div> |
| </div> |
| <div class="tags"> |
| |
| |
| </div><table class="source_code"> |
| <tr> |
| <td> |
| <pre class="lines"> |
| |
| |
| 319 |
| 320 |
| 321</pre> |
| </td> |
| <td> |
| <pre class="code"><span class="info file"># File 'rb/lib/selenium/client/legacy_driver.rb', line 319</span> |
| |
| <span class='kw'>def</span> <span class='id identifier rubyid_mouse_down'>mouse_down</span><span class='lparen'>(</span><span class='id identifier rubyid_locator'>locator</span><span class='rparen'>)</span> |
| <span class='id identifier rubyid_remote_control_command'>remote_control_command</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>mouseDown</span><span class='tstring_end'>"</span></span><span class='comma'>,</span> <span class='lbracket'>[</span><span class='id identifier rubyid_locator'>locator</span><span class='comma'>,</span><span class='rbracket'>]</span><span class='rparen'>)</span> |
| <span class='kw'>end</span></pre> |
| </td> |
| </tr> |
| </table> |
| </div> |
| |
| <div class="method_details "> |
| <h3 class="signature " id="mouse_down_at-instance_method"> |
| |
| - (<tt>Object</tt>) <strong>mouse_down_at</strong>(locator, coordString) |
| |
| |
| |
| |
| |
| </h3><div class="docstring"> |
| <div class="discussion"> |
| |
| <p>Simulates a user pressing the left mouse button (without releasing it yet) |
| at the specified location.</p> |
| |
| <p>'locator' is an element locator 'coordString' is specifies the x,y position |
| (i.e. - 10,20) of the mouse event relative to the element returned by |
| the locator.</p> |
| |
| |
| </div> |
| </div> |
| <div class="tags"> |
| |
| |
| </div><table class="source_code"> |
| <tr> |
| <td> |
| <pre class="lines"> |
| |
| |
| 338 |
| 339 |
| 340</pre> |
| </td> |
| <td> |
| <pre class="code"><span class="info file"># File 'rb/lib/selenium/client/legacy_driver.rb', line 338</span> |
| |
| <span class='kw'>def</span> <span class='id identifier rubyid_mouse_down_at'>mouse_down_at</span><span class='lparen'>(</span><span class='id identifier rubyid_locator'>locator</span><span class='comma'>,</span><span class='id identifier rubyid_coordString'>coordString</span><span class='rparen'>)</span> |
| <span class='id identifier rubyid_remote_control_command'>remote_control_command</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>mouseDownAt</span><span class='tstring_end'>"</span></span><span class='comma'>,</span> <span class='lbracket'>[</span><span class='id identifier rubyid_locator'>locator</span><span class='comma'>,</span><span class='id identifier rubyid_coordString'>coordString</span><span class='comma'>,</span><span class='rbracket'>]</span><span class='rparen'>)</span> |
| <span class='kw'>end</span></pre> |
| </td> |
| </tr> |
| </table> |
| </div> |
| |
| <div class="method_details "> |
| <h3 class="signature " id="mouse_down_right-instance_method"> |
| |
| - (<tt>Object</tt>) <strong>mouse_down_right</strong>(locator) |
| |
| |
| |
| |
| |
| </h3><div class="docstring"> |
| <div class="discussion"> |
| |
| <p>Simulates a user pressing the right mouse button (without releasing it yet) |
| on the specified element.</p> |
| |
| <p>'locator' is an element locator</p> |
| |
| |
| </div> |
| </div> |
| <div class="tags"> |
| |
| |
| </div><table class="source_code"> |
| <tr> |
| <td> |
| <pre class="lines"> |
| |
| |
| 328 |
| 329 |
| 330</pre> |
| </td> |
| <td> |
| <pre class="code"><span class="info file"># File 'rb/lib/selenium/client/legacy_driver.rb', line 328</span> |
| |
| <span class='kw'>def</span> <span class='id identifier rubyid_mouse_down_right'>mouse_down_right</span><span class='lparen'>(</span><span class='id identifier rubyid_locator'>locator</span><span class='rparen'>)</span> |
| <span class='id identifier rubyid_remote_control_command'>remote_control_command</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>mouseDownRight</span><span class='tstring_end'>"</span></span><span class='comma'>,</span> <span class='lbracket'>[</span><span class='id identifier rubyid_locator'>locator</span><span class='comma'>,</span><span class='rbracket'>]</span><span class='rparen'>)</span> |
| <span class='kw'>end</span></pre> |
| </td> |
| </tr> |
| </table> |
| </div> |
| |
| <div class="method_details "> |
| <h3 class="signature " id="mouse_down_right_at-instance_method"> |
| |
| - (<tt>Object</tt>) <strong>mouse_down_right_at</strong>(locator, coordString) |
| |
| |
| |
| |
| |
| </h3><div class="docstring"> |
| <div class="discussion"> |
| |
| <p>Simulates a user pressing the right mouse button (without releasing it yet) |
| at the specified location.</p> |
| |
| <p>'locator' is an element locator 'coordString' is specifies the x,y position |
| (i.e. - 10,20) of the mouse event relative to the element returned by |
| the locator.</p> |
| |
| |
| </div> |
| </div> |
| <div class="tags"> |
| |
| |
| </div><table class="source_code"> |
| <tr> |
| <td> |
| <pre class="lines"> |
| |
| |
| 348 |
| 349 |
| 350</pre> |
| </td> |
| <td> |
| <pre class="code"><span class="info file"># File 'rb/lib/selenium/client/legacy_driver.rb', line 348</span> |
| |
| <span class='kw'>def</span> <span class='id identifier rubyid_mouse_down_right_at'>mouse_down_right_at</span><span class='lparen'>(</span><span class='id identifier rubyid_locator'>locator</span><span class='comma'>,</span><span class='id identifier rubyid_coordString'>coordString</span><span class='rparen'>)</span> |
| <span class='id identifier rubyid_remote_control_command'>remote_control_command</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>mouseDownRightAt</span><span class='tstring_end'>"</span></span><span class='comma'>,</span> <span class='lbracket'>[</span><span class='id identifier rubyid_locator'>locator</span><span class='comma'>,</span><span class='id identifier rubyid_coordString'>coordString</span><span class='comma'>,</span><span class='rbracket'>]</span><span class='rparen'>)</span> |
| <span class='kw'>end</span></pre> |
| </td> |
| </tr> |
| </table> |
| </div> |
| |
| <div class="method_details "> |
| <h3 class="signature " id="mouse_move-instance_method"> |
| |
| - (<tt>Object</tt>) <strong>mouse_move</strong>(locator) |
| |
| |
| |
| |
| |
| </h3><div class="docstring"> |
| <div class="discussion"> |
| |
| <p>Simulates a user pressing the mouse button (without releasing it yet) on |
| the specified element.</p> |
| |
| <p>'locator' is an element locator</p> |
| |
| |
| </div> |
| </div> |
| <div class="tags"> |
| |
| |
| </div><table class="source_code"> |
| <tr> |
| <td> |
| <pre class="lines"> |
| |
| |
| 395 |
| 396 |
| 397</pre> |
| </td> |
| <td> |
| <pre class="code"><span class="info file"># File 'rb/lib/selenium/client/legacy_driver.rb', line 395</span> |
| |
| <span class='kw'>def</span> <span class='id identifier rubyid_mouse_move'>mouse_move</span><span class='lparen'>(</span><span class='id identifier rubyid_locator'>locator</span><span class='rparen'>)</span> |
| <span class='id identifier rubyid_remote_control_command'>remote_control_command</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>mouseMove</span><span class='tstring_end'>"</span></span><span class='comma'>,</span> <span class='lbracket'>[</span><span class='id identifier rubyid_locator'>locator</span><span class='comma'>,</span><span class='rbracket'>]</span><span class='rparen'>)</span> |
| <span class='kw'>end</span></pre> |
| </td> |
| </tr> |
| </table> |
| </div> |
| |
| <div class="method_details "> |
| <h3 class="signature " id="mouse_move_at-instance_method"> |
| |
| - (<tt>Object</tt>) <strong>mouse_move_at</strong>(locator, coordString) |
| |
| |
| |
| |
| |
| </h3><div class="docstring"> |
| <div class="discussion"> |
| |
| <p>Simulates a user pressing the mouse button (without releasing it yet) on |
| the specified element.</p> |
| |
| <p>'locator' is an element locator 'coordString' is specifies the x,y position |
| (i.e. - 10,20) of the mouse event relative to the element returned by |
| the locator.</p> |
| |
| |
| </div> |
| </div> |
| <div class="tags"> |
| |
| |
| </div><table class="source_code"> |
| <tr> |
| <td> |
| <pre class="lines"> |
| |
| |
| 405 |
| 406 |
| 407</pre> |
| </td> |
| <td> |
| <pre class="code"><span class="info file"># File 'rb/lib/selenium/client/legacy_driver.rb', line 405</span> |
| |
| <span class='kw'>def</span> <span class='id identifier rubyid_mouse_move_at'>mouse_move_at</span><span class='lparen'>(</span><span class='id identifier rubyid_locator'>locator</span><span class='comma'>,</span><span class='id identifier rubyid_coordString'>coordString</span><span class='rparen'>)</span> |
| <span class='id identifier rubyid_remote_control_command'>remote_control_command</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>mouseMoveAt</span><span class='tstring_end'>"</span></span><span class='comma'>,</span> <span class='lbracket'>[</span><span class='id identifier rubyid_locator'>locator</span><span class='comma'>,</span><span class='id identifier rubyid_coordString'>coordString</span><span class='comma'>,</span><span class='rbracket'>]</span><span class='rparen'>)</span> |
| <span class='kw'>end</span></pre> |
| </td> |
| </tr> |
| </table> |
| </div> |
| |
| <div class="method_details "> |
| <h3 class="signature " id="mouse_out-instance_method"> |
| |
| - (<tt>Object</tt>) <strong>mouse_out</strong>(locator) |
| |
| |
| |
| |
| |
| </h3><div class="docstring"> |
| <div class="discussion"> |
| |
| <p>Simulates a user moving the mouse pointer away from the specified element.</p> |
| |
| <p>'locator' is an element locator</p> |
| |
| |
| </div> |
| </div> |
| <div class="tags"> |
| |
| |
| </div><table class="source_code"> |
| <tr> |
| <td> |
| <pre class="lines"> |
| |
| |
| 310 |
| 311 |
| 312</pre> |
| </td> |
| <td> |
| <pre class="code"><span class="info file"># File 'rb/lib/selenium/client/legacy_driver.rb', line 310</span> |
| |
| <span class='kw'>def</span> <span class='id identifier rubyid_mouse_out'>mouse_out</span><span class='lparen'>(</span><span class='id identifier rubyid_locator'>locator</span><span class='rparen'>)</span> |
| <span class='id identifier rubyid_remote_control_command'>remote_control_command</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>mouseOut</span><span class='tstring_end'>"</span></span><span class='comma'>,</span> <span class='lbracket'>[</span><span class='id identifier rubyid_locator'>locator</span><span class='comma'>,</span><span class='rbracket'>]</span><span class='rparen'>)</span> |
| <span class='kw'>end</span></pre> |
| </td> |
| </tr> |
| </table> |
| </div> |
| |
| <div class="method_details "> |
| <h3 class="signature " id="mouse_over-instance_method"> |
| |
| - (<tt>Object</tt>) <strong>mouse_over</strong>(locator) |
| |
| |
| |
| |
| |
| </h3><div class="docstring"> |
| <div class="discussion"> |
| |
| <p>Simulates a user hovering a mouse over the specified element.</p> |
| |
| <p>'locator' is an element locator</p> |
| |
| |
| </div> |
| </div> |
| <div class="tags"> |
| |
| |
| </div><table class="source_code"> |
| <tr> |
| <td> |
| <pre class="lines"> |
| |
| |
| 302 |
| 303 |
| 304</pre> |
| </td> |
| <td> |
| <pre class="code"><span class="info file"># File 'rb/lib/selenium/client/legacy_driver.rb', line 302</span> |
| |
| <span class='kw'>def</span> <span class='id identifier rubyid_mouse_over'>mouse_over</span><span class='lparen'>(</span><span class='id identifier rubyid_locator'>locator</span><span class='rparen'>)</span> |
| <span class='id identifier rubyid_remote_control_command'>remote_control_command</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>mouseOver</span><span class='tstring_end'>"</span></span><span class='comma'>,</span> <span class='lbracket'>[</span><span class='id identifier rubyid_locator'>locator</span><span class='comma'>,</span><span class='rbracket'>]</span><span class='rparen'>)</span> |
| <span class='kw'>end</span></pre> |
| </td> |
| </tr> |
| </table> |
| </div> |
| |
| <div class="method_details "> |
| <h3 class="signature " id="mouse_up-instance_method"> |
| |
| - (<tt>Object</tt>) <strong>mouse_up</strong>(locator) |
| |
| |
| |
| |
| |
| </h3><div class="docstring"> |
| <div class="discussion"> |
| |
| <p>Simulates the event that occurs when the user releases the mouse button |
| (i.e., stops holding the button down) on the specified element.</p> |
| |
| <p>'locator' is an element locator</p> |
| |
| |
| </div> |
| </div> |
| <div class="tags"> |
| |
| |
| </div><table class="source_code"> |
| <tr> |
| <td> |
| <pre class="lines"> |
| |
| |
| 357 |
| 358 |
| 359</pre> |
| </td> |
| <td> |
| <pre class="code"><span class="info file"># File 'rb/lib/selenium/client/legacy_driver.rb', line 357</span> |
| |
| <span class='kw'>def</span> <span class='id identifier rubyid_mouse_up'>mouse_up</span><span class='lparen'>(</span><span class='id identifier rubyid_locator'>locator</span><span class='rparen'>)</span> |
| <span class='id identifier rubyid_remote_control_command'>remote_control_command</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>mouseUp</span><span class='tstring_end'>"</span></span><span class='comma'>,</span> <span class='lbracket'>[</span><span class='id identifier rubyid_locator'>locator</span><span class='comma'>,</span><span class='rbracket'>]</span><span class='rparen'>)</span> |
| <span class='kw'>end</span></pre> |
| </td> |
| </tr> |
| </table> |
| </div> |
| |
| <div class="method_details "> |
| <h3 class="signature " id="mouse_up_at-instance_method"> |
| |
| - (<tt>Object</tt>) <strong>mouse_up_at</strong>(locator, coordString) |
| |
| |
| |
| |
| |
| </h3><div class="docstring"> |
| <div class="discussion"> |
| |
| <p>Simulates the event that occurs when the user releases the mouse button |
| (i.e., stops holding the button down) at the specified location.</p> |
| |
| <p>'locator' is an element locator 'coordString' is specifies the x,y position |
| (i.e. - 10,20) of the mouse event relative to the element returned by |
| the locator.</p> |
| |
| |
| </div> |
| </div> |
| <div class="tags"> |
| |
| |
| </div><table class="source_code"> |
| <tr> |
| <td> |
| <pre class="lines"> |
| |
| |
| 376 |
| 377 |
| 378</pre> |
| </td> |
| <td> |
| <pre class="code"><span class="info file"># File 'rb/lib/selenium/client/legacy_driver.rb', line 376</span> |
| |
| <span class='kw'>def</span> <span class='id identifier rubyid_mouse_up_at'>mouse_up_at</span><span class='lparen'>(</span><span class='id identifier rubyid_locator'>locator</span><span class='comma'>,</span><span class='id identifier rubyid_coordString'>coordString</span><span class='rparen'>)</span> |
| <span class='id identifier rubyid_remote_control_command'>remote_control_command</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>mouseUpAt</span><span class='tstring_end'>"</span></span><span class='comma'>,</span> <span class='lbracket'>[</span><span class='id identifier rubyid_locator'>locator</span><span class='comma'>,</span><span class='id identifier rubyid_coordString'>coordString</span><span class='comma'>,</span><span class='rbracket'>]</span><span class='rparen'>)</span> |
| <span class='kw'>end</span></pre> |
| </td> |
| </tr> |
| </table> |
| </div> |
| |
| <div class="method_details "> |
| <h3 class="signature " id="mouse_up_right-instance_method"> |
| |
| - (<tt>Object</tt>) <strong>mouse_up_right</strong>(locator) |
| |
| |
| |
| |
| |
| </h3><div class="docstring"> |
| <div class="discussion"> |
| |
| <p>Simulates the event that occurs when the user releases the right mouse |
| button (i.e., stops holding the button down) on the specified element.</p> |
| |
| <p>'locator' is an element locator</p> |
| |
| |
| </div> |
| </div> |
| <div class="tags"> |
| |
| |
| </div><table class="source_code"> |
| <tr> |
| <td> |
| <pre class="lines"> |
| |
| |
| 366 |
| 367 |
| 368</pre> |
| </td> |
| <td> |
| <pre class="code"><span class="info file"># File 'rb/lib/selenium/client/legacy_driver.rb', line 366</span> |
| |
| <span class='kw'>def</span> <span class='id identifier rubyid_mouse_up_right'>mouse_up_right</span><span class='lparen'>(</span><span class='id identifier rubyid_locator'>locator</span><span class='rparen'>)</span> |
| <span class='id identifier rubyid_remote_control_command'>remote_control_command</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>mouseUpRight</span><span class='tstring_end'>"</span></span><span class='comma'>,</span> <span class='lbracket'>[</span><span class='id identifier rubyid_locator'>locator</span><span class='comma'>,</span><span class='rbracket'>]</span><span class='rparen'>)</span> |
| <span class='kw'>end</span></pre> |
| </td> |
| </tr> |
| </table> |
| </div> |
| |
| <div class="method_details "> |
| <h3 class="signature " id="mouse_up_right_at-instance_method"> |
| |
| - (<tt>Object</tt>) <strong>mouse_up_right_at</strong>(locator, coordString) |
| |
| |
| |
| |
| |
| </h3><div class="docstring"> |
| <div class="discussion"> |
| |
| <p>Simulates the event that occurs when the user releases the right mouse |
| button (i.e., stops holding the button down) at the specified location.</p> |
| |
| <p>'locator' is an element locator 'coordString' is specifies the x,y position |
| (i.e. - 10,20) of the mouse event relative to the element returned by |
| the locator.</p> |
| |
| |
| </div> |
| </div> |
| <div class="tags"> |
| |
| |
| </div><table class="source_code"> |
| <tr> |
| <td> |
| <pre class="lines"> |
| |
| |
| 386 |
| 387 |
| 388</pre> |
| </td> |
| <td> |
| <pre class="code"><span class="info file"># File 'rb/lib/selenium/client/legacy_driver.rb', line 386</span> |
| |
| <span class='kw'>def</span> <span class='id identifier rubyid_mouse_up_right_at'>mouse_up_right_at</span><span class='lparen'>(</span><span class='id identifier rubyid_locator'>locator</span><span class='comma'>,</span><span class='id identifier rubyid_coordString'>coordString</span><span class='rparen'>)</span> |
| <span class='id identifier rubyid_remote_control_command'>remote_control_command</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>mouseUpRightAt</span><span class='tstring_end'>"</span></span><span class='comma'>,</span> <span class='lbracket'>[</span><span class='id identifier rubyid_locator'>locator</span><span class='comma'>,</span><span class='id identifier rubyid_coordString'>coordString</span><span class='comma'>,</span><span class='rbracket'>]</span><span class='rparen'>)</span> |
| <span class='kw'>end</span></pre> |
| </td> |
| </tr> |
| </table> |
| </div> |
| |
| <div class="method_details "> |
| <h3 class="signature " id="open-instance_method"> |
| |
| - (<tt>Object</tt>) <strong>open</strong>(url) |
| |
| |
| |
| |
| |
| </h3><div class="docstring"> |
| <div class="discussion"> |
| |
| <p>Opens an URL in the test frame. This accepts both relative and absolute |
| URLs.</p> |
| |
| <p>The "open" command waits for the page to load before proceeding, ie. the |
| "AndWait" suffix is implicit.</p> |
| |
| <p><em>Note</em>: The URL must be on the same domain as the runner HTML due to |
| security restrictions in the browser (Same Origin Policy). If you need to |
| open an URL on another domain, use the Selenium Server to start a new |
| browser session on that domain.</p> |
| |
| <p>'url' is the URL to open; may be relative or absolute</p> |
| |
| |
| </div> |
| </div> |
| <div class="tags"> |
| |
| |
| </div><table class="source_code"> |
| <tr> |
| <td> |
| <pre class="lines"> |
| |
| |
| 571 |
| 572 |
| 573</pre> |
| </td> |
| <td> |
| <pre class="code"><span class="info file"># File 'rb/lib/selenium/client/legacy_driver.rb', line 571</span> |
| |
| <span class='kw'>def</span> <span class='id identifier rubyid_open'>open</span><span class='lparen'>(</span><span class='id identifier rubyid_url'>url</span><span class='rparen'>)</span> |
| <span class='id identifier rubyid_remote_control_command'>remote_control_command</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>open</span><span class='tstring_end'>"</span></span><span class='comma'>,</span> <span class='lbracket'>[</span><span class='id identifier rubyid_url'>url</span><span class='comma'>,</span><span class='rbracket'>]</span><span class='rparen'>)</span> |
| <span class='kw'>end</span></pre> |
| </td> |
| </tr> |
| </table> |
| </div> |
| |
| <div class="method_details "> |
| <h3 class="signature " id="open_window-instance_method"> |
| |
| - (<tt>Object</tt>) <strong>open_window</strong>(url, windowID) |
| |
| |
| |
| |
| |
| </h3><div class="docstring"> |
| <div class="discussion"> |
| |
| <p>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.</p> |
| |
| <p>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").</p> |
| |
| <p>'url' is the URL to open, which can be blank 'windowID' is the JavaScript |
| window ID of the window to select</p> |
| |
| |
| </div> |
| </div> |
| <div class="tags"> |
| |
| |
| </div><table class="source_code"> |
| <tr> |
| <td> |
| <pre class="lines"> |
| |
| |
| 587 |
| 588 |
| 589</pre> |
| </td> |
| <td> |
| <pre class="code"><span class="info file"># File 'rb/lib/selenium/client/legacy_driver.rb', line 587</span> |
| |
| <span class='kw'>def</span> <span class='id identifier rubyid_open_window'>open_window</span><span class='lparen'>(</span><span class='id identifier rubyid_url'>url</span><span class='comma'>,</span><span class='id identifier rubyid_windowID'>windowID</span><span class='rparen'>)</span> |
| <span class='id identifier rubyid_remote_control_command'>remote_control_command</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>openWindow</span><span class='tstring_end'>"</span></span><span class='comma'>,</span> <span class='lbracket'>[</span><span class='id identifier rubyid_url'>url</span><span class='comma'>,</span><span class='id identifier rubyid_windowID'>windowID</span><span class='comma'>,</span><span class='rbracket'>]</span><span class='rparen'>)</span> |
| <span class='kw'>end</span></pre> |
| </td> |
| </tr> |
| </table> |
| </div> |
| |
| <div class="method_details "> |
| <h3 class="signature " id="refresh-instance_method"> |
| |
| - (<tt>Object</tt>) <strong>refresh</strong> |
| |
| |
| |
| |
| |
| </h3><div class="docstring"> |
| <div class="discussion"> |
| |
| <p>Simulates the user clicking the "Refresh" button on their browser.</p> |
| |
| |
| </div> |
| </div> |
| <div class="tags"> |
| |
| |
| </div><table class="source_code"> |
| <tr> |
| <td> |
| <pre class="lines"> |
| |
| |
| 789 |
| 790 |
| 791</pre> |
| </td> |
| <td> |
| <pre class="code"><span class="info file"># File 'rb/lib/selenium/client/legacy_driver.rb', line 789</span> |
| |
| <span class='kw'>def</span> <span class='id identifier rubyid_refresh'>refresh</span><span class='lparen'>(</span><span class='rparen'>)</span> |
| <span class='id identifier rubyid_remote_control_command'>remote_control_command</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>refresh</span><span class='tstring_end'>"</span></span><span class='comma'>,</span> <span class='lbracket'>[</span><span class='rbracket'>]</span><span class='rparen'>)</span> |
| <span class='kw'>end</span></pre> |
| </td> |
| </tr> |
| </table> |
| </div> |
| |
| <div class="method_details "> |
| <h3 class="signature " id="remove_all_selections-instance_method"> |
| |
| - (<tt>Object</tt>) <strong>remove_all_selections</strong>(locator) |
| |
| |
| |
| |
| |
| </h3><div class="docstring"> |
| <div class="discussion"> |
| |
| <p>Unselects all of the selected options in a multi-select element.</p> |
| |
| <p>'locator' is an element locator identifying a multi-select box</p> |
| |
| |
| </div> |
| </div> |
| <div class="tags"> |
| |
| |
| </div><table class="source_code"> |
| <tr> |
| <td> |
| <pre class="lines"> |
| |
| |
| 545 |
| 546 |
| 547</pre> |
| </td> |
| <td> |
| <pre class="code"><span class="info file"># File 'rb/lib/selenium/client/legacy_driver.rb', line 545</span> |
| |
| <span class='kw'>def</span> <span class='id identifier rubyid_remove_all_selections'>remove_all_selections</span><span class='lparen'>(</span><span class='id identifier rubyid_locator'>locator</span><span class='rparen'>)</span> |
| <span class='id identifier rubyid_remote_control_command'>remote_control_command</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>removeAllSelections</span><span class='tstring_end'>"</span></span><span class='comma'>,</span> <span class='lbracket'>[</span><span class='id identifier rubyid_locator'>locator</span><span class='comma'>,</span><span class='rbracket'>]</span><span class='rparen'>)</span> |
| <span class='kw'>end</span></pre> |
| </td> |
| </tr> |
| </table> |
| </div> |
| |
| <div class="method_details "> |
| <h3 class="signature " id="remove_script-instance_method"> |
| |
| - (<tt>Object</tt>) <strong>remove_script</strong>(scriptTagId) |
| |
| |
| |
| |
| |
| </h3><div class="docstring"> |
| <div class="discussion"> |
| |
| <p>Removes a script tag from the Selenium document identified by the given id. |
| Does nothing if the referenced tag doesn't exist.</p> |
| |
| <p>'scriptTagId' is the id of the script element to remove.</p> |
| |
| |
| </div> |
| </div> |
| <div class="tags"> |
| |
| |
| </div><table class="source_code"> |
| <tr> |
| <td> |
| <pre class="lines"> |
| |
| |
| 1605 |
| 1606 |
| 1607</pre> |
| </td> |
| <td> |
| <pre class="code"><span class="info file"># File 'rb/lib/selenium/client/legacy_driver.rb', line 1605</span> |
| |
| <span class='kw'>def</span> <span class='id identifier rubyid_remove_script'>remove_script</span><span class='lparen'>(</span><span class='id identifier rubyid_scriptTagId'>scriptTagId</span><span class='rparen'>)</span> |
| <span class='id identifier rubyid_remote_control_command'>remote_control_command</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>removeScript</span><span class='tstring_end'>"</span></span><span class='comma'>,</span> <span class='lbracket'>[</span><span class='id identifier rubyid_scriptTagId'>scriptTagId</span><span class='comma'>,</span><span class='rbracket'>]</span><span class='rparen'>)</span> |
| <span class='kw'>end</span></pre> |
| </td> |
| </tr> |
| </table> |
| </div> |
| |
| <div class="method_details "> |
| <h3 class="signature " id="remove_selection-instance_method"> |
| |
| - (<tt>Object</tt>) <strong>remove_selection</strong>(locator, optionLocator) |
| |
| |
| |
| |
| |
| </h3><div class="docstring"> |
| <div class="discussion"> |
| |
| <p>Remove a selection from the set of selected options in a multi-select |
| element using an option locator.</p> |
| |
| <p>'locator' is an element locator identifying a multi-select box |
| 'optionLocator' is an option locator (a label by default)</p> |
| |
| |
| </div> |
| </div> |
| <div class="tags"> |
| |
| |
| <p class="tag_title">See Also:</p> |
| <ul class="see"> |
| |
| <li>for details of option locators</li> |
| |
| </ul> |
| |
| </div><table class="source_code"> |
| <tr> |
| <td> |
| <pre class="lines"> |
| |
| |
| 537 |
| 538 |
| 539</pre> |
| </td> |
| <td> |
| <pre class="code"><span class="info file"># File 'rb/lib/selenium/client/legacy_driver.rb', line 537</span> |
| |
| <span class='kw'>def</span> <span class='id identifier rubyid_remove_selection'>remove_selection</span><span class='lparen'>(</span><span class='id identifier rubyid_locator'>locator</span><span class='comma'>,</span><span class='id identifier rubyid_optionLocator'>optionLocator</span><span class='rparen'>)</span> |
| <span class='id identifier rubyid_remote_control_command'>remote_control_command</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>removeSelection</span><span class='tstring_end'>"</span></span><span class='comma'>,</span> <span class='lbracket'>[</span><span class='id identifier rubyid_locator'>locator</span><span class='comma'>,</span><span class='id identifier rubyid_optionLocator'>optionLocator</span><span class='comma'>,</span><span class='rbracket'>]</span><span class='rparen'>)</span> |
| <span class='kw'>end</span></pre> |
| </td> |
| </tr> |
| </table> |
| </div> |
| |
| <div class="method_details "> |
| <h3 class="signature " id="retrieve_last_remote_control_logs-instance_method"> |
| |
| - (<tt>Object</tt>) <strong>retrieve_last_remote_control_logs</strong> |
| |
| |
| |
| |
| |
| </h3><div class="docstring"> |
| <div class="discussion"> |
| |
| <p>Retrieve the last messages logged on a specific remote control. Useful for |
| error reports, especially when running multiple remote controls in a |
| distributed environment. The maximum number of log messages that can be |
| retrieve is configured on remote control startup.</p> |
| |
| |
| </div> |
| </div> |
| <div class="tags"> |
| |
| |
| </div><table class="source_code"> |
| <tr> |
| <td> |
| <pre class="lines"> |
| |
| |
| 1677 |
| 1678 |
| 1679</pre> |
| </td> |
| <td> |
| <pre class="code"><span class="info file"># File 'rb/lib/selenium/client/legacy_driver.rb', line 1677</span> |
| |
| <span class='kw'>def</span> <span class='id identifier rubyid_retrieve_last_remote_control_logs'>retrieve_last_remote_control_logs</span><span class='lparen'>(</span><span class='rparen'>)</span> |
| <span class='kw'>return</span> <span class='id identifier rubyid_string_command'>string_command</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>retrieveLastRemoteControlLogs</span><span class='tstring_end'>"</span></span><span class='comma'>,</span> <span class='lbracket'>[</span><span class='rbracket'>]</span><span class='rparen'>)</span> |
| <span class='kw'>end</span></pre> |
| </td> |
| </tr> |
| </table> |
| </div> |
| |
| <div class="method_details "> |
| <h3 class="signature " id="rollup-instance_method"> |
| |
| - (<tt>Object</tt>) <strong>rollup</strong>(rollupName, kwargs) |
| |
| |
| |
| |
| |
| </h3><div class="docstring"> |
| <div class="discussion"> |
| |
| <p>Executes a command rollup, which is a series of commands with a unique |
| name, and optionally arguments that control the generation of the set of |
| commands. If any one of the rolled-up commands fails, the rollup is |
| considered to have failed. Rollups may also contain nested rollups.</p> |
| |
| <p>'rollupName' is the name of the rollup command 'kwargs' is keyword |
| arguments string that influences how the rollup expands |
| into commands</p> |
| |
| |
| </div> |
| </div> |
| <div class="tags"> |
| |
| |
| </div><table class="source_code"> |
| <tr> |
| <td> |
| <pre class="lines"> |
| |
| |
| 1577 |
| 1578 |
| 1579</pre> |
| </td> |
| <td> |
| <pre class="code"><span class="info file"># File 'rb/lib/selenium/client/legacy_driver.rb', line 1577</span> |
| |
| <span class='kw'>def</span> <span class='id identifier rubyid_rollup'>rollup</span><span class='lparen'>(</span><span class='id identifier rubyid_rollupName'>rollupName</span><span class='comma'>,</span><span class='id identifier rubyid_kwargs'>kwargs</span><span class='rparen'>)</span> |
| <span class='id identifier rubyid_remote_control_command'>remote_control_command</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>rollup</span><span class='tstring_end'>"</span></span><span class='comma'>,</span> <span class='lbracket'>[</span><span class='id identifier rubyid_rollupName'>rollupName</span><span class='comma'>,</span><span class='id identifier rubyid_kwargs'>kwargs</span><span class='comma'>,</span><span class='rbracket'>]</span><span class='rparen'>)</span> |
| <span class='kw'>end</span></pre> |
| </td> |
| </tr> |
| </table> |
| </div> |
| |
| <div class="method_details "> |
| <h3 class="signature " id="run_script-instance_method"> |
| |
| - (<tt>Object</tt>) <strong>run_script</strong>(script) |
| |
| |
| |
| |
| |
| </h3><div class="docstring"> |
| <div class="discussion"> |
| |
| <p>Creates a new "script" tag in the body of the current test window, and adds |
| the specified text into the body of the command. Scripts run in this way |
| can often be debugged more easily than scripts executed using Selenium's |
| "getEval" command. Beware that JS exceptions thrown in these script tags |
| aren't managed by Selenium, so you should probably wrap your script in |
| try/catch blocks if there is any chance that the script will throw an |
| exception.</p> |
| |
| <p>'script' is the JavaScript snippet to run</p> |
| |
| |
| </div> |
| </div> |
| <div class="tags"> |
| |
| |
| </div><table class="source_code"> |
| <tr> |
| <td> |
| <pre class="lines"> |
| |
| |
| 1526 |
| 1527 |
| 1528</pre> |
| </td> |
| <td> |
| <pre class="code"><span class="info file"># File 'rb/lib/selenium/client/legacy_driver.rb', line 1526</span> |
| |
| <span class='kw'>def</span> <span class='id identifier rubyid_run_script'>run_script</span><span class='lparen'>(</span><span class='id identifier rubyid_script'>script</span><span class='rparen'>)</span> |
| <span class='id identifier rubyid_remote_control_command'>remote_control_command</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>runScript</span><span class='tstring_end'>"</span></span><span class='comma'>,</span> <span class='lbracket'>[</span><span class='id identifier rubyid_script'>script</span><span class='comma'>,</span><span class='rbracket'>]</span><span class='rparen'>)</span> |
| <span class='kw'>end</span></pre> |
| </td> |
| </tr> |
| </table> |
| </div> |
| |
| <div class="method_details "> |
| <h3 class="signature " id="select-instance_method"> |
| |
| - (<tt>Object</tt>) <strong>select</strong>(selectLocator, optionLocator) |
| |
| |
| |
| |
| |
| </h3><div class="docstring"> |
| <div class="discussion"> |
| |
| <p>Select an option from a drop-down using an option locator.</p> |
| |
| <p>Option locators provide different ways of specifying options of an HTML |
| Select element (e.g. for selecting a specific option, or for asserting that |
| the selected option satisfies a specification). There are several forms of |
| Select Option Locator.</p> |
| <ul><li> |
| <p><b>label</b>=<em>labelPattern</em>:</p> |
| </li></ul> |
| |
| <p>matches options based on their labels, i.e. the visible text. (This is the |
| default.)</p> |
| <ul><li> |
| <p><a href="http://Oo">label=regexp:^</a>ther</p> |
| </li><li> |
| <p><b>value</b>=<em>valuePattern</em>:</p> |
| </li></ul> |
| |
| <p>matches options based on their values.</p> |
| <ul><li> |
| <p>value=other</p> |
| </li><li> |
| <p><b>id</b>=<em>id</em>:</p> |
| </li></ul> |
| |
| <p>matches options based on their ids.</p> |
| <ul><li> |
| <p>id=option1</p> |
| </li><li> |
| <p><b>index</b>=<em>index</em>:</p> |
| </li></ul> |
| |
| <p>matches an option based on its index (offset from zero).</p> |
| <ul><li> |
| <p>index=2</p> |
| </li></ul> |
| |
| <p>If no option locator prefix is provided, the default behaviour is to match |
| on <b>label</b>.</p> |
| |
| <p>'selectLocator' is an element locator identifying a drop-down menu |
| 'optionLocator' is an option locator (a label by default)</p> |
| |
| |
| </div> |
| </div> |
| <div class="tags"> |
| |
| |
| </div><table class="source_code"> |
| <tr> |
| <td> |
| <pre class="lines"> |
| |
| |
| 515 |
| 516 |
| 517</pre> |
| </td> |
| <td> |
| <pre class="code"><span class="info file"># File 'rb/lib/selenium/client/legacy_driver.rb', line 515</span> |
| |
| <span class='kw'>def</span> <span class='id identifier rubyid_select'>select</span><span class='lparen'>(</span><span class='id identifier rubyid_selectLocator'>selectLocator</span><span class='comma'>,</span><span class='id identifier rubyid_optionLocator'>optionLocator</span><span class='rparen'>)</span> |
| <span class='id identifier rubyid_remote_control_command'>remote_control_command</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>select</span><span class='tstring_end'>"</span></span><span class='comma'>,</span> <span class='lbracket'>[</span><span class='id identifier rubyid_selectLocator'>selectLocator</span><span class='comma'>,</span><span class='id identifier rubyid_optionLocator'>optionLocator</span><span class='comma'>,</span><span class='rbracket'>]</span><span class='rparen'>)</span> |
| <span class='kw'>end</span></pre> |
| </td> |
| </tr> |
| </table> |
| </div> |
| |
| <div class="method_details "> |
| <h3 class="signature " id="select_frame-instance_method"> |
| |
| - (<tt>Object</tt>) <strong>select_frame</strong>(locator) |
| |
| |
| |
| |
| |
| </h3><div class="docstring"> |
| <div class="discussion"> |
| |
| <p>Selects a frame within the current window. (You may invoke this command |
| multiple times to select nested frames.) To select the parent frame, use |
| "relative=parent" as a locator; to select the top frame, use |
| "relative=top". You can also select a frame by its 0-based index number; |
| select the first frame with "index=0", or the third frame with "index=2".</p> |
| |
| <p>You may also use a DOM expression to identify the frame you want directly, |
| like this: <tt>dom=frames["main"].frames["subframe"]</tt></p> |
| |
| <p>'locator' is an element locator identifying a frame or iframe</p> |
| |
| |
| </div> |
| </div> |
| <div class="tags"> |
| |
| |
| </div><table class="source_code"> |
| <tr> |
| <td> |
| <pre class="lines"> |
| |
| |
| 682 |
| 683 |
| 684</pre> |
| </td> |
| <td> |
| <pre class="code"><span class="info file"># File 'rb/lib/selenium/client/legacy_driver.rb', line 682</span> |
| |
| <span class='kw'>def</span> <span class='id identifier rubyid_select_frame'>select_frame</span><span class='lparen'>(</span><span class='id identifier rubyid_locator'>locator</span><span class='rparen'>)</span> |
| <span class='id identifier rubyid_remote_control_command'>remote_control_command</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>selectFrame</span><span class='tstring_end'>"</span></span><span class='comma'>,</span> <span class='lbracket'>[</span><span class='id identifier rubyid_locator'>locator</span><span class='comma'>,</span><span class='rbracket'>]</span><span class='rparen'>)</span> |
| <span class='kw'>end</span></pre> |
| </td> |
| </tr> |
| </table> |
| </div> |
| |
| <div class="method_details "> |
| <h3 class="signature " id="select_pop_up-instance_method"> |
| |
| - (<tt>Object</tt>) <strong>select_pop_up</strong>(windowID) |
| |
| |
| |
| |
| |
| </h3><div class="docstring"> |
| <div class="discussion"> |
| |
| <p>Simplifies the process of selecting a popup window (and does not offer |
| functionality beyond what <tt>selectWindow()</tt> already provides).</p> |
| <ul><li> |
| <p>If <tt>windowID</tt> is either not specified, or specified as</p> |
| </li></ul> |
| |
| <p>"null", the first non-top window is selected. The top window is the one |
| that would be selected by <tt>selectWindow()</tt> without providing a |
| <tt>windowID</tt> . This should not be used when more than one popup window |
| is in play.</p> |
| <ul><li> |
| <p>Otherwise, the window will be looked up considering</p> |
| </li></ul> |
| |
| <p><tt>windowID</tt> as the following in order: 1) the "name" of the window, |
| as specified to <tt>window.open()</tt>; 2) a javascript variable which is a |
| reference to a window; and 3) the title of the window. This is the same |
| ordered lookup performed by <tt>selectWindow</tt> .</p> |
| |
| <p>'windowID' is an identifier for the popup window, which can take on a |
| number of different meanings</p> |
| |
| |
| </div> |
| </div> |
| <div class="tags"> |
| |
| |
| </div><table class="source_code"> |
| <tr> |
| <td> |
| <pre class="lines"> |
| |
| |
| 657 |
| 658 |
| 659</pre> |
| </td> |
| <td> |
| <pre class="code"><span class="info file"># File 'rb/lib/selenium/client/legacy_driver.rb', line 657</span> |
| |
| <span class='kw'>def</span> <span class='id identifier rubyid_select_pop_up'>select_pop_up</span><span class='lparen'>(</span><span class='id identifier rubyid_windowID'>windowID</span><span class='rparen'>)</span> |
| <span class='id identifier rubyid_remote_control_command'>remote_control_command</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>selectPopUp</span><span class='tstring_end'>"</span></span><span class='comma'>,</span> <span class='lbracket'>[</span><span class='id identifier rubyid_windowID'>windowID</span><span class='comma'>,</span><span class='rbracket'>]</span><span class='rparen'>)</span> |
| <span class='kw'>end</span></pre> |
| </td> |
| </tr> |
| </table> |
| </div> |
| |
| <div class="method_details "> |
| <h3 class="signature " id="select_window-instance_method"> |
| |
| - (<tt>Object</tt>) <strong>select_window</strong>(windowID) |
| |
| |
| |
| |
| |
| </h3><div class="docstring"> |
| <div class="discussion"> |
| |
| <p>Selects a popup window using a window locator; once a popup window has been |
| selected, all commands go to that window. To select the main window again, |
| use null as the target.</p> |
| |
| <p>Window locators provide different ways of specifying the window object: by |
| title, by internal JavaScript "name," or by JavaScript variable.</p> |
| <ul><li> |
| <p><b>title</b>=<em>My Special Window</em>:</p> |
| </li></ul> |
| |
| <p>Finds the window using the text that appears in the title bar. Be careful; |
| two windows can share the same title. If that happens, this locator will |
| just pick one.</p> |
| <ul><li> |
| <p><b>name</b>=<em>myWindow</em>:</p> |
| </li></ul> |
| |
| <p>Finds the window using its internal JavaScript "name" property. This is |
| the second parameter "windowName" passed to the JavaScript method |
| window.open(url, windowName, windowFeatures, replaceFlag) (which Selenium |
| intercepts).</p> |
| <ul><li> |
| <p><b>var</b>=<em>variableName</em>:</p> |
| </li></ul> |
| |
| <p>Some pop-up windows are unnamed (anonymous), but are associated with a |
| JavaScript variable name in the current application window, e.g. |
| "window.foo = window.open(url);". In those cases, you can open the window |
| using "var=foo".</p> |
| |
| <p>If no window locator prefix is provided, we'll try to guess what you mean |
| like this: 1.) if windowID is null, (or the string "null") then it is |
| assumed the user is referring to the original window instantiated by the |
| browser). 2.) if the value of the "windowID" parameter is a JavaScript |
| variable name in the current application window, then it is assumed that |
| this variable contains the return value from a call to the JavaScript |
| window.open() method. 3.) Otherwise, selenium looks in a hash it maintains |
| that maps string names to window "names". 4.) If <em>that</em> fails, we'll |
| try looping over all of the known windows to try to find the appropriate |
| "title". Since "title" is not necessarily unique, this may have unexpected |
| behavior. If you're having trouble figuring out the name of a window that |
| you want to manipulate, look at the Selenium log messages which identify |
| the names of windows created via window.open (and therefore intercepted by |
| Selenium). You will see messages like the following for each window as it |
| is opened: <tt>debug: window.open call intercepted; window ID (which you |
| can use with selectWindow()) is "myNewWindow"</tt> 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). (This is bug |
| SEL-339.) 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").</p> |
| |
| <p>'windowID' is the JavaScript window ID of the window to select</p> |
| |
| |
| </div> |
| </div> |
| <div class="tags"> |
| |
| |
| </div><table class="source_code"> |
| <tr> |
| <td> |
| <pre class="lines"> |
| |
| |
| 635 |
| 636 |
| 637</pre> |
| </td> |
| <td> |
| <pre class="code"><span class="info file"># File 'rb/lib/selenium/client/legacy_driver.rb', line 635</span> |
| |
| <span class='kw'>def</span> <span class='id identifier rubyid_select_window'>select_window</span><span class='lparen'>(</span><span class='id identifier rubyid_windowID'>windowID</span><span class='rparen'>)</span> |
| <span class='id identifier rubyid_remote_control_command'>remote_control_command</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>selectWindow</span><span class='tstring_end'>"</span></span><span class='comma'>,</span> <span class='lbracket'>[</span><span class='id identifier rubyid_windowID'>windowID</span><span class='comma'>,</span><span class='rbracket'>]</span><span class='rparen'>)</span> |
| <span class='kw'>end</span></pre> |
| </td> |
| </tr> |
| </table> |
| </div> |
| |
| <div class="method_details "> |
| <h3 class="signature " id="set_browser_log_level-instance_method"> |
| |
| - (<tt>Object</tt>) <strong>set_browser_log_level</strong>(logLevel) |
| |
| |
| |
| |
| |
| </h3><div class="docstring"> |
| <div class="discussion"> |
| |
| <p>Sets the threshold for browser-side logging messages; log messages beneath |
| this threshold will be discarded. Valid logLevel strings are: "debug", |
| "info", "warn", "error" or "off". To see the browser logs, you need to |
| either show the log window in GUI mode, or enable browser-side logging in |
| Selenium RC.</p> |
| |
| <p>'logLevel' is one of the following: "debug", "info", "warn", "error" or |
| "off"</p> |
| |
| |
| </div> |
| </div> |
| <div class="tags"> |
| |
| |
| </div><table class="source_code"> |
| <tr> |
| <td> |
| <pre class="lines"> |
| |
| |
| 1512 |
| 1513 |
| 1514</pre> |
| </td> |
| <td> |
| <pre class="code"><span class="info file"># File 'rb/lib/selenium/client/legacy_driver.rb', line 1512</span> |
| |
| <span class='kw'>def</span> <span class='id identifier rubyid_set_browser_log_level'>set_browser_log_level</span><span class='lparen'>(</span><span class='id identifier rubyid_logLevel'>logLevel</span><span class='rparen'>)</span> |
| <span class='id identifier rubyid_remote_control_command'>remote_control_command</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>setBrowserLogLevel</span><span class='tstring_end'>"</span></span><span class='comma'>,</span> <span class='lbracket'>[</span><span class='id identifier rubyid_logLevel'>logLevel</span><span class='comma'>,</span><span class='rbracket'>]</span><span class='rparen'>)</span> |
| <span class='kw'>end</span></pre> |
| </td> |
| </tr> |
| </table> |
| </div> |
| |
| <div class="method_details "> |
| <h3 class="signature " id="set_context-instance_method"> |
| |
| - (<tt>Object</tt>) <strong>set_context</strong>(context) |
| |
| |
| |
| |
| |
| </h3><div class="docstring"> |
| <div class="discussion"> |
| |
| <p>Writes a message to the status bar and adds a note to the browser-side log.</p> |
| |
| <p>'context' is the message to be sent to the browser</p> |
| |
| |
| </div> |
| </div> |
| <div class="tags"> |
| |
| |
| </div><table class="source_code"> |
| <tr> |
| <td> |
| <pre class="lines"> |
| |
| |
| 1622 |
| 1623 |
| 1624</pre> |
| </td> |
| <td> |
| <pre class="code"><span class="info file"># File 'rb/lib/selenium/client/legacy_driver.rb', line 1622</span> |
| |
| <span class='kw'>def</span> <span class='id identifier rubyid_set_context'>set_context</span><span class='lparen'>(</span><span class='id identifier rubyid_context'>context</span><span class='rparen'>)</span> |
| <span class='id identifier rubyid_remote_control_command'>remote_control_command</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>setContext</span><span class='tstring_end'>"</span></span><span class='comma'>,</span> <span class='lbracket'>[</span><span class='id identifier rubyid_context'>context</span><span class='comma'>,</span><span class='rbracket'>]</span><span class='rparen'>)</span> |
| <span class='kw'>end</span></pre> |
| </td> |
| </tr> |
| </table> |
| </div> |
| |
| <div class="method_details "> |
| <h3 class="signature " id="set_cursor_position-instance_method"> |
| |
| - (<tt>Object</tt>) <strong>set_cursor_position</strong>(locator, position) |
| |
| |
| |
| |
| |
| </h3><div class="docstring"> |
| <div class="discussion"> |
| |
| <p>Moves the text cursor to the specified position in the given input element |
| or textarea. This method will fail if the specified element isn't an input |
| element or textarea.</p> |
| |
| <p>'locator' is an element locator pointing to an input element or textarea |
| 'position' is the numerical position of the cursor in the field; position |
| should be 0 to move the position to the beginning of the field. You can |
| also set the cursor to -1 to move it to the end of the field.</p> |
| |
| |
| </div> |
| </div> |
| <div class="tags"> |
| |
| |
| </div><table class="source_code"> |
| <tr> |
| <td> |
| <pre class="lines"> |
| |
| |
| 1247 |
| 1248 |
| 1249</pre> |
| </td> |
| <td> |
| <pre class="code"><span class="info file"># File 'rb/lib/selenium/client/legacy_driver.rb', line 1247</span> |
| |
| <span class='kw'>def</span> <span class='id identifier rubyid_set_cursor_position'>set_cursor_position</span><span class='lparen'>(</span><span class='id identifier rubyid_locator'>locator</span><span class='comma'>,</span><span class='id identifier rubyid_position'>position</span><span class='rparen'>)</span> |
| <span class='id identifier rubyid_remote_control_command'>remote_control_command</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>setCursorPosition</span><span class='tstring_end'>"</span></span><span class='comma'>,</span> <span class='lbracket'>[</span><span class='id identifier rubyid_locator'>locator</span><span class='comma'>,</span><span class='id identifier rubyid_position'>position</span><span class='comma'>,</span><span class='rbracket'>]</span><span class='rparen'>)</span> |
| <span class='kw'>end</span></pre> |
| </td> |
| </tr> |
| </table> |
| </div> |
| |
| <div class="method_details "> |
| <h3 class="signature " id="set_mouse_speed-instance_method"> |
| |
| - (<tt>Object</tt>) <strong>set_mouse_speed</strong>(pixels) |
| |
| |
| |
| |
| |
| </h3><div class="docstring"> |
| <div class="discussion"> |
| |
| <p>Configure the number of pixels between "mousemove" events during |
| dragAndDrop commands (default=10). Setting this value to 0 means that we'll |
| send a "mousemove" event to every single pixel in between the start |
| location and the end location; that can be very slow, and may cause some |
| browsers to force the JavaScript to timeout. If the mouse speed is greater |
| than the distance between the two dragged objects, we'll just send one |
| "mousemove" at the start location and then one final one at the end |
| location.</p> |
| |
| <p>'pixels' is the number of pixels between "mousemove" events</p> |
| |
| |
| </div> |
| </div> |
| <div class="tags"> |
| |
| |
| </div><table class="source_code"> |
| <tr> |
| <td> |
| <pre class="lines"> |
| |
| |
| 1169 |
| 1170 |
| 1171</pre> |
| </td> |
| <td> |
| <pre class="code"><span class="info file"># File 'rb/lib/selenium/client/legacy_driver.rb', line 1169</span> |
| |
| <span class='kw'>def</span> <span class='id identifier rubyid_set_mouse_speed'>set_mouse_speed</span><span class='lparen'>(</span><span class='id identifier rubyid_pixels'>pixels</span><span class='rparen'>)</span> |
| <span class='id identifier rubyid_remote_control_command'>remote_control_command</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>setMouseSpeed</span><span class='tstring_end'>"</span></span><span class='comma'>,</span> <span class='lbracket'>[</span><span class='id identifier rubyid_pixels'>pixels</span><span class='comma'>,</span><span class='rbracket'>]</span><span class='rparen'>)</span> |
| <span class='kw'>end</span></pre> |
| </td> |
| </tr> |
| </table> |
| </div> |
| |
| <div class="method_details "> |
| <h3 class="signature " id="set_speed-instance_method"> |
| |
| - (<tt>Object</tt>) <strong>set_speed</strong>(value) |
| |
| |
| |
| |
| |
| </h3><div class="docstring"> |
| <div class="discussion"> |
| |
| <p>Set execution speed (i.e., set the millisecond length of a delay which will |
| follow each selenium operation). By default, there is no such delay, i.e., |
| the delay is 0 milliseconds.</p> |
| |
| <p>'value' is the number of milliseconds to pause after operation</p> |
| |
| |
| </div> |
| </div> |
| <div class="tags"> |
| |
| |
| </div><table class="source_code"> |
| <tr> |
| <td> |
| <pre class="lines"> |
| |
| |
| 446 |
| 447 |
| 448</pre> |
| </td> |
| <td> |
| <pre class="code"><span class="info file"># File 'rb/lib/selenium/client/legacy_driver.rb', line 446</span> |
| |
| <span class='kw'>def</span> <span class='id identifier rubyid_set_speed'>set_speed</span><span class='lparen'>(</span><span class='id identifier rubyid_value'>value</span><span class='rparen'>)</span> |
| <span class='id identifier rubyid_remote_control_command'>remote_control_command</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>setSpeed</span><span class='tstring_end'>"</span></span><span class='comma'>,</span> <span class='lbracket'>[</span><span class='id identifier rubyid_value'>value</span><span class='comma'>,</span><span class='rbracket'>]</span><span class='rparen'>)</span> |
| <span class='kw'>end</span></pre> |
| </td> |
| </tr> |
| </table> |
| </div> |
| |
| <div class="method_details "> |
| <h3 class="signature " id="set_timeout-instance_method"> |
| |
| - (<tt>Object</tt>) <strong>set_timeout</strong>(timeout) |
| |
| |
| |
| |
| |
| </h3><div class="docstring"> |
| <div class="discussion"> |
| |
| <p>Specifies the amount of time that Selenium will wait for actions to |
| complete.</p> |
| |
| <p>Actions that require waiting include "open" and the "waitFor*" actions.</p> |
| |
| <p>The default timeout is 30 seconds.</p> |
| |
| <p>'timeout' is a timeout in milliseconds, after which the action will return |
| with an error</p> |
| |
| |
| </div> |
| </div> |
| <div class="tags"> |
| |
| |
| </div><table class="source_code"> |
| <tr> |
| <td> |
| <pre class="lines"> |
| |
| |
| 1410 |
| 1411 |
| 1412</pre> |
| </td> |
| <td> |
| <pre class="code"><span class="info file"># File 'rb/lib/selenium/client/legacy_driver.rb', line 1410</span> |
| |
| <span class='kw'>def</span> <span class='id identifier rubyid_set_timeout'>set_timeout</span><span class='lparen'>(</span><span class='id identifier rubyid_timeout'>timeout</span><span class='rparen'>)</span> |
| <span class='id identifier rubyid_remote_control_command'>remote_control_command</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>setTimeout</span><span class='tstring_end'>"</span></span><span class='comma'>,</span> <span class='lbracket'>[</span><span class='id identifier rubyid_timeout'>timeout</span><span class='comma'>,</span><span class='rbracket'>]</span><span class='rparen'>)</span> |
| <span class='kw'>end</span></pre> |
| </td> |
| </tr> |
| </table> |
| </div> |
| |
| <div class="method_details "> |
| <h3 class="signature " id="shift_key_down-instance_method"> |
| |
| - (<tt>Object</tt>) <strong>shift_key_down</strong> |
| |
| |
| |
| |
| |
| </h3><div class="docstring"> |
| <div class="discussion"> |
| |
| <p>Press the shift key and hold it down until doShiftUp() is called or a new |
| page is loaded.</p> |
| |
| |
| </div> |
| </div> |
| <div class="tags"> |
| |
| |
| </div><table class="source_code"> |
| <tr> |
| <td> |
| <pre class="lines"> |
| |
| |
| 227 |
| 228 |
| 229</pre> |
| </td> |
| <td> |
| <pre class="code"><span class="info file"># File 'rb/lib/selenium/client/legacy_driver.rb', line 227</span> |
| |
| <span class='kw'>def</span> <span class='id identifier rubyid_shift_key_down'>shift_key_down</span><span class='lparen'>(</span><span class='rparen'>)</span> |
| <span class='id identifier rubyid_remote_control_command'>remote_control_command</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>shiftKeyDown</span><span class='tstring_end'>"</span></span><span class='comma'>,</span> <span class='lbracket'>[</span><span class='rbracket'>]</span><span class='rparen'>)</span> |
| <span class='kw'>end</span></pre> |
| </td> |
| </tr> |
| </table> |
| </div> |
| |
| <div class="method_details "> |
| <h3 class="signature " id="shift_key_up-instance_method"> |
| |
| - (<tt>Object</tt>) <strong>shift_key_up</strong> |
| |
| |
| |
| |
| |
| </h3><div class="docstring"> |
| <div class="discussion"> |
| |
| <p>Release the shift key.</p> |
| |
| |
| </div> |
| </div> |
| <div class="tags"> |
| |
| |
| </div><table class="source_code"> |
| <tr> |
| <td> |
| <pre class="lines"> |
| |
| |
| 234 |
| 235 |
| 236</pre> |
| </td> |
| <td> |
| <pre class="code"><span class="info file"># File 'rb/lib/selenium/client/legacy_driver.rb', line 234</span> |
| |
| <span class='kw'>def</span> <span class='id identifier rubyid_shift_key_up'>shift_key_up</span><span class='lparen'>(</span><span class='rparen'>)</span> |
| <span class='id identifier rubyid_remote_control_command'>remote_control_command</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>shiftKeyUp</span><span class='tstring_end'>"</span></span><span class='comma'>,</span> <span class='lbracket'>[</span><span class='rbracket'>]</span><span class='rparen'>)</span> |
| <span class='kw'>end</span></pre> |
| </td> |
| </tr> |
| </table> |
| </div> |
| |
| <div class="method_details "> |
| <h3 class="signature " id="shut_down_selenium_server-instance_method"> |
| |
| - (<tt>Object</tt>) <strong>shut_down_selenium_server</strong> |
| |
| |
| |
| |
| |
| </h3><div class="docstring"> |
| <div class="discussion"> |
| |
| <p>Kills the running Selenium Server and all browser sessions. After you run |
| this command, you will no longer be able to send commands to the server; |
| you can't remotely start the server once it has been stopped. Normally you |
| should prefer to run the "stop" command, which terminates the current |
| browser session, rather than shutting down the entire server.</p> |
| |
| |
| </div> |
| </div> |
| <div class="tags"> |
| |
| |
| </div><table class="source_code"> |
| <tr> |
| <td> |
| <pre class="lines"> |
| |
| |
| 1668 |
| 1669 |
| 1670</pre> |
| </td> |
| <td> |
| <pre class="code"><span class="info file"># File 'rb/lib/selenium/client/legacy_driver.rb', line 1668</span> |
| |
| <span class='kw'>def</span> <span class='id identifier rubyid_shut_down_selenium_server'>shut_down_selenium_server</span><span class='lparen'>(</span><span class='rparen'>)</span> |
| <span class='id identifier rubyid_remote_control_command'>remote_control_command</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>shutDownSeleniumServer</span><span class='tstring_end'>"</span></span><span class='comma'>,</span> <span class='lbracket'>[</span><span class='rbracket'>]</span><span class='rparen'>)</span> |
| <span class='kw'>end</span></pre> |
| </td> |
| </tr> |
| </table> |
| </div> |
| |
| <div class="method_details "> |
| <h3 class="signature " id="submit-instance_method"> |
| |
| - (<tt>Object</tt>) <strong>submit</strong>(formLocator) |
| |
| |
| |
| |
| |
| </h3><div class="docstring"> |
| <div class="discussion"> |
| |
| <p>Submit the specified form. This is particularly useful for forms without |
| submit buttons, e.g. single-input "Search" forms.</p> |
| |
| <p>'formLocator' is an element locator for the form you want to submit</p> |
| |
| |
| </div> |
| </div> |
| <div class="tags"> |
| |
| |
| </div><table class="source_code"> |
| <tr> |
| <td> |
| <pre class="lines"> |
| |
| |
| 554 |
| 555 |
| 556</pre> |
| </td> |
| <td> |
| <pre class="code"><span class="info file"># File 'rb/lib/selenium/client/legacy_driver.rb', line 554</span> |
| |
| <span class='kw'>def</span> <span class='id identifier rubyid_submit'>submit</span><span class='lparen'>(</span><span class='id identifier rubyid_formLocator'>formLocator</span><span class='rparen'>)</span> |
| <span class='id identifier rubyid_remote_control_command'>remote_control_command</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>submit</span><span class='tstring_end'>"</span></span><span class='comma'>,</span> <span class='lbracket'>[</span><span class='id identifier rubyid_formLocator'>formLocator</span><span class='comma'>,</span><span class='rbracket'>]</span><span class='rparen'>)</span> |
| <span class='kw'>end</span></pre> |
| </td> |
| </tr> |
| </table> |
| </div> |
| |
| <div class="method_details "> |
| <h3 class="signature " id="type-instance_method"> |
| |
| - (<tt>Object</tt>) <strong>type</strong>(locator, value) |
| |
| |
| |
| |
| |
| </h3><div class="docstring"> |
| <div class="discussion"> |
| |
| <p>Sets the value of an input field, as though you typed it in.</p> |
| |
| <p>Can also be used to set the value of combo boxes, check boxes, etc. In |
| these cases, value should be the value of the option selected, not the |
| visible text.</p> |
| |
| <p>'locator' is an element locator 'value' is the value to type</p> |
| |
| |
| </div> |
| </div> |
| <div class="tags"> |
| |
| |
| </div><table class="source_code"> |
| <tr> |
| <td> |
| <pre class="lines"> |
| |
| |
| 418 |
| 419 |
| 420</pre> |
| </td> |
| <td> |
| <pre class="code"><span class="info file"># File 'rb/lib/selenium/client/legacy_driver.rb', line 418</span> |
| |
| <span class='kw'>def</span> <span class='id identifier rubyid_type'>type</span><span class='lparen'>(</span><span class='id identifier rubyid_locator'>locator</span><span class='comma'>,</span><span class='id identifier rubyid_value'>value</span><span class='rparen'>)</span> |
| <span class='id identifier rubyid_remote_control_command'>remote_control_command</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>type</span><span class='tstring_end'>"</span></span><span class='comma'>,</span> <span class='lbracket'>[</span><span class='id identifier rubyid_locator'>locator</span><span class='comma'>,</span><span class='id identifier rubyid_value'>value</span><span class='comma'>,</span><span class='rbracket'>]</span><span class='rparen'>)</span> |
| <span class='kw'>end</span></pre> |
| </td> |
| </tr> |
| </table> |
| </div> |
| |
| <div class="method_details "> |
| <h3 class="signature " id="type_keys-instance_method"> |
| |
| - (<tt>Object</tt>) <strong>type_keys</strong>(locator, value) |
| |
| |
| |
| |
| |
| </h3><div class="docstring"> |
| <div class="discussion"> |
| |
| <p>Simulates keystroke events on the specified element, as though you typed |
| the value key-by-key.</p> |
| |
| <p>This is a convenience method for calling keyDown, keyUp, keyPress for every |
| character in the specified string; this is useful for dynamic UI widgets |
| (like auto-completing combo boxes) that require explicit key events. Unlike |
| the simple "type" command, which forces the specified value into the page |
| directly, this command may or may not have any visible effect, even in |
| cases where typing keys would normally have a visible effect. For example, |
| if you use "typeKeys" on a form element, you may or may not see the results |
| of what you typed in the field. In some cases, you may need to use the |
| simple "type" command to set the value of the field and then the "typeKeys" |
| command to send the keystroke events corresponding to what you just typed.</p> |
| |
| <p>'locator' is an element locator 'value' is the value to type</p> |
| |
| |
| </div> |
| </div> |
| <div class="tags"> |
| |
| |
| </div><table class="source_code"> |
| <tr> |
| <td> |
| <pre class="lines"> |
| |
| |
| 437 |
| 438 |
| 439</pre> |
| </td> |
| <td> |
| <pre class="code"><span class="info file"># File 'rb/lib/selenium/client/legacy_driver.rb', line 437</span> |
| |
| <span class='kw'>def</span> <span class='id identifier rubyid_type_keys'>type_keys</span><span class='lparen'>(</span><span class='id identifier rubyid_locator'>locator</span><span class='comma'>,</span><span class='id identifier rubyid_value'>value</span><span class='rparen'>)</span> |
| <span class='id identifier rubyid_remote_control_command'>remote_control_command</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>typeKeys</span><span class='tstring_end'>"</span></span><span class='comma'>,</span> <span class='lbracket'>[</span><span class='id identifier rubyid_locator'>locator</span><span class='comma'>,</span><span class='id identifier rubyid_value'>value</span><span class='comma'>,</span><span class='rbracket'>]</span><span class='rparen'>)</span> |
| <span class='kw'>end</span></pre> |
| </td> |
| </tr> |
| </table> |
| </div> |
| |
| <div class="method_details "> |
| <h3 class="signature " id="uncheck-instance_method"> |
| |
| - (<tt>Object</tt>) <strong>uncheck</strong>(locator) |
| |
| |
| |
| |
| |
| </h3><div class="docstring"> |
| <div class="discussion"> |
| |
| <p>Uncheck a toggle-button (checkbox/radio)</p> |
| |
| <p>'locator' is an element locator</p> |
| |
| |
| </div> |
| </div> |
| <div class="tags"> |
| |
| |
| </div><table class="source_code"> |
| <tr> |
| <td> |
| <pre class="lines"> |
| |
| |
| 472 |
| 473 |
| 474</pre> |
| </td> |
| <td> |
| <pre class="code"><span class="info file"># File 'rb/lib/selenium/client/legacy_driver.rb', line 472</span> |
| |
| <span class='kw'>def</span> <span class='id identifier rubyid_uncheck'>uncheck</span><span class='lparen'>(</span><span class='id identifier rubyid_locator'>locator</span><span class='rparen'>)</span> |
| <span class='id identifier rubyid_remote_control_command'>remote_control_command</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>uncheck</span><span class='tstring_end'>"</span></span><span class='comma'>,</span> <span class='lbracket'>[</span><span class='id identifier rubyid_locator'>locator</span><span class='comma'>,</span><span class='rbracket'>]</span><span class='rparen'>)</span> |
| <span class='kw'>end</span></pre> |
| </td> |
| </tr> |
| </table> |
| </div> |
| |
| <div class="method_details "> |
| <h3 class="signature " id="use_xpath_library-instance_method"> |
| |
| - (<tt>Object</tt>) <strong>use_xpath_library</strong>(libraryName) |
| |
| |
| |
| |
| |
| </h3><div class="docstring"> |
| <div class="discussion"> |
| |
| <p>Allows choice of one of the available libraries.</p> |
| |
| <p>'libraryName' is name of the desired library Only the following three can |
| be chosen: * "ajaxslt" - Google's library* "javascript-xpath" - |
| Cybozu Labs' faster library* "default" - The default library. Currently |
| the default library is "ajaxslt" . If libraryName isn't one of these three, |
| then no change will be made.</p> |
| |
| |
| </div> |
| </div> |
| <div class="tags"> |
| |
| |
| </div><table class="source_code"> |
| <tr> |
| <td> |
| <pre class="lines"> |
| |
| |
| 1613 |
| 1614 |
| 1615</pre> |
| </td> |
| <td> |
| <pre class="code"><span class="info file"># File 'rb/lib/selenium/client/legacy_driver.rb', line 1613</span> |
| |
| <span class='kw'>def</span> <span class='id identifier rubyid_use_xpath_library'>use_xpath_library</span><span class='lparen'>(</span><span class='id identifier rubyid_libraryName'>libraryName</span><span class='rparen'>)</span> |
| <span class='id identifier rubyid_remote_control_command'>remote_control_command</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>useXpathLibrary</span><span class='tstring_end'>"</span></span><span class='comma'>,</span> <span class='lbracket'>[</span><span class='id identifier rubyid_libraryName'>libraryName</span><span class='comma'>,</span><span class='rbracket'>]</span><span class='rparen'>)</span> |
| <span class='kw'>end</span></pre> |
| </td> |
| </tr> |
| </table> |
| </div> |
| |
| <div class="method_details "> |
| <h3 class="signature " id="wait_for_condition-instance_method"> |
| |
| - (<tt>Object</tt>) <strong>wait_for_condition</strong>(script, timeout) |
| |
| |
| |
| |
| |
| </h3><div class="docstring"> |
| <div class="discussion"> |
| |
| <p>Runs the specified JavaScript snippet repeatedly until it evaluates to |
| "true". The snippet may have multiple lines, but only the result of the |
| last line will be considered.</p> |
| |
| <p>Note that, by default, the snippet will be run in the runner's test window, |
| not in the window of your application. To get the window of your |
| application, you can use the JavaScript snippet |
| <tt>selenium.browserbot.getCurrentWindow()</tt>, and then run your |
| JavaScript in there</p> |
| |
| <p>'script' is the JavaScript snippet to run 'timeout' is a timeout in |
| milliseconds, after which this command will return with an error</p> |
| |
| |
| </div> |
| </div> |
| <div class="tags"> |
| |
| |
| </div><table class="source_code"> |
| <tr> |
| <td> |
| <pre class="lines"> |
| |
| |
| 1398 |
| 1399 |
| 1400</pre> |
| </td> |
| <td> |
| <pre class="code"><span class="info file"># File 'rb/lib/selenium/client/legacy_driver.rb', line 1398</span> |
| |
| <span class='kw'>def</span> <span class='id identifier rubyid_wait_for_condition'>wait_for_condition</span><span class='lparen'>(</span><span class='id identifier rubyid_script'>script</span><span class='comma'>,</span><span class='id identifier rubyid_timeout'>timeout</span><span class='rparen'>)</span> |
| <span class='id identifier rubyid_remote_control_command'>remote_control_command</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>waitForCondition</span><span class='tstring_end'>"</span></span><span class='comma'>,</span> <span class='lbracket'>[</span><span class='id identifier rubyid_script'>script</span><span class='comma'>,</span><span class='id identifier rubyid_timeout'>timeout</span><span class='comma'>,</span><span class='rbracket'>]</span><span class='rparen'>)</span> |
| <span class='kw'>end</span></pre> |
| </td> |
| </tr> |
| </table> |
| </div> |
| |
| <div class="method_details "> |
| <h3 class="signature " id="wait_for_frame_to_load-instance_method"> |
| |
| - (<tt>Object</tt>) <strong>wait_for_frame_to_load</strong>(frameAddress, timeout) |
| |
| |
| |
| |
| |
| </h3><div class="docstring"> |
| <div class="discussion"> |
| |
| <p>Waits for a new frame to load.</p> |
| |
| <p>Selenium constantly keeps track of new pages and frames loading, and sets a |
| "newPageLoaded" flag when it first notices a page load.</p> |
| |
| <p>See waitForPageToLoad for more information.</p> |
| |
| <p>'frameAddress' is FrameAddress from the server side 'timeout' is a timeout |
| in milliseconds, after which this command will return with an error</p> |
| |
| |
| </div> |
| </div> |
| <div class="tags"> |
| |
| |
| </div><table class="source_code"> |
| <tr> |
| <td> |
| <pre class="lines"> |
| |
| |
| 1441 |
| 1442 |
| 1443</pre> |
| </td> |
| <td> |
| <pre class="code"><span class="info file"># File 'rb/lib/selenium/client/legacy_driver.rb', line 1441</span> |
| |
| <span class='kw'>def</span> <span class='id identifier rubyid_wait_for_frame_to_load'>wait_for_frame_to_load</span><span class='lparen'>(</span><span class='id identifier rubyid_frameAddress'>frameAddress</span><span class='comma'>,</span><span class='id identifier rubyid_timeout'>timeout</span><span class='rparen'>)</span> |
| <span class='id identifier rubyid_remote_control_command'>remote_control_command</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>waitForFrameToLoad</span><span class='tstring_end'>"</span></span><span class='comma'>,</span> <span class='lbracket'>[</span><span class='id identifier rubyid_frameAddress'>frameAddress</span><span class='comma'>,</span><span class='id identifier rubyid_timeout'>timeout</span><span class='comma'>,</span><span class='rbracket'>]</span><span class='rparen'>)</span> |
| <span class='kw'>end</span></pre> |
| </td> |
| </tr> |
| </table> |
| </div> |
| |
| <div class="method_details "> |
| <h3 class="signature " id="wait_for_page_to_load-instance_method"> |
| |
| - (<tt>Object</tt>) <strong>wait_for_page_to_load</strong>(timeout) |
| |
| |
| |
| |
| |
| </h3><div class="docstring"> |
| <div class="discussion"> |
| |
| <p>Waits for a new page to load.</p> |
| |
| <p>You can use this command instead of the "AndWait" suffixes, "clickAndWait", |
| "selectAndWait", "typeAndWait" etc. (which are only available in the JS |
| API). Selenium constantly keeps track of new pages loading, and sets a |
| "newPageLoaded" flag when it first notices a page load. Running any other |
| Selenium command after turns the flag to false. Hence, if you want to wait |
| for a page to load, you must wait immediately after a Selenium command that |
| caused a page-load.</p> |
| |
| <p>'timeout' is a timeout in milliseconds, after which this command will |
| return with an error</p> |
| |
| |
| </div> |
| </div> |
| <div class="tags"> |
| |
| |
| </div><table class="source_code"> |
| <tr> |
| <td> |
| <pre class="lines"> |
| |
| |
| 1426 |
| 1427 |
| 1428</pre> |
| </td> |
| <td> |
| <pre class="code"><span class="info file"># File 'rb/lib/selenium/client/legacy_driver.rb', line 1426</span> |
| |
| <span class='kw'>def</span> <span class='id identifier rubyid_wait_for_page_to_load'>wait_for_page_to_load</span><span class='lparen'>(</span><span class='id identifier rubyid_timeout'>timeout</span><span class='rparen'>)</span> |
| <span class='id identifier rubyid_remote_control_command'>remote_control_command</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>waitForPageToLoad</span><span class='tstring_end'>"</span></span><span class='comma'>,</span> <span class='lbracket'>[</span><span class='id identifier rubyid_timeout'>timeout</span><span class='comma'>,</span><span class='rbracket'>]</span><span class='rparen'>)</span> |
| <span class='kw'>end</span></pre> |
| </td> |
| </tr> |
| </table> |
| </div> |
| |
| <div class="method_details "> |
| <h3 class="signature " id="wait_for_pop_up-instance_method"> |
| |
| - (<tt>Object</tt>) <strong>wait_for_pop_up</strong>(windowID, timeout) |
| |
| |
| |
| |
| |
| </h3><div class="docstring"> |
| <div class="discussion"> |
| |
| <p>Waits for a popup window to appear and load up.</p> |
| |
| <p>'windowID' is the JavaScript window "name" of the window that will appear |
| (not the text of the title bar) If unspecified, or |
| specified as "null", this command will wait for the first |
| non-top window to appear (don't rely on this if you are |
| working with multiple popups simultaneously). 'timeout' is |
| a timeout in milliseconds, after which the action will return with an |
| error. If this value is not specified, the default Selenium |
| timeout will be used. See the setTimeout() command.</p> |
| |
| |
| </div> |
| </div> |
| <div class="tags"> |
| |
| |
| </div><table class="source_code"> |
| <tr> |
| <td> |
| <pre class="lines"> |
| |
| |
| 723 |
| 724 |
| 725</pre> |
| </td> |
| <td> |
| <pre class="code"><span class="info file"># File 'rb/lib/selenium/client/legacy_driver.rb', line 723</span> |
| |
| <span class='kw'>def</span> <span class='id identifier rubyid_wait_for_pop_up'>wait_for_pop_up</span><span class='lparen'>(</span><span class='id identifier rubyid_windowID'>windowID</span><span class='comma'>,</span><span class='id identifier rubyid_timeout'>timeout</span><span class='rparen'>)</span> |
| <span class='id identifier rubyid_remote_control_command'>remote_control_command</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>waitForPopUp</span><span class='tstring_end'>"</span></span><span class='comma'>,</span> <span class='lbracket'>[</span><span class='id identifier rubyid_windowID'>windowID</span><span class='comma'>,</span><span class='id identifier rubyid_timeout'>timeout</span><span class='comma'>,</span><span class='rbracket'>]</span><span class='rparen'>)</span> |
| <span class='kw'>end</span></pre> |
| </td> |
| </tr> |
| </table> |
| </div> |
| |
| <div class="method_details "> |
| <h3 class="signature " id="window_focus-instance_method"> |
| |
| - (<tt>Object</tt>) <strong>window_focus</strong> |
| |
| |
| |
| |
| |
| </h3><div class="docstring"> |
| <div class="discussion"> |
| |
| <p>Gives focus to the currently selected window</p> |
| |
| |
| </div> |
| </div> |
| <div class="tags"> |
| |
| |
| </div><table class="source_code"> |
| <tr> |
| <td> |
| <pre class="lines"> |
| |
| |
| 1201 |
| 1202 |
| 1203</pre> |
| </td> |
| <td> |
| <pre class="code"><span class="info file"># File 'rb/lib/selenium/client/legacy_driver.rb', line 1201</span> |
| |
| <span class='kw'>def</span> <span class='id identifier rubyid_window_focus'>window_focus</span><span class='lparen'>(</span><span class='rparen'>)</span> |
| <span class='id identifier rubyid_remote_control_command'>remote_control_command</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>windowFocus</span><span class='tstring_end'>"</span></span><span class='comma'>,</span> <span class='lbracket'>[</span><span class='rbracket'>]</span><span class='rparen'>)</span> |
| <span class='kw'>end</span></pre> |
| </td> |
| </tr> |
| </table> |
| </div> |
| |
| <div class="method_details "> |
| <h3 class="signature " id="window_maximize-instance_method"> |
| |
| - (<tt>Object</tt>) <strong>window_maximize</strong> |
| |
| |
| |
| |
| |
| </h3><div class="docstring"> |
| <div class="discussion"> |
| |
| <p>Resize currently selected window to take up the entire screen</p> |
| |
| |
| </div> |
| </div> |
| <div class="tags"> |
| |
| |
| </div><table class="source_code"> |
| <tr> |
| <td> |
| <pre class="lines"> |
| |
| |
| 1208 |
| 1209 |
| 1210</pre> |
| </td> |
| <td> |
| <pre class="code"><span class="info file"># File 'rb/lib/selenium/client/legacy_driver.rb', line 1208</span> |
| |
| <span class='kw'>def</span> <span class='id identifier rubyid_window_maximize'>window_maximize</span><span class='lparen'>(</span><span class='rparen'>)</span> |
| <span class='id identifier rubyid_remote_control_command'>remote_control_command</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>windowMaximize</span><span class='tstring_end'>"</span></span><span class='comma'>,</span> <span class='lbracket'>[</span><span class='rbracket'>]</span><span class='rparen'>)</span> |
| <span class='kw'>end</span></pre> |
| </td> |
| </tr> |
| </table> |
| </div> |
| |
| </div> |
| |
| </div> |
| |
| <div id="footer"> |
| Generated on Thu Jul 19 12:32:23 2012 by |
| <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a> |
| 0.8.1 (ruby-1.9.3). |
| </div> |
| |
| </body> |
| </html> |