| In: |
lib/selenium/generated_driver.rb
|
| Parent: | Object |
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.
We‘ll pass three arguments to your function:
The function must return null if the element can’t be found.
‘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: return inDocument.getElementById(locator);
# File lib/selenium/generated_driver.rb, line 1501 1501: def add_location_strategy(strategyName,functionDefinition) 1502: do_command("addLocationStrategy", [strategyName,functionDefinition,]) 1503: end
Add a selection to the set of selected options in a multi-select element using an option locator.
@see doSelect for details of option locators
‘locator’ is an element locator identifying a multi-select box ‘optionLocator’ is an option locator (a label by default)
# File lib/selenium/generated_driver.rb, line 519 519: def add_selection(locator,optionLocator) 520: do_command("addSelection", [locator,optionLocator,]) 521: end
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.
‘allow’ is boolean, true means we’ll prefer to use native XPath; false means we’ll only use JS XPath
# File lib/selenium/generated_driver.rb, line 1318 1318: def allow_native_xpath(allow) 1319: do_command("allowNativeXpath", [allow,]) 1320: end
Press the alt key and hold it down until doAltUp() is called or a new page is loaded.
# File lib/selenium/generated_driver.rb, line 248 248: def alt_key_down() 249: do_command("altKeyDown", []) 250: end
Release the alt key.
# File lib/selenium/generated_driver.rb, line 255 255: def alt_key_up() 256: do_command("altKeyUp", []) 257: end
Instructs Selenium to return the specified answer string in response to the next JavaScript prompt [window.prompt()].
‘answer’ is the answer to give in response to the prompt pop-up
# File lib/selenium/generated_driver.rb, line 737 737: def answer_on_next_prompt(answer) 738: do_command("answerOnNextPrompt", [answer,]) 739: end
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.
‘locator’ is an element locator pointing to an element ‘identifier’ is a string to be used as the ID of the specified element
# File lib/selenium/generated_driver.rb, line 1305 1305: def assign_id(locator,identifier) 1306: do_command("assignId", [locator,identifier,]) 1307: end
Sets a file input (upload) field to the file listed in fileLocator
‘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.
# File lib/selenium/generated_driver.rb, line 1534 1534: def attach_file(fieldLocator,fileLocator) 1535: do_command("attachFile", [fieldLocator,fileLocator,]) 1536: end
Saves the entire contents of the current window canvas to a PNG file. Currently this only works in Mozilla and when running in chrome mode. 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. Implementation mostly borrowed from the Screengrab! Firefox extension. Please see www.screengrab.org for details.
‘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.
| ‘kwargs’ is a kwargs string that modifies the way the screenshot is captured. Example: "background=CCFFDD" . Currently valid options: * background: | 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). |
# File lib/selenium/generated_driver.rb, line 1516 1516: def capture_entire_page_screenshot(filename,kwargs) 1517: do_command("captureEntirePageScreenshot", [filename,kwargs,]) 1518: end
Captures a PNG screenshot to the specified file.
‘filename’ is the absolute path to the file to be written, e.g. "c:\blah\screenshot.png"
# File lib/selenium/generated_driver.rb, line 1542 1542: def capture_screenshot(filename) 1543: do_command("captureScreenshot", [filename,]) 1544: end
Check a toggle-button (checkbox/radio)
‘locator’ is an element locator
# File lib/selenium/generated_driver.rb, line 457 457: def check(locator) 458: do_command("check", [locator,]) 459: end
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.
Take note - every time a confirmation comes up, you must consume it with a corresponding getConfirmation, or else the next selenium operation will fail.
# File lib/selenium/generated_driver.rb, line 706 706: def choose_cancel_on_next_confirmation() 707: do_command("chooseCancelOnNextConfirmation", []) 708: end
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.
Take note - every time a confirmation comes up, you must consume it with a corresponding getConfirmation, or else the next selenium operation will fail.
# File lib/selenium/generated_driver.rb, line 728 728: def choose_ok_on_next_confirmation() 729: do_command("chooseOkOnNextConfirmation", []) 730: end
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.
‘locator’ is an element locator
# File lib/selenium/generated_driver.rb, line 137 137: def click(locator) 138: do_command("click", [locator,]) 139: end
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.
‘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.
# File lib/selenium/generated_driver.rb, line 166 166: def click_at(locator,coordString) 167: do_command("clickAt", [locator,coordString,]) 168: end
Simulates the user clicking the "close" button in the titlebar of a popup window or tab.
# File lib/selenium/generated_driver.rb, line 759 759: def close() 760: do_command("close", []) 761: end
Simulates opening the context menu for the specified element (as might happen if the user "right-clicked" on the element).
‘locator’ is an element locator
# File lib/selenium/generated_driver.rb, line 155 155: def context_menu(locator) 156: do_command("contextMenu", [locator,]) 157: end
Simulates opening the context menu for the specified element (as might happen if the user "right-clicked" on the element).
‘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.
# File lib/selenium/generated_driver.rb, line 186 186: def context_menu_at(locator,coordString) 187: do_command("contextMenuAt", [locator,coordString,]) 188: end
Press the control key and hold it down until doControlUp() is called or a new page is loaded.
# File lib/selenium/generated_driver.rb, line 262 262: def control_key_down() 263: do_command("controlKeyDown", []) 264: end
Release the control key.
# File lib/selenium/generated_driver.rb, line 269 269: def control_key_up() 270: do_command("controlKeyUp", []) 271: end
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.
‘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.
# File lib/selenium/generated_driver.rb, line 1427 1427: def create_cookie(nameValuePair,optionsString) 1428: do_command("createCookie", [nameValuePair,optionsString,]) 1429: end
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.
# File lib/selenium/generated_driver.rb, line 1454 1454: def delete_all_visible_cookies() 1455: do_command("deleteAllVisibleCookies", []) 1456: end
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.
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.
‘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.
# File lib/selenium/generated_driver.rb, line 1445 1445: def delete_cookie(name,optionsString) 1446: do_command("deleteCookie", [name,optionsString,]) 1447: end
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.
‘locator’ is an element locator
# File lib/selenium/generated_driver.rb, line 147 147: def double_click(locator) 148: do_command("doubleClick", [locator,]) 149: end
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.
‘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.
# File lib/selenium/generated_driver.rb, line 177 177: def double_click_at(locator,coordString) 178: do_command("doubleClickAt", [locator,coordString,]) 179: end
Drags an element a certain distance and then drops it
‘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"
# File lib/selenium/generated_driver.rb, line 1147 1147: def drag_and_drop(locator,movementsString) 1148: do_command("dragAndDrop", [locator,movementsString,]) 1149: end
Drags an element and drops it on another element
‘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
# File lib/selenium/generated_driver.rb, line 1156 1156: def drag_and_drop_to_object(locatorOfObjectToBeDragged,locatorOfDragDestinationObject) 1157: do_command("dragAndDropToObject", [locatorOfObjectToBeDragged,locatorOfDragDestinationObject,]) 1158: end
deprecated - use dragAndDrop instead
‘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"
# File lib/selenium/generated_driver.rb, line 1117 1117: def dragdrop(locator,movementsString) 1118: do_command("dragdrop", [locator,movementsString,]) 1119: end
Explicitly simulate an event, to trigger the corresponding "onevent" handler.
‘locator’ is an element locator ‘eventName’ is the event name, e.g. "focus" or "blur"
# File lib/selenium/generated_driver.rb, line 196 196: def fire_event(locator,eventName) 197: do_command("fireEvent", [locator,eventName,]) 198: end
Move the focus to the specified element; for example, if the element is an input field, move the cursor to that field.
‘locator’ is an element locator
# File lib/selenium/generated_driver.rb, line 204 204: def focus(locator) 205: do_command("focus", [locator,]) 206: end
Retrieves the message of a JavaScript alert generated during the previous action, or fail if there were no alerts.
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.
# File lib/selenium/generated_driver.rb, line 812 812: def get_alert() 813: return get_string("getAlert", []) 814: end
Returns the IDs of all buttons on the page.
If a given button has no ID, it will appear as "" in this array.
# File lib/selenium/generated_driver.rb, line 1080 1080: def get_all_buttons() 1081: return get_string_array("getAllButtons", []) 1082: end
Returns the IDs of all input fields on the page.
If a given field has no ID, it will appear as "" in this array.
# File lib/selenium/generated_driver.rb, line 1100 1100: def get_all_fields() 1101: return get_string_array("getAllFields", []) 1102: end
Returns the IDs of all links on the page.
If a given link has no ID, it will appear as "" in this array.
# File lib/selenium/generated_driver.rb, line 1090 1090: def get_all_links() 1091: return get_string_array("getAllLinks", []) 1092: end
Returns the IDs of all windows that the browser knows about.
# File lib/selenium/generated_driver.rb, line 1177 1177: def get_all_window_ids() 1178: return get_string_array("getAllWindowIds", []) 1179: end
Returns the names of all windows that the browser knows about.
# File lib/selenium/generated_driver.rb, line 1184 1184: def get_all_window_names() 1185: return get_string_array("getAllWindowNames", []) 1186: end
Returns the titles of all windows that the browser knows about.
# File lib/selenium/generated_driver.rb, line 1191 1191: def get_all_window_titles() 1192: return get_string_array("getAllWindowTitles", []) 1193: end
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).
‘attributeLocator’ is an element locator followed by an @ sign and then the name of the attribute, e.g. "foo@bar"
# File lib/selenium/generated_driver.rb, line 1033 1033: def get_attribute(attributeLocator) 1034: return get_string("getAttribute", [attributeLocator,]) 1035: end
Returns every instance of some attribute from all known windows.
‘attributeName’ is name of an attribute on the windows
# File lib/selenium/generated_driver.rb, line 1108 1108: def get_attribute_from_all_windows(attributeName) 1109: return get_string_array("getAttributeFromAllWindows", [attributeName,]) 1110: end
Gets the entire text of the page.
# File lib/selenium/generated_driver.rb, line 880 880: def get_body_text() 881: return get_string("getBodyText", []) 882: end
Retrieves the message of a JavaScript confirmation dialog generated during the previous action.
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.
If an confirmation is generated but you do not consume it with getConfirmation, the next Selenium action will fail.
NOTE: under Selenium, JavaScript confirmations will NOT pop up a visible dialog.
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.
# File lib/selenium/generated_driver.rb, line 841 841: def get_confirmation() 842: return get_string("getConfirmation", []) 843: end
Return all cookies of the current page under test.
# File lib/selenium/generated_driver.rb, line 1401 1401: def get_cookie() 1402: return get_string("getCookie", []) 1403: end
Returns the value of the cookie with the specified name, or throws an error if the cookie is not present.
‘name’ is the name of the cookie
# File lib/selenium/generated_driver.rb, line 1409 1409: def get_cookie_by_name(name) 1410: return get_string("getCookieByName", [name,]) 1411: end
Retrieves the text cursor position in the given input element or textarea; beware, this may not work perfectly on all browsers.
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.
This method will fail if the specified element isn’t an input element or textarea, or there is no cursor in the element.
‘locator’ is an element locator pointing to an input element or textarea
# File lib/selenium/generated_driver.rb, line 1273 1273: def get_cursor_position(locator) 1274: return get_number("getCursorPosition", [locator,]) 1275: end
Retrieves the height of an element
‘locator’ is an element locator pointing to an element
# File lib/selenium/generated_driver.rb, line 1260 1260: def get_element_height(locator) 1261: return get_number("getElementHeight", [locator,]) 1262: end
Get the relative index of an element to its parent (starting from 0). The comment node and empty text node will be ignored.
‘locator’ is an element locator pointing to an element
# File lib/selenium/generated_driver.rb, line 1218 1218: def get_element_index(locator) 1219: return get_number("getElementIndex", [locator,]) 1220: end
Retrieves the horizontal position of an element
‘locator’ is an element locator pointing to an element OR an element itself
# File lib/selenium/generated_driver.rb, line 1236 1236: def get_element_position_left(locator) 1237: return get_number("getElementPositionLeft", [locator,]) 1238: end
Retrieves the vertical position of an element
‘locator’ is an element locator pointing to an element OR an element itself
# File lib/selenium/generated_driver.rb, line 1244 1244: def get_element_position_top(locator) 1245: return get_number("getElementPositionTop", [locator,]) 1246: end
Retrieves the width of an element
‘locator’ is an element locator pointing to an element
# File lib/selenium/generated_driver.rb, line 1252 1252: def get_element_width(locator) 1253: return get_number("getElementWidth", [locator,]) 1254: end
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.
Note that, by default, the snippet will run in the context of the "selenium" object itself, so this will refer to the Selenium object. Use window to refer to the window of your application, e.g. window.document.getElementById(‘foo’) If you need to use a locator to refer to a single element in your application page, you can use this.browserbot.findElement("id=foo") where "id=foo" is your locator.
‘script’ is the JavaScript snippet to run
# File lib/selenium/generated_driver.rb, line 926 926: def get_eval(script) 927: return get_string("getEval", [script,]) 928: end
Returns the specified expression.
This is useful because of JavaScript preprocessing. It is used to generate commands like assertExpression and waitForExpression.
‘expression’ is the value to return
# File lib/selenium/generated_driver.rb, line 1285 1285: def get_expression(expression) 1286: return get_string("getExpression", [expression,]) 1287: end
Returns the entire HTML source between the opening and closing "html" tags.
# File lib/selenium/generated_driver.rb, line 1199 1199: def get_html_source() 1200: return get_string("getHtmlSource", []) 1201: end
Gets the absolute URL of the current page.
# File lib/selenium/generated_driver.rb, line 866 866: def get_location() 867: return get_string("getLocation", []) 868: end
Returns the number of pixels between "mousemove" events during dragAndDrop commands (default=10).
# File lib/selenium/generated_driver.rb, line 1138 1138: def get_mouse_speed() 1139: return get_number("getMouseSpeed", []) 1140: end
Retrieves the message of a JavaScript question prompt dialog generated during the previous action.
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.
# File lib/selenium/generated_driver.rb, line 859 859: def get_prompt() 860: return get_string("getPrompt", []) 861: end
Gets all option labels in the specified select drop-down.
‘selectLocator’ is an element locator identifying a drop-down menu
# File lib/selenium/generated_driver.rb, line 1023 1023: def get_select_options(selectLocator) 1024: return get_string_array("getSelectOptions", [selectLocator,]) 1025: end
Gets option element ID for selected option in the specified select element.
‘selectLocator’ is an element locator identifying a drop-down menu
# File lib/selenium/generated_driver.rb, line 1007 1007: def get_selected_id(selectLocator) 1008: return get_string("getSelectedId", [selectLocator,]) 1009: end
Gets all option element IDs for selected options in the specified select or multi-select element.
‘selectLocator’ is an element locator identifying a drop-down menu
# File lib/selenium/generated_driver.rb, line 999 999: def get_selected_ids(selectLocator) 1000: return get_string_array("getSelectedIds", [selectLocator,]) 1001: end
Gets option index (option number, starting at 0) for selected option in the specified select element.
‘selectLocator’ is an element locator identifying a drop-down menu
# File lib/selenium/generated_driver.rb, line 991 991: def get_selected_index(selectLocator) 992: return get_string("getSelectedIndex", [selectLocator,]) 993: end
Gets all option indexes (option number, starting at 0) for selected options in the specified select or multi-select element.
‘selectLocator’ is an element locator identifying a drop-down menu
# File lib/selenium/generated_driver.rb, line 983 983: def get_selected_indexes(selectLocator) 984: return get_string_array("getSelectedIndexes", [selectLocator,]) 985: end
Gets option label (visible text) for selected option in the specified select element.
‘selectLocator’ is an element locator identifying a drop-down menu
# File lib/selenium/generated_driver.rb, line 959 959: def get_selected_label(selectLocator) 960: return get_string("getSelectedLabel", [selectLocator,]) 961: end
Gets all option labels (visible text) for selected options in the specified select or multi-select element.
‘selectLocator’ is an element locator identifying a drop-down menu
# File lib/selenium/generated_driver.rb, line 951 951: def get_selected_labels(selectLocator) 952: return get_string_array("getSelectedLabels", [selectLocator,]) 953: end
Gets option value (value attribute) for selected option in the specified select element.
‘selectLocator’ is an element locator identifying a drop-down menu
# File lib/selenium/generated_driver.rb, line 975 975: def get_selected_value(selectLocator) 976: return get_string("getSelectedValue", [selectLocator,]) 977: end
Gets all option values (value attributes) for selected options in the specified select or multi-select element.
‘selectLocator’ is an element locator identifying a drop-down menu
# File lib/selenium/generated_driver.rb, line 967 967: def get_selected_values(selectLocator) 968: return get_string_array("getSelectedValues", [selectLocator,]) 969: end
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.
See also setSpeed.
# File lib/selenium/generated_driver.rb, line 449 449: def get_speed() 450: return get_string("getSpeed", []) 451: end
Gets the text from a cell of a table. The cellAddress syntax tableLocator.row.column, where row and column start at 0.
‘tableCellAddress’ is a cell address, e.g. "foo.1.4"
# File lib/selenium/generated_driver.rb, line 943 943: def get_table(tableCellAddress) 944: return get_string("getTable", [tableCellAddress,]) 945: end
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.
‘locator’ is an element locator
# File lib/selenium/generated_driver.rb, line 901 901: def get_text(locator) 902: return get_string("getText", [locator,]) 903: end
Gets the title of the current page.
# File lib/selenium/generated_driver.rb, line 873 873: def get_title() 874: return get_string("getTitle", []) 875: end
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.
‘locator’ is an element locator
# File lib/selenium/generated_driver.rb, line 890 890: def get_value(locator) 891: return get_string("getValue", [locator,]) 892: end
Determine whether current/locator identify the frame containing this running code.
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.
‘currentFrameString’ is starting frame ‘target’ is new frame (which might be relative to the current one)
# File lib/selenium/generated_driver.rb, line 660 660: def get_whether_this_frame_match_frame_expression(currentFrameString,target) 661: return get_boolean("getWhetherThisFrameMatchFrameExpression", [currentFrameString,target,]) 662: end
Determine whether currentWindowString plus target identify the window containing this running code.
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.
‘currentWindowString’ is starting window ‘target’ is new window (which might be relative to the current one, e.g., "_parent")
# File lib/selenium/generated_driver.rb, line 676 676: def get_whether_this_window_match_window_expression(currentWindowString,target) 677: return get_boolean("getWhetherThisWindowMatchWindowExpression", [currentWindowString,target,]) 678: end
Returns the number of nodes that match the specified xpath, eg. "//table" would give the number of tables.
‘xpath’ is the xpath expression to evaluate. do NOT wrap this expression in a ‘count()’ function; we will do that for you.
# File lib/selenium/generated_driver.rb, line 1294 1294: def get_xpath_count(xpath) 1295: return get_number("getXpathCount", [xpath,]) 1296: end
Simulates the user clicking the "back" button on their browser.
# File lib/selenium/generated_driver.rb, line 744 744: def go_back() 745: do_command("goBack", []) 746: end
Briefly changes the backgroundColor of the specified element yellow. Useful for debugging.
‘locator’ is an element locator
# File lib/selenium/generated_driver.rb, line 909 909: def highlight(locator) 910: do_command("highlight", [locator,]) 911: end
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.
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").
‘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.
# File lib/selenium/generated_driver.rb, line 1334 1334: def ignore_attributes_without_value(ignore) 1335: do_command("ignoreAttributesWithoutValue", [ignore,]) 1336: end
Has an alert occurred?
This function never throws an exception
# File lib/selenium/generated_driver.rb, line 771 771: def is_alert_present() 772: return get_boolean("isAlertPresent", []) 773: end
Gets whether a toggle-button (checkbox/radio) is checked. Fails if the specified element doesn’t exist or isn’t a toggle-button.
‘locator’ is an element locator pointing to a checkbox or radio button
# File lib/selenium/generated_driver.rb, line 934 934: def is_checked(locator) 935: return get_boolean("isChecked", [locator,]) 936: end
Has confirm() been called?
This function never throws an exception
# File lib/selenium/generated_driver.rb, line 795 795: def is_confirmation_present() 796: return get_boolean("isConfirmationPresent", []) 797: end
Returns true if a cookie with the specified name is present, or false otherwise.
‘name’ is the name of the cookie
# File lib/selenium/generated_driver.rb, line 1417 1417: def is_cookie_present(name) 1418: return get_boolean("isCookiePresent", [name,]) 1419: end
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.
‘locator’ is an element locator
# File lib/selenium/generated_driver.rb, line 1070 1070: def is_editable(locator) 1071: return get_boolean("isEditable", [locator,]) 1072: end
Verifies that the specified element is somewhere on the page.
‘locator’ is an element locator
# File lib/selenium/generated_driver.rb, line 1049 1049: def is_element_present(locator) 1050: return get_boolean("isElementPresent", [locator,]) 1051: end
Check if these two elements have same parent and are ordered siblings in the DOM. Two same elements will not be considered ordered.
‘locator1’ is an element locator pointing to the first element ‘locator2’ is an element locator pointing to the second element
# File lib/selenium/generated_driver.rb, line 1228 1228: def is_ordered(locator1,locator2) 1229: return get_boolean("isOrdered", [locator1,locator2,]) 1230: end
Has a prompt occurred?
This function never throws an exception
# File lib/selenium/generated_driver.rb, line 783 783: def is_prompt_present() 784: return get_boolean("isPromptPresent", []) 785: end
Determines whether some option in a drop-down menu is selected.
‘selectLocator’ is an element locator identifying a drop-down menu
# File lib/selenium/generated_driver.rb, line 1015 1015: def is_something_selected(selectLocator) 1016: return get_boolean("isSomethingSelected", [selectLocator,]) 1017: end
Verifies that the specified text pattern appears somewhere on the rendered page shown to the user.
‘pattern’ is a pattern to match with the text of the page
# File lib/selenium/generated_driver.rb, line 1041 1041: def is_text_present(pattern) 1042: return get_boolean("isTextPresent", [pattern,]) 1043: end
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.
‘locator’ is an element locator
# File lib/selenium/generated_driver.rb, line 1061 1061: def is_visible(locator) 1062: return get_boolean("isVisible", [locator,]) 1063: end
Simulates a user pressing a key (without releasing it yet).
‘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".
# File lib/selenium/generated_driver.rb, line 278 278: def key_down(locator,keySequence) 279: do_command("keyDown", [locator,keySequence,]) 280: end
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.
‘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!
# File lib/selenium/generated_driver.rb, line 1564 1564: def key_down_native(keycode) 1565: do_command("keyDownNative", [keycode,]) 1566: end
Simulates a user pressing and releasing a key.
‘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".
# File lib/selenium/generated_driver.rb, line 213 213: def key_press(locator,keySequence) 214: do_command("keyPress", [locator,keySequence,]) 215: end
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.
‘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!
# File lib/selenium/generated_driver.rb, line 1588 1588: def key_press_native(keycode) 1589: do_command("keyPressNative", [keycode,]) 1590: end
Simulates a user releasing a key.
‘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".
# File lib/selenium/generated_driver.rb, line 287 287: def key_up(locator,keySequence) 288: do_command("keyUp", [locator,keySequence,]) 289: end
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.
‘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!
# File lib/selenium/generated_driver.rb, line 1576 1576: def key_up_native(keycode) 1577: do_command("keyUpNative", [keycode,]) 1578: end
Press the meta key and hold it down until doMetaUp() is called or a new page is loaded.
# File lib/selenium/generated_driver.rb, line 234 234: def meta_key_down() 235: do_command("metaKeyDown", []) 236: end
Release the meta key.
# File lib/selenium/generated_driver.rb, line 241 241: def meta_key_up() 242: do_command("metaKeyUp", []) 243: end
Simulates a user pressing the left mouse button (without releasing it yet) on the specified element.
‘locator’ is an element locator
# File lib/selenium/generated_driver.rb, line 312 312: def mouse_down(locator) 313: do_command("mouseDown", [locator,]) 314: end
Simulates a user pressing the left mouse button (without releasing it yet) at the specified location.
‘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.
# File lib/selenium/generated_driver.rb, line 331 331: def mouse_down_at(locator,coordString) 332: do_command("mouseDownAt", [locator,coordString,]) 333: end
Simulates a user pressing the right mouse button (without releasing it yet) on the specified element.
‘locator’ is an element locator
# File lib/selenium/generated_driver.rb, line 321 321: def mouse_down_right(locator) 322: do_command("mouseDownRight", [locator,]) 323: end
Simulates a user pressing the right mouse button (without releasing it yet) at the specified location.
‘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.
# File lib/selenium/generated_driver.rb, line 341 341: def mouse_down_right_at(locator,coordString) 342: do_command("mouseDownRightAt", [locator,coordString,]) 343: end
Simulates a user pressing the mouse button (without releasing it yet) on the specified element.
‘locator’ is an element locator
# File lib/selenium/generated_driver.rb, line 388 388: def mouse_move(locator) 389: do_command("mouseMove", [locator,]) 390: end
Simulates a user pressing the mouse button (without releasing it yet) on the specified element.
‘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.
# File lib/selenium/generated_driver.rb, line 398 398: def mouse_move_at(locator,coordString) 399: do_command("mouseMoveAt", [locator,coordString,]) 400: end
Simulates a user moving the mouse pointer away from the specified element.
‘locator’ is an element locator
# File lib/selenium/generated_driver.rb, line 303 303: def mouse_out(locator) 304: do_command("mouseOut", [locator,]) 305: end
Simulates a user hovering a mouse over the specified element.
‘locator’ is an element locator
# File lib/selenium/generated_driver.rb, line 295 295: def mouse_over(locator) 296: do_command("mouseOver", [locator,]) 297: end
Simulates the event that occurs when the user releases the mouse button (i.e., stops holding the button down) on the specified element.
‘locator’ is an element locator
# File lib/selenium/generated_driver.rb, line 350 350: def mouse_up(locator) 351: do_command("mouseUp", [locator,]) 352: end
Simulates the event that occurs when the user releases the mouse button (i.e., stops holding the button down) at the specified location.
‘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.
# File lib/selenium/generated_driver.rb, line 369 369: def mouse_up_at(locator,coordString) 370: do_command("mouseUpAt", [locator,coordString,]) 371: end
Simulates the event that occurs when the user releases the right mouse button (i.e., stops holding the button down) on the specified element.
‘locator’ is an element locator
# File lib/selenium/generated_driver.rb, line 359 359: def mouse_up_right(locator) 360: do_command("mouseUpRight", [locator,]) 361: end
Simulates the event that occurs when the user releases the right mouse button (i.e., stops holding the button down) at the specified location.
‘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.
# File lib/selenium/generated_driver.rb, line 379 379: def mouse_up_right_at(locator,coordString) 380: do_command("mouseUpRightAt", [locator,coordString,]) 381: end
Opens an URL in the test frame. This accepts both relative and absolute URLs.
The "open" command waits for the page to load before proceeding, ie. the "AndWait" suffix is implicit.
Note: 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.
‘url’ is the URL to open; may be relative or absolute
# File lib/selenium/generated_driver.rb, line 564 564: def open(url) 565: do_command("open", [url,]) 566: end
Opens a popup window (if a window with that ID isn’t already open). After opening the window, you’ll need to select it using the selectWindow command.
This command can also be a useful workaround for bug SEL-339. In some cases, Selenium will be unable to intercept a call to window.open (if the call occurs during or before the "onLoad" event, for example). In those cases, you can force Selenium to notice the open window’s name by using the Selenium openWindow command, using an empty (blank) url, like this: openWindow("", "myFunnyWindow").
‘url’ is the URL to open, which can be blank ‘windowID’ is the JavaScript window ID of the window to select
# File lib/selenium/generated_driver.rb, line 580 580: def open_window(url,windowID) 581: do_command("openWindow", [url,windowID,]) 582: end
Simulates the user clicking the "Refresh" button on their browser.
# File lib/selenium/generated_driver.rb, line 751 751: def refresh() 752: do_command("refresh", []) 753: end
Unselects all of the selected options in a multi-select element.
‘locator’ is an element locator identifying a multi-select box
# File lib/selenium/generated_driver.rb, line 538 538: def remove_all_selections(locator) 539: do_command("removeAllSelections", [locator,]) 540: end
Remove a selection from the set of selected options in a multi-select element using an option locator.
@see doSelect for details of option locators
‘locator’ is an element locator identifying a multi-select box ‘optionLocator’ is an option locator (a label by default)
# File lib/selenium/generated_driver.rb, line 530 530: def remove_selection(locator,optionLocator) 531: do_command("removeSelection", [locator,optionLocator,]) 532: end
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.
‘script’ is the JavaScript snippet to run
# File lib/selenium/generated_driver.rb, line 1479 1479: def run_script(script) 1480: do_command("runScript", [script,]) 1481: end
Select an option from a drop-down using an option locator.
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.
matches options based on their labels, i.e. the visible text. (This is the default.)
matches options based on their values.
matches options based on their ids.
matches an option based on its index (offset from zero).
If no option locator prefix is provided, the default behaviour is to match on label.
‘selectLocator’ is an element locator identifying a drop-down menu ‘optionLocator’ is an option locator (a label by default)
# File lib/selenium/generated_driver.rb, line 508 508: def select(selectLocator,optionLocator) 509: do_command("select", [selectLocator,optionLocator,]) 510: end
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".
You may also use a DOM expression to identify the frame you want directly, like this: dom=frames["main"].frames
‘locator’ is an element locator identifying a frame or iframe
# File lib/selenium/generated_driver.rb, line 644 644: def select_frame(locator) 645: do_command("selectFrame", [locator,]) 646: end
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.
Window locators provide different ways of specifying the window object: by title, by internal JavaScript "name," or by JavaScript variable.
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.
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).
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".
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 that 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: debug: window.open call intercepted; window ID (which you can use with selectWindow()) is "myNewWindow" 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").
‘windowID’ is the JavaScript window ID of the window to select
# File lib/selenium/generated_driver.rb, line 628 628: def select_window(windowID) 629: do_command("selectWindow", [windowID,]) 630: end
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.
‘logLevel’ is one of the following: "debug", "info", "warn", "error" or "off"
# File lib/selenium/generated_driver.rb, line 1465 1465: def set_browser_log_level(logLevel) 1466: do_command("setBrowserLogLevel", [logLevel,]) 1467: end
Writes a message to the status bar and adds a note to the browser-side log.
‘context’ is the message to be sent to the browser
# File lib/selenium/generated_driver.rb, line 1525 1525: def set_context(context) 1526: do_command("setContext", [context,]) 1527: end
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.
‘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.
# File lib/selenium/generated_driver.rb, line 1209 1209: def set_cursor_position(locator,position) 1210: do_command("setCursorPosition", [locator,position,]) 1211: end
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.
‘pixels’ is the number of pixels between "mousemove" events
# File lib/selenium/generated_driver.rb, line 1131 1131: def set_mouse_speed(pixels) 1132: do_command("setMouseSpeed", [pixels,]) 1133: end
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.
‘value’ is the number of milliseconds to pause after operation
# File lib/selenium/generated_driver.rb, line 439 439: def set_speed(value) 440: do_command("setSpeed", [value,]) 441: end
Specifies the amount of time that Selenium will wait for actions to complete.
Actions that require waiting include "open" and the "waitFor*" actions.
The default timeout is 30 seconds.
‘timeout’ is a timeout in milliseconds, after which the action will return with an error
# File lib/selenium/generated_driver.rb, line 1363 1363: def set_timeout(timeout) 1364: do_command("setTimeout", [timeout,]) 1365: end
Press the shift key and hold it down until doShiftUp() is called or a new page is loaded.
# File lib/selenium/generated_driver.rb, line 220 220: def shift_key_down() 221: do_command("shiftKeyDown", []) 222: end
Release the shift key.
# File lib/selenium/generated_driver.rb, line 227 227: def shift_key_up() 228: do_command("shiftKeyUp", []) 229: end
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.
# File lib/selenium/generated_driver.rb, line 1552 1552: def shut_down_selenium_server() 1553: do_command("shutDownSeleniumServer", []) 1554: end
Submit the specified form. This is particularly useful for forms without submit buttons, e.g. single-input "Search" forms.
‘formLocator’ is an element locator for the form you want to submit
# File lib/selenium/generated_driver.rb, line 547 547: def submit(formLocator) 548: do_command("submit", [formLocator,]) 549: end
Sets the value of an input field, as though you typed it in.
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.
‘locator’ is an element locator ‘value’ is the value to type
# File lib/selenium/generated_driver.rb, line 411 411: def type(locator,value) 412: do_command("type", [locator,value,]) 413: end
Simulates keystroke events on the specified element, as though you typed the value key-by-key.
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.
‘locator’ is an element locator ‘value’ is the value to type
# File lib/selenium/generated_driver.rb, line 430 430: def type_keys(locator,value) 431: do_command("typeKeys", [locator,value,]) 432: end
Uncheck a toggle-button (checkbox/radio)
‘locator’ is an element locator
# File lib/selenium/generated_driver.rb, line 465 465: def uncheck(locator) 466: do_command("uncheck", [locator,]) 467: end
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.
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 selenium.browserbot.getCurrentWindow(), and then run your JavaScript in there
‘script’ is the JavaScript snippet to run ‘timeout’ is a timeout in milliseconds, after which this command will return with an error
# File lib/selenium/generated_driver.rb, line 1351 1351: def wait_for_condition(script,timeout) 1352: do_command("waitForCondition", [script,timeout,]) 1353: end
Waits for a new frame to load.
Selenium constantly keeps track of new pages and frames loading, and sets a "newPageLoaded" flag when it first notices a page load.
See waitForPageToLoad for more information.
‘frameAddress’ is FrameAddress from the server side ‘timeout’ is a timeout in milliseconds, after which this command will return with an error
# File lib/selenium/generated_driver.rb, line 1394 1394: def wait_for_frame_to_load(frameAddress,timeout) 1395: do_command("waitForFrameToLoad", [frameAddress,timeout,]) 1396: end
Waits for a new page to load.
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.
‘timeout’ is a timeout in milliseconds, after which this command will return with an error
# File lib/selenium/generated_driver.rb, line 1379 1379: def wait_for_page_to_load(timeout) 1380: do_command("waitForPageToLoad", [timeout,]) 1381: end
Waits for a popup window to appear and load up.
‘windowID’ is the JavaScript window "name" of the window that will appear (not the text of the title bar) ‘timeout’ is a timeout in milliseconds, after which the action will return with an error
# File lib/selenium/generated_driver.rb, line 685 685: def wait_for_pop_up(windowID,timeout) 686: do_command("waitForPopUp", [windowID,timeout,]) 687: end
Gives focus to the currently selected window
# File lib/selenium/generated_driver.rb, line 1163 1163: def window_focus() 1164: do_command("windowFocus", []) 1165: end


A domain name is an identification string that defines a realm of administrative autonomy, authority or control within the Internet. Domain names are used in various networking contexts and for application-specific naming and addressing purposes. In general, a domain name identifies a network domain, or it represents an Internet Protocol (IP) resource, such as a personal computer used to access the Internet, a server computer hosting a website, or the web site itself or any other service communicated via the Internet. In 2017, 330.6 million domain names had been registered. Domain names are formed by the rules and procedures of the Domain Name System (DNS). Any name registered in the DNS is a domain name.
Domain names serve to identify Internet resources, such as computers, networks, and services, with a text-based label that is easier to memorize than the numerical addresses used in the Internet protocols. A domain name may represent entire collections of such resources or individual instances. Individual Internet host computers use domain names as host identifiers, also called hostnames. The term hostname is also used for the leaf labels in the domain name system, usually without further subordinate domain name space. Hostnames appear as a component in Uniform Resource Locators (URLs) for Internet resources such as websites (e.g., en.wikipedia.org). Domain names are also used as simple identification labels to indicate ownership or control of a resource. Such examples are the realm identifiers used in the Session Initiation Protocol (SIP), the Domain Keys used to verify DNS domains in e-mail systems, and in many other Uniform Resource Identifiers (URIs).
The Internet Corporation for Assigned Names and Numbers (ICANN /ˈaɪkæn/ EYE-kan) is an American multistakeholder group and nonprofit organization responsible for coordinating the maintenance and procedures of several databases related to the namespaces and numerical spaces of the Internet, ensuring the network's stable and secure operation. ICANN performs the actual technical maintenance work of the Central Internet Address pools and DNS root zone registries pursuant to the Internet Assigned Numbers Authority (IANA) function contract. The contract regarding the IANA stewardship functions between ICANN and the National Telecommunications and Information Administration (NTIA) of the United States Department of Commerce ended on October 1, 2016, formally transitioning the functions to the global multistakeholder community.


Knockout FastForEach Runner
All tests
There is
a jsBin that can help demo the performance differences.


We at Utopian.io would like to keep you well updated on our weekly progress in improving and developing Utopian.io for you. We’re happy to share all the latest Utopian news and updates.
In this update:
- The VIPO Program
- Translations Category Developments
- Utopian.io V2 Sneak Peek
- Utopian.io Innovation Trail updates, Community Activities and more…
The VIPO Program
Open Source Project owners have a hard time finding contributors to their projects, nor can they perform all the functions necessary for a project to become a success. Project Owners aren’t bug hunters, marketers or copywriters, nor should they be.
In an aim to make these FREE services provided by Utopian.io and its community of global talent easier to access, we’ve created the Very Important Project Owners Club. Members of the VIPO Club get exclusive access to a growing set of tools, services and professionals to aid their efforts on Utopian.io.
We received dozens of applications for membership in the VIPO and the number is growing. Seeing project owners engage with our Community Managers and with each other on Discord is a sign that this service is more than necessary in the Open Source ecosystem.
Translations Category Developments
The DaVinci collaboration
Utopian.io has collaborated with the DaVinci initiative on Steem to support the translation of Open Source projects. We have put up a new front-end specifically for this, which can be found at https://davinci.utopian.io. This last week, we also implemented the back-end features to support the site.
A lot of work went into creating quality questionnaires and defining the guidelines and policies for the translations workflow. In the last week, the Utopian.io core team worked closely with the DaVinci initiative to finalize the collaboration the framework in which this program will work.
Welcome @rosatravels and @jmromero!
We have a new community manager for the Translations category, @rosatravels, who is now working in liason with the DaVinci initiative. Together with @jmromero will be interacting with the Utopian.io community and ensuring smooth operations in the Translations category.
Utopian.io V2 Previews
Our team is working hard to bring the next iteration of Utopian.io to you. This week, we have some more sneak peeks into the new Utopian V2 front-end that’s currently being developed!
- Adding your project to Utopian.io
- Home page showcasing projects and recent contributions
- Showcasing popular projects
Community Activities and More
Open Source Radio Show
The Open Source Radio Show has been going smoothly and many valuable insights were shared over the last two weeks. Due to its success and a need for more interaction within it, we have decided to expand it to 2 hours, up from the original 1 hour timeframe.
To catch up with what’s happening, read the last pre-show announcement.
Utopian.io Edu Series: Development
The @utopian.edu account published yet another informative video tutorial and this time it’s about submitting high quality contributions in the Developments category.
View the video tutorial: Utopian.io Edu Tutorial Series: Submitting Excellent Development Contributions
Utopian.io Innovation Trail: Integrated IBM Watson
The Utopian.io developer team has been busy implementing and fine-tuning the IBM Watson AI code for the Utopian.io Innovation Trail. The trail is now smarter and more accurate at filtering potential posts.
In addition the max vote for @steemstem has been increased to a 30% relative vote!!
People of Utopian - imwatsi & knowledges
The last two weeks saw the release of two editions of our People of Utopian publication, featuring two of our own Community Managers.
People of Utopian #3: @imwatsi - a creative writer, passionate about content, Open Source, and the monetization of attention through cryptocurrencies
People of Utopian #4: @knowledges - a 24-year-old Computer Engineer in Nigeria, @curie community curator, and an autodidact with an endless thirst for knowledge in software, hardware and conceptual development of technological solutions
First Time Contributing in Utopian.io?
Learn how to contribute on our website
Utopian Witness
This page is synchronized from the post: Utopian.io Weekly - VIPO Program, Translations and More Improvements [June 15th 2018]


bookcover
In The Restaurant at the End of the Universe (published in 1980), Zaphod is separated from the others and finds he is part of a conspiracy to uncover who really runs the Universe. Zaphod meets Zarniwoop, a conspirator and editor for The Guide, who knows where to find the secret ruler. Zaphod becomes briefly reunited with the others for a trip to Milliways, the restaurant of the title. Zaphod and Ford decide to steal a ship from there, which turns out to be a stunt ship pre-programmed to plunge into a star as a special effect in a stage show.
bookcover
The first book was adapted from the first four radio episodes (the Primary Phase), with Arthur being rescued from Earth’s destruction by Ford, meeting Zaphod and Trillian, coming to the planet of Magrathea to discover the true purpose of Earth, and ending with the group preparing to go to the Restaurant at the End of the Universe. It was first published in 1979, initially in paperback, by Pan Books, after BBC Publishing had turned down the offer of publishing a novelization, an action they would later regret.


| Total net profit | -14.3 | Gross profit | 2.84 | Gross loss | -17.14 |
| Profit factor | 0.17 | Expected payoff | -0.65 | ||
| Absolute drawdown | -14.3 | Maximal drawdown (%) | 12.22 (-587.5%) | ||
| Total trades | 22 | Profit trades (% of total) | 6 (27.27%) | Loss trades (% of total) | 16 (72.73%) |
| Long positions (won %) | 17 (29.41%) | Short positions (won %) | 5 (20.0%) | ||
| Largest | profit trade | 1.52 | loss trade | -2.26 | |
| Average | profit trade | 0.47 | loss trade | -1.07 | |
| Minimum | profit trade | 0.01 | loss trade | -0.36 | |
| Maximum | take profit in pips | 655.7 | stop loss in pips | -295.0 | |
| Average | take profit in pips | 148.3 | stop loss in pips | -148.7 | |
| Minimum | take profit in pips | -57.8 | stop loss in pips | -80.6 | |
| Maximum | Reward-Risk | 2.5 | Duration in minutes | 126 | |
| Average | Reward-Risk | 1.0 | Duration in minutes | 11.1 | |
| Minimum | Reward-Risk | 0.0 | Duration in minutes | 0 | |
| Maximum | consecutive wins (profit in money) | 2.0 (1.8) | consecutive losses (loss in money) | 5.0 (-4.27) | |
| Average | consecutive wins | 1.0 | consecutive losses | 3.0 |
| Total net profit | -12.41 | Gross profit | 1.32 | Gross loss | -13.73 |
| Profit factor | 0.1 | Expected payoff | -0.73 | ||
| Absolute drawdown | -12.41 | Maximal drawdown (%) | 10.33 (-496.63%) | ||
| Total trades | 17 | Profit trades (% of total) | 5 (29.41%) | Loss trades (% of total) | 12 (70.59%) |
| Largest | profit trade | 0.65 | loss trade | -2.26 | |
| Average | profit trade | 0.26 | loss trade | -1.14 | |
| Minimum | profit trade | 0.01 | loss trade | -0.36 | |
| Maximum | take profit in pips | 655.7 | stop loss in pips | -295.0 | |
| Average | take profit in pips | 158.3 | stop loss in pips | -154.2 | |
| Minimum | take profit in pips | -57.8 | stop loss in pips | -80.6 | |
| Maximum | Reward-Risk | 2.5 | Duration in minutes | 126.0 | |
| Average | Reward-Risk | 1.0 | Duration in minutes | 13.2 | |
| Minimum | Reward-Risk | 0.0 | Duration in minutes | 0.0 | |
| Maximum | consecutive wins (profit in money) | 2.0 (0.25) | consecutive losses (loss in money) | 4.0 (-3.39) | |
| Average | consecutive wins | 1.0 | consecutive losses | 2.0 |
| Total net profit | -1.89 | Gross profit | 1.52 | Gross loss | -3.41 |
| Profit factor | 0.45 | Expected payoff | -0.38 | ||
| Absolute drawdown | -2.53 | Maximal drawdown (%) | 1.71 (-208.54%) | ||
| Total trades | 5 | Profit trades (% of total) | 1 (20.0%) | Loss trades (% of total) | 4 (80.0%) |
| Largest | profit trade | 1.52 | loss trade | -1.03 | |
| Average | profit trade | 1.52 | loss trade | -0.85 | |
| Minimum | profit trade | 1.52 | loss trade | -0.68 | |
| Maximum | take profit in pips | 230.4 | stop loss in pips | -206.5 | |
| Average | take profit in pips | 114.3 | stop loss in pips | -130.0 | |
| Minimum | take profit in pips | 21.1 | stop loss in pips | -89.4 | |
| Maximum | Reward-Risk | 2.1 | Duration in minutes | 16.0 | |
| Average | Reward-Risk | 0.9 | Duration in minutes | 4.0 | |
| Minimum | Reward-Risk | Duration in minutes | 0.0 | ||
| Maximum | consecutive wins (profit in money) | 1.0 (1.52) | consecutive losses (loss in money) | 3.0 (-2.53) | |
| Average | consecutive wins | 1.0 | consecutive losses | 3.0 |


There is
{{number}}
connected users.
with the id :
{{group}}group{{number}}
{{id}}
And there is {{group}} groups of 2 users.


NHS prototyping kit
This kit lets you rapidly create HTML prototypes of NHS Leadership Academy's work
It contains all you need to prototype anything from simple static pages to complex, visual documents.
About this page
We recommend you add links to your prototype to this page, rather than deleting it. You'll find this page in the kit at '/app/views/index.html'.
You can change various configurable elements by editing the '/app/config.js'


Find the squares by hovering near the four corners of the page, but now your only clue is a cursor change...
...or you can type "sneakery" while the focus is anywhere on the page.


{% setvar book_path %}/reference/kotlin/androidx/_book.yaml{% endsetvar %} {% include "_shared/_reference-head-tags.html" %}
These are all the API classes. See all API packages.
MainPage |
Description. |
OtherLibraryPage |
Description. |
OtherPage |
Description. |


What Is Covid-19?
Coronavirus
Corona viruses are a type of virus. There are many different kinds, and some cause disease. A newly identified type has caused a recent outbreak of respiratory illness now called COVID-19.Lauren Sauer, M.S., the director of operations with the Johns Hopkins Office of Critical Event Preparedness and Response
Learn MoreCOVID SYMPTOMS
Corona Viruses Are A Type Of Virus. There Are Many Different Kinds, And Some Cause Disease. A Newly Identified Type Has Caused A Recent Outbreak Of Respiratory
COVID SPREADS THROUGH
>
Air Transmission
Objectively Evolve Tactical Before Extensible Initiatives.


C to Fortran wrapper
The C to Fortran wrapper is implemented in Tcl, so you need an
installation of this dynamic language or a run-time shell (see
below) to use it.
Instructions for use
The wrapper can be run as follows:
tclsh cwrap.tcl header.h header2.h ...
Or, if you use the tclkit run-time shell:
tclkit cwrap.tcl header.h header2.h ...
(and type "exit" to stop the program)
It will produce the following Fortran and C files:
-
header_wrap.c: The C wrapper functions that transform the Fortran call
into a proper C call
-
header_mod.f90: A Fortran module (called "header") that contains the
interfaces for the wrapper functions
-
header_iso.f90: A Fortran 2003 module containing interfaces to the C
functions using the standard ISO C binding module.
Limitations
This is a first version of the wrapper, it is not able to
do very much. In particular:
-
No conversion yet of Fortran strings to C strings
-
Only one calling convention for passing the length of strings
-
No customisation for user-defined types
-
No support for functions that return pointers
-
No support for structs or complicated typedefs
-
No support for function arguments
Something that would be nice to have is a way of dealing with NULLs
in Fortran, as NULLs are frequently used in C as defaults or missing
arguments.
It is very probable that the wrapper breaks if the C header has a
somewhat unusual layout.
Getting a Tcl run-time shell
To use this wrapper you need to know nothing of Tcl, but you do need
the Tcl shell or the Tclkit shell.
If you work on a Linux or UNIX system or on MacOS, chances are that
you already have the Tcl shell, tclsh.
If you are on Windows, you may either want to install Tcl (for instance:
from http://www.activestate.com) or, alternatively, get the Tclkit
shell. This is a single-file run-time environment for Tcl and its
graphical user-interface component Tk. You can get it from:
http://www.equi4.com
More information on Tcl and Tk:
http://www.tcl.tk
http://wiki.tcl.tk
There is an abundance of online tutorials on Tcl/Tk.


Plugins¶
QIIME’s microbiome analysis functionality is defined and made available to users via QIIME 2 plugins. As we progress through our alpha release phase we plan to develop a mechanism for allowing users to discover what plugins are available. Our initial draft of this is the QIIME 2 Plugins spreadsheet.
The Status
categories used in this spreadsheet are:
Released
: The plugin is currently installable withconda install -c qiime2 <plugin-name>
.Pre-release development
: The plugin is currently under active development. See the Estimated release date for when this plugin is expected to be moved toRelease
status.Planning
: The plugin is in the planning stage. Development has not officially started, but it is expected to start soon. Someone has already committed to working on this plugin. There may beUnmet dependencies
that are blocking its transition toPre-release development
.Needs developer
: The plugin is in the early planning phase. It represents functionality that is needed or wanted, but no one has yet committed to working on this plugin. There may beUnmet dependencies
that are blocking its transition toPlanning
orPre-release development
.
If you’d like to develop a QIIME 2 plugin, get in touch on our Slack channel (details here) to request edit access to the spreadsheet.
If you’re looking for documentation on plugin development, see Creating a QIIME 2 plugin.


review_requested
by None at 2021-10-18 19:22:01.review_requested
by None at 2021-10-18 19:22:01.referenced
by Peter Green at 2021-10-18 19:29:44.merged
by Peter Green at 2021-10-18 19:29:44.closed
by Peter Green at 2021-10-18 19:29:44.demilestoned
by Bess Sadler at 2021-10-18 14:27:11.milestoned
by Bess Sadler at 2021-10-18 14:29:24.labeled
by Bess Sadler at 2021-10-18 14:31:50.demilestoned
by Bess Sadler at 2021-10-18 14:36:18.milestoned
by Bess Sadler at 2021-10-18 14:36:18.assigned
by Christina Chortaria at 2021-10-18 15:55:07.milestoned
by Hector Correa at 2021-10-18 15:55:15.labeled
by Hector Correa at 2021-10-18 15:55:23.renamed
by Hector Correa at 2021-10-18 15:59:07.closed
by Christina Chortaria at 2021-10-18 16:02:07.milestoned
by Christina Chortaria at 2021-10-18 15:57:23.referenced
by Christina Chortaria at 2021-10-18 16:02:07.merged
by Christina Chortaria at 2021-10-18 16:02:07.closed
by Christina Chortaria at 2021-10-18 16:02:07.head_ref_deleted
by Christina Chortaria at 2021-10-18 16:02:08.assigned
by Christina Chortaria at 2021-10-18 17:43:15.milestoned
by Christina Chortaria at 2021-10-18 17:43:19.closed
by Hector Correa at 2021-10-18 19:02:38.head_ref_force_pushed
by Christina Chortaria at 2021-10-18 18:42:17.referenced
by Hector Correa at 2021-10-18 19:02:38.merged
by Hector Correa at 2021-10-18 19:02:38.closed
by Hector Correa at 2021-10-18 19:02:39.head_ref_deleted
by Hector Correa at 2021-10-18 19:02:39.labeled
by Hector Correa at 2021-10-18 20:30:25.opened https://github.com/PrincetonUniversityLibrary/alma-config/issues/119
closed
by Christina Chortaria at 2021-10-18 20:48:11.demilestoned
by Bess Sadler at 2021-10-18 14:27:40.milestoned
by Bess Sadler at 2021-10-18 14:27:40.deployed
by None at 2021-10-18 13:59:27.head_ref_force_pushed
by None at 2021-10-18 14:10:57.head_ref_force_pushed
by None at 2021-10-18 14:12:37.head_ref_force_pushed
by None at 2021-10-18 14:46:59.head_ref_force_pushed
by None at 2021-10-18 15:42:32.head_ref_force_pushed
by None at 2021-10-18 15:43:49.referenced
by None at 2021-10-18 17:11:37.merged
by None at 2021-10-18 17:11:37.closed
by None at 2021-10-18 17:11:38.head_ref_deleted
by None at 2021-10-18 17:11:38.referenced
by None at 2021-10-18 17:02:49.closed
by None at 2021-10-18 17:11:46.Here's the commit that made this change upstream https://github.com/projectblacklight/spotlight/commit/c464675eb49d70988b384b51d9c49ff635ca56e1
It seems like this could be desired functionality.
@kelea99 Do you want us to keep the behavior in prod, or do you want to be able to use line breaks to make new paragraphs (and presumably edit the text in this case to remove the newlines)?
assigned
by None at 2021-10-18 19:23:56.mentioned
by Kim Leaman at 2021-10-18 19:29:49.subscribed
by Kim Leaman at 2021-10-18 19:29:49.labeled
by None at 2021-10-18 19:29:56.assigned
by Eliot Jordan at 2021-10-18 19:31:55.unassigned
by Shaun Ellis at 2021-10-18 19:42:22.assigned
by None at 2021-10-18 20:13:47.referenced
by None at 2021-10-18 20:47:45.deployed
by None at 2021-10-18 21:07:11.referenced
by Eliot Jordan at 2021-10-18 21:10:51.merged
by Eliot Jordan at 2021-10-18 21:10:51.closed
by Eliot Jordan at 2021-10-18 21:10:52.head_ref_deleted
by Eliot Jordan at 2021-10-18 21:10:52.deployed
by None at 2021-10-18 18:47:38.demilestoned
by Bess Sadler at 2021-10-18 14:20:19.milestoned
by Bess Sadler at 2021-10-18 14:20:19.assigned
by Kate Lynch at 2021-10-18 14:22:47.Closed in favor of #496
closed
by Bess Sadler at 2021-10-18 14:37:46.demilestoned
by Bess Sadler at 2021-10-18 14:41:20.milestoned
by Bess Sadler at 2021-10-18 14:41:20.We think this will be resolved by https://github.com/samvera/valkyrie/pull/875
We'll still have to start closing handles in cases where we pull a file out and read it.
labeled
by Trey Pendragon at 2021-10-18 20:33:50.demilestoned
by Bess Sadler at 2021-10-18 14:28:06.milestoned
by Bess Sadler at 2021-10-18 14:28:06.unlabeled
by Bess Sadler at 2021-10-18 14:38:58.referenced
by Kevin Reiss at 2021-10-18 17:54:52.merged
by Kevin Reiss at 2021-10-18 17:54:52.closed
by Kevin Reiss at 2021-10-18 17:54:52.head_ref_deleted
by Kevin Reiss at 2021-10-18 17:54:52.labeled
by Trey Pendragon at 2021-10-18 18:43:27.


Nipper lee doubloon swab league topsail no prey, no pay tack yardarm. Wench belaying pin hempen halter grapple crack Jennys tea cup jib matey overhaul prow. Bowsprit aye rutters boom red ensign strike colors to go on account topsail driver. Lugsail yard stern dead men tell no tales Privateer jury mast Spanish Main log galleon.
Photo by Trent Szmolnik on Unsplash. Site text kindly supplied via PirateIpsum.me
Six pounders swab gunwalls rum Sea Legs rope's end driver rigging. Scurvy haul wind piracy driver weigh anchor Spanish Main case shot long clothes.  Case shot mizzen grog blossom ahoy booty spanker lanyard fire in the hole.
Tack galleon mizzen Buccaneer schooner no prey, no pay lee bowsprit. Skysail Spanish Main nipperkin landlubber or just lubber lateen sail square-rigged bring a spring upon her cable reef. Belaying pin loot keelhaul Gold Road Buccaneer mizzen Chain Shot loaded to the gunwalls. Black spot mizzen Jack Ketch gabion tack weigh anchor heave down fire in the hole.
Walk the plank dead men tell no tales pinnace hempen halter shrouds plunder rope's end bring a spring upon her cable. Quarterdeck wench overhaul Admiral of the Black gunwalls swing the lead bilged on her anchor aft. Gaff lee draught snow aye matey lookout main sheet. Mutiny come about Davy Jones' Locker quarterdeck six pounders starboard Gold Road mizzen.
Photo by Jason Briscoe on Unsplash. Site text kindly supplied via PirateIpsum.me
Hail-shot clap of thunder case shot Davy Jones' Locker gangway flogging pressgang booty chase guns. Ahoy jolly boat scallywag Jack Ketch wench loot ballast sheet hearties. Bowsprit yawl hulk parrel rigging Yellow Jack square-rigged nipper gangplank. Gabion crack Jennys tea cup yawl yo-ho-ho mizzenmast scuttle sloop carouser pinnace.
 Black spot spanker tackle Gold Road me ballast main sheet fire ship. Arr plunder hearties stern Sail ho square-rigged no prey, no pay carouser. Six pounders crimp barque American Main pink Barbary Coast maroon skysail.
Photo by Sincerely Media on Unsplash. Site text kindly supplied via PirateIpsum.me
Chandler Yellow Jack Arr lugsail bilged on her anchor provost. Bounty fluke scallywag plunder bilged on her anchor lugsail. Privateer bucko blow the man down spyglass splice the main brace carouser. Draught gun Buccaneer pinnace parley red ensign.
Barque spirits lad jolly boat boom spike. Lad lee bilge water rutters provost stern. Boom Jack Ketch weigh anchor loot cog to go on account. Hardtack tackle trysail yo-ho-ho belaying pin gunwalls.
Cable swab bilge parrel knave parley. Spanker sloop take a caulk me mutiny crack Jennys tea cup. Plunder holystone wench aft galleon fore. Barque port driver keelhaul fore rigging.
Photo by Austin Distel on Unsplash. Site text kindly supplied via PirateIpsum.me
Let's chat! How can my web development & IT skills help you? Drop me a note below please.
Jib Plate Fleet Privateer swab gangplank jolly boat execution dock trysail pink. Cutlass spike scurvy topsail hail-shot boom rum six pounders crow's nest. Pirate Round code of conduct lookout snow interloper reef sails marooned run a shot across the bow take a caulk.
Draft sheet Jack Tar Sail ho Davy Jones' Locker lateen sail grog bilge rat spyglass. Blimey knave crow's nest squiffy Sail ho hang the jib spyglass ho hulk.  Barque Pirate Round main sheet marooned clap of thunder spike Chain Shot case shot pillage.
Nipper lee doubloon swab league topsail no prey, no pay tack yardarm. Wench belaying pin hempen halter grapple crack Jennys tea cup jib matey overhaul prow. Bowsprit aye rutters boom red ensign strike colors to go on account topsail driver. Lugsail yard stern dead men tell no tales Privateer jury mast Spanish Main log galleon.
Photo by Austin Distel on Unsplash. Site text kindly supplied via PirateIpsum.me


A website by Eric Wan
My friend, Zack Braun, approached me one day with an idea. He wanted to create a mask that would provide a heads-up display for firefighters, giving them basic information such as:
Sounds good, right? I jumped onboard and we talked about the possibility of harder things like:
We decided pretty quickly that we wanted to use Raspberry Pi. I can't remember the exact details, but there were definitive reasons to use RPi over Arduino. It was likely hardware/logistically related. We did some googling and found that firefighter AR had been attempted before - but not succesfully, and not frugally. Zack also spoke to a local firefighter friend of his and found out that they had the opportunity to purchase a similar product, but at a whopping 45k/mask.
Keeping our mask low-cost would be important for a few large reasons.
 And I don't just mean that you shouldn't try to turn a huge profit off of this. There just isn't budget for expensive masks that will be exposed to heat and destruction.
And, we want to go to InVenture 2016, which brings up a few more reasons. Having a prototype is mandatory (I'm pretty sure) and we don't have 45k lying around. We'll also need a valid reason to create this product - what makes us better than existing solutions? Zack and I threw around some ballpark numbers, and without the actual display itself, we were high-balling numbers like $200/mask.
Of course, we don't know how much it'll cost to protect everything from the extreme heat. But Zack doesn't think it'll be too costly or limiting in any way, and our equipment costs are pretty low already - that's right, we've already started our first prototype. Even if it jacks up the cost, and then we still have to design a display, I can't see this costing any more than $500. The way I see it, anything under $1000 is viable for the market and if we hit that $200 mark, we're golden.
Implementation-wise, we still have a little ways to go. We've got parts and ideas to handle all of the basic features from the first set of bullet points. To handle the rest will take more time. Location services aren't easy - wifi is unreliable, GPS is too and isn't accurate enough, and god what else would we be using. We will be using I2C and bluetooth to communicate otherwise, but I doubt we'll be able to easily show "Mark is 20m to the west". We can easily do things like have the commander send a "everybody out" signal over radio and have it pop up on the display, but other AR ideas might be harder. LIDAR would be great to use but it's expensive and might take more manpower/knowledge than we could feasibly do. Luckily, we have a long, long time to work on this and I'm sure we'll have plenty of resources.


Tutorial¶
Creating Graphs¶
Let’s say that you wanted to create the following graph with ODGI:
This graph is a combination of nodes (labelled as n0, n1, …, n9) and directed edges (arrows).
ODGI Objects¶
Edges and nodes are accessed through a odgi.graph
object. Individual nodes in the graph are pointed at by odgi.handle
.
Paths in the graph and accessed through odgi.path_handle
, which is a series of odgi.step_handle
linked together. Each odgi.step_handle
is points to the node in that step, and also contains directional information regarding the nodes preceeding and following it.
Handles are pointers to specific pieces of the graph, and it is not possible to operate on them directly, aside from comparing whether the objects are equal. To get information regarding the object that each handle is pointing to, it is necessary to use the corresponding get accessor method in odgi.graph
.
Reference materials for these methods can be found at the python API, as well as the Sorted Glossary of Methods, which contains lists sorted by object type for Accessor Methods, Mutator Methods, and Iteratator Methods.
Making a Graph¶
First, we must create the graph, then make each node and keep track of their handles.
gr = odgi.graph()
seq = ["CGA", "TTGG", "CCGT", "C", "GT", "GATAA", "CGG", "ACA", "GCCG", "ATATAAC"]
n = []
for s in seq:
n.append(gr.create_handle(s))
Now we link together these nodes using their handles. Note that each of these handles is directional, so in order to create the bidirectional edge between n5 and n8 we use create_edge
twice.
gr.create_edge(n[0], n[1])
gr.create_edge(n[1], n[2])
gr.create_edge(n[2], n[3])
gr.create_edge(n[2], n[4])
gr.create_edge(n[3], n[5])
gr.create_edge(n[5], n[6])
gr.create_edge(n[5], n[8])
gr.create_edge(n[6], n[7])
gr.create_edge(n[6], n[8])
gr.create_edge(n[7], n[9])
gr.create_edge(n[8], n[9])
gr.create_edge(n[8], n[5])
Traversing Edges¶
If we wanted to traverse these edges, we could do it using the iterator method odgi.graph.follow_edges()
.
def next_node_list(handle):
lis = []
gr.follow_edges(handle, False, lambda y: lis.append(y))
return lis
print(f'n0: {gr.get_sequence(n[0])}')
next_node = next_node_list(n[0])[0]
print(f'n1: {gr.get_sequence(next_node)}')
next_node = next_node_list(next_node)[0]
print(f'n2: {gr.get_sequence(next_node)}')
Which will output the following:
n0: CGA
n1: TTGG
n2: CCGT
A map of the data can be generated using odgi.graph.to_gfa()
.
print(gr.to_gfa())
Creating a Path¶
Generating a linear sequence from this graph could be done in infinitely many ways, due to the interal loop between n5, n6, and n8. If we wanted to define a single consensus sequence, we would do this by defining a path.
To create the hilighted path, we would need to create a odgi.path_handle
in the graph, and then append each odgi.handle
to the end of the path.
path = gr.create_path_handle("path")
gr.append_step(path, n[0])
gr.append_step(path, n[1])
gr.append_step(path, n[2])
gr.append_step(path, n[4])
gr.append_step(path, n[5])
gr.append_step(path, n[6])
gr.append_step(path, n[7])
gr.append_step(path, n[9])
Warning
odgi.graph.append_step()
will not stop you from appending nodes that are not connected to the preceeding node.
# the following code runs without error
badpath = gr.create_path_handle("badpath")
gr.append_step(badpath, n[0])
gr.append_step(badpath, n[3])
Traversing a path¶
To traverse a path, we need to fetch a series of odgi.step_handle
from the graph. Note that although we are effectively asking the path for these items in it, all accessor methods are a part of the odgi.graph
object.
step = gr.path_begin(path)
while(gr.has_next_step(step)):
# get the node handle from the step handle
current_node_handle = gr.get_handle_of_step(step)
# ask the node handle for the sequence
print(gr.get_sequence(current_node_handle))
# progress to the next step
step = gr.get_next_step(step)
current_node_handle = gr.get_handle_of_step(step)
print(gr.get_sequence(current_node_handle))
Which will output the following:
CGA
TTGG
CCGT
GT
GATAA
CGG
ACA
ATATAAC
Saving and Loading ODGI Graphs¶
Graphs can be saved and loaded through the odgi.graph.serialize()
and odgi.graph.load()
methods.
Graph File Example¶
If you wish to save the graph from the above session, that can be done with:
gr.serialize("example_graph.odgi")
This can be loaded into a new python session by using:
gr = odgi.graph()
gr.load("example_graph.odgi")
Loading in Pre-Existing Data¶
Provided that data has been serialized in ODGI format, it is possible to read it directly from a file. Download a *.odgi file and load it into python with:
brca2 = odgi.graph()
brca2.load("cactus-brca2.odgi")
We can poke around this data and get the sequence of the path with:
path_handle = []
handles = []
brca2.for_each_path_handle(lambda y: path_handle.append(y))
brca2.for_each_step_in_path(path_handle[0],
lambda y: handles.append(brca2.get_handle_of_step(y)))
sequence = ""
for handle in handles:
sequence += brca2.get_sequence(handle)
print(sequence)
Reading in a Graph from a Different Format¶
Graph assembies can be created with VG. Currently the method to convert to odgi format is broken, but graphs can be converted to .json format and subsequently converted to odgi with this script
.


{border-style px;} #ffffff;} viral SARS-CoV- rectal positive reported fecal samples evidence gastrointestinal nasopharyngeal symptoms px; {font-family font-size infection pediatric respiratory swabs swabs, COVID- Mar RNA [Epub ahead children detection double; print] shedding stool border-color border-width days solid; {font-style {font-weight Coronavirus Infect bold case courier; em; feces presented pt;} showed swab


What We Do!
Product Design, Manufacturing & Consult
{% extends 'base.html' %} {% load static %} {% block content %}
Product Design, Manufacturing & Consult
Using Eagle and other design tools to achieve specifications
Using Solidworks and other design tools to achieve specifications
Offer quality, artistic designs and renders
Together with our Chinese partners we efficiently deliver products
This involves conceptualizing an idea to design a product. Product development and engineering teams are expected to design, make prototypes, perform quality and performance tests, and finally roll out the product or service. They make improvements on products using feedback from marketing teams and working closely with R&D. They also design innovative tools and techniques to make products in a fast, less-costly process.
The manufacturing department is expected to transform a product design into a real workable product. This department works in collaboration with design teams to explore how best they can improve production lines to make products faster and with reduced operational costs.e.tc.
Sed ut perspiciatis unde omnis iste natus error sit voluptatem accusantium doloremque laudantium, totam rem aperiam, eaque ipsa quae ab illo inventore veritatis et quasi architecto beatae vitae dicta sunt explicabo..
Easy and effective way to get your device designed and manufactured.
Exerci tation ullamcorper suscipit lobortis nisl ut aliquip ex ea commodo.
Exerci tation ullamcorper suscipit lobortis nisl ut aliquip ex ea commodo.
Exerci tation ullamcorper suscipit lobortis nisl ut aliquip ex ea commodo.
Exerci tation ullamcorper suscipit lobortis nisl ut aliquip ex ea commodo.
Exerci tation ullamcorper suscipit lobortis nisl ut aliquip ex ea commodo.
Exerci tation ullamcorper suscipit lobortis nisl ut aliquip ex ea commodo.
We package the products with best services to make you a happy customer.
Here are testimonials from clients..
Get answers and advice from people you want it from.


File System/AdvancedDebug.lua
Functions
| AdvancedDebug.getDialogSection (vf, props) | Get UI Dialog Section for Advanced Debug. |
| AdvancedDebug:debugStackTrace (startLevel) | Logs a rudimentary stack trace (function name, source file, line number). |
| AdvancedDebug:debugTrace (name, id, __info) | Output debug message. |
| AdvancedDebug:logObject (t) | This is a really great tool for logging complex tables when you don't really know whats in them. |
| AdvancedDebug:logTable (t) | Log a simple, non-array table. |
| AdvancedDebug:new (t) | Constructor for new instance. |
| AdvancedDebug:newClass (t) | Constructor for extending class. |
Functions
- AdvancedDebug.getDialogSection (vf, props)
-
Get UI Dialog Section for Advanced Debug.
Parameters:
-
vf
: -
props
:
-
- AdvancedDebug:debugStackTrace (startLevel)
-
Logs a rudimentary stack trace (function name, source file, line number).
Parameters:
-
startLevel
:
Usage:
wrapped by app object method - see App class for more info.
-
- AdvancedDebug:debugTrace (name, id, __info)
-
Output debug message.
Parameters:
-
name
: Module or class name of originating debug message. -
id
: Message prefix, also used as key in case you want to kill these debug messages for remainder of service. -
__info
: Message suffix.
Usage:
Goes to external debugger, if open, else log file - if open.
-
- AdvancedDebug:logObject (t)
-
This is a really great tool for logging complex tables when you don't really know whats in them.
It could use a little primping, but it has served my purpose so I'm moving on.
Parameters:
-
t
: The object to log (usually a complex table, but can be anything).
Usage:
Example: app:logObject( someTable )
-
- AdvancedDebug:logTable (t)
-
Log a simple, non-array table.
Parameters:
-
t
: The table to log.
Usage:
Does not re-curse.
-
- AdvancedDebug:new (t)
-
Constructor for new instance.
Parameters:
-
t
: Initial member table.
-
- AdvancedDebug:newClass (t)
-
Constructor for extending class.
Parameters:
-
t
: Initial member table.
-


I am trying to put together a energy monitor using emontx3.4 schematics (atleast for the CT portion).
I looked at the schematics here: https://raw.githubusercontent.com/openenergymonitor/Hardware/master/emonTxV3/emonTx_V3.4/schematic.jpg
Each CT has its own voltage divider, is there a reason this is not shared?
Can I share it with 4 CTs in my setup?
Do I need an op-amp to share? (If yes, why? would help me learn also :)) I am not super familiar with electronics so please excuse the beginner level question.
Thanks
Re: Sharing the voltage divider in emontx 3.4 schematics
No personal experience, but I believe others have reported that you can share the mid-rail if it's driven by an op-amp. If you attempt to share it with just the R-divider, then you'll get interference between the channels.
Re: Sharing the voltage divider in emontx 3.4 schematics
"Each CT has its own voltage divider, is there a reason this is not shared?"
The most likely reasons are crosstalk and cost. You need that centre voltage to stay constant to within a millivolt or so, and using it for many channels could mean one 'pulls' the voltage thus coupling itself to all the channels. To get round this, you need an op.amp that gives you a low impedance output that cannot be pulled about easily. That would add to the cost and the current drain, making battery operation expensive.


You're important to me
Once we have an agreement, my priority is making sure you are satisfied & that all your design needs are addressed within the constraints of your time-budget.
I draw upon years of experience in the design industry, and a wide network of professionals across commercial and residential projects. Strongly in tune with your needs, I will ensure that the goals we set are met on time, and within budget. The first time, guaranteed!
The experience I bring to my projects translates into a concerted effort to optimize timelines to suit your needs, while being flexible to life's surprises.
From consulting to design to demo to fab to the finished product, I'm with you every step of the way, setting expectations, putting out fires and helping you make the right decisions for your family.
Working on your home shouldn't feel like a chore, and with me, it won't. I've worked with clients of diverse backgrounds and needs, and there is no situation I cannot anticipate or handle.
Schedule a consultOnce we have an agreement, my priority is making sure you are satisfied & that all your design needs are addressed within the constraints of your time-budget.
The people I put you in touch with are the same ones I've been working with and built up trust with for over 5 years. You get nothing but the best.
I love deadlines, but I realize that life isn't always predictable. I will take the utmost care to see your projects through to the finish.


{{title}}
About
Recent Messages
Supporters
Concerns
Homepage|->
About This Project
{{description}}
Recent messages
Recent tweets from coopists: {%for r in recent%}
@{{r['user']['screen_name']}}
{{r['created_at']}}
{{r['text']}}
{%endfor%}
People who supports this project
Following coopists are supporting our movement!
{% for w in wall: %}
{% endfor %}
Coopist in this project concerns
Coopists concern most:
Join
Interested in this project? Leave your words with hash tag {{hash_tag}}


Sparse Octree
A sparse, pointer-based octree data structure. For a linear implementation see linear-octree.
Demo · Sandbox · Documentation
Installation
This library requires the peer dependencies iterator-result and math-ds.
npm install iterator-result math-ds
npm install sparse-octree
Usage
Points
import { Vector3 } from "math-ds";
import { PointOctree } from "sparse-octree";
const min = new Vector3(-1, -1, -1);
const max = new Vector3(1, 1, 1);
const octree = new PointOctree(min, max);
const myData = {};
const p1 = new Vector3(0, 0, 0);
const p2 = new Vector3(0, 0, 0.5);
octree.insert(p1, myData);
octree.move(p1, p2);
octree.get(p2); // => myData
octree.remove(p2);
octree.get(p2); // => null
Custom Octrees
import { Octree, CubicOctant } from "sparse-octree";
export class CubicOctree extends Octree {
constructor(min, size) {
this.root = new CubicOctant(min, size);
}
}
Features
- Pointer-based structure
- Handles octant splitting
- Supports cubic octrees for reduced memory usage
- Dynamic depth
- Adheres to a common octant layout
- Supports raycasting
- Supports culling
- Can be extended to manage any data
- Provides a point management implementation
Octree Helper
The octree-helper module provides an octree visualization tool for three.js.
Contributing
Maintain the existing coding style. Add unit tests for any new or changed functionality. Lint and test your code.


The system configuration standards should include common security settings.
Including common security settings in the system configuration standards helps make sure that the security settings are consistent across the network.
Examine the system configuration standards to make sure they include common security settings. The common security settings should reflect the features and capabilities of the target system. For example, if a device supports VPN, then the VPN settings should be included in the system configuration standards when relevant.
Identify each type of system on the network. For each type of system, identify security features and configuration options it provides. Decide on the appropriate settings for the security features and capabilities of each system type. Document the chosen settings of the security features of each type of system in the system configuration standards.