id
int32
0
58k
repo
stringlengths
5
67
path
stringlengths
4
116
func_name
stringlengths
0
58
original_string
stringlengths
52
373k
language
stringclasses
1 value
code
stringlengths
52
373k
code_tokens
list
docstring
stringlengths
4
11.8k
docstring_tokens
list
sha
stringlengths
40
40
url
stringlengths
86
226
400
SeleniumHQ/selenium
third_party/js/mozmill/shared-modules/addons.js
addonsManager_disableAddon
function addonsManager_disableAddon(aSpec) { var spec = aSpec || { }; spec.button = "disable"; var button = this.getAddonButton(spec); this._controller.click(button); }
javascript
function addonsManager_disableAddon(aSpec) { var spec = aSpec || { }; spec.button = "disable"; var button = this.getAddonButton(spec); this._controller.click(button); }
[ "function", "addonsManager_disableAddon", "(", "aSpec", ")", "{", "var", "spec", "=", "aSpec", "||", "{", "}", ";", "spec", ".", "button", "=", "\"disable\"", ";", "var", "button", "=", "this", ".", "getAddonButton", "(", "spec", ")", ";", "this", ".", ...
Disables the specified add-on @param {object} aSpec Information on which add-on to operate on Elements: addon - Add-on element
[ "Disables", "the", "specified", "add", "-", "on" ]
38d5e4440b2c866a78a1ccb2a18d9795a1bdeafd
https://github.com/SeleniumHQ/selenium/blob/38d5e4440b2c866a78a1ccb2a18d9795a1bdeafd/third_party/js/mozmill/shared-modules/addons.js#L361-L367
401
SeleniumHQ/selenium
third_party/js/mozmill/shared-modules/addons.js
addonsManager_installAddon
function addonsManager_installAddon(aSpec) { var spec = aSpec || { }; var addon = spec.addon; var timeout = spec.timeout; var button = "install"; var waitFor = (spec.waitFor == undefined) ? true : spec.waitFor; var button = this.getAddonButton({addon: addon, button: button}); this._controll...
javascript
function addonsManager_installAddon(aSpec) { var spec = aSpec || { }; var addon = spec.addon; var timeout = spec.timeout; var button = "install"; var waitFor = (spec.waitFor == undefined) ? true : spec.waitFor; var button = this.getAddonButton({addon: addon, button: button}); this._controll...
[ "function", "addonsManager_installAddon", "(", "aSpec", ")", "{", "var", "spec", "=", "aSpec", "||", "{", "}", ";", "var", "addon", "=", "spec", ".", "addon", ";", "var", "timeout", "=", "spec", ".", "timeout", ";", "var", "button", "=", "\"install\"", ...
Installs the specified add-on @param {object} aSpec Information on which add-on to operate on Elements: addon - Add-on element waitFor - Wait until the category has been selected [optional - default: true] timeout - Duration to wait for the download [optional - default: 15s]
[ "Installs", "the", "specified", "add", "-", "on" ]
38d5e4440b2c866a78a1ccb2a18d9795a1bdeafd
https://github.com/SeleniumHQ/selenium/blob/38d5e4440b2c866a78a1ccb2a18d9795a1bdeafd/third_party/js/mozmill/shared-modules/addons.js#L380-L392
402
SeleniumHQ/selenium
third_party/js/mozmill/shared-modules/addons.js
addonsManager_removeAddon
function addonsManager_removeAddon(aSpec) { var spec = aSpec || { }; spec.button = "remove"; var button = this.getAddonButton(spec); this._controller.click(button); }
javascript
function addonsManager_removeAddon(aSpec) { var spec = aSpec || { }; spec.button = "remove"; var button = this.getAddonButton(spec); this._controller.click(button); }
[ "function", "addonsManager_removeAddon", "(", "aSpec", ")", "{", "var", "spec", "=", "aSpec", "||", "{", "}", ";", "spec", ".", "button", "=", "\"remove\"", ";", "var", "button", "=", "this", ".", "getAddonButton", "(", "spec", ")", ";", "this", ".", "...
Removes the specified add-on @param {object} aSpec Information on which add-on to operate on Elements: addon - Add-on element
[ "Removes", "the", "specified", "add", "-", "on" ]
38d5e4440b2c866a78a1ccb2a18d9795a1bdeafd
https://github.com/SeleniumHQ/selenium/blob/38d5e4440b2c866a78a1ccb2a18d9795a1bdeafd/third_party/js/mozmill/shared-modules/addons.js#L401-L407
403
SeleniumHQ/selenium
third_party/js/mozmill/shared-modules/addons.js
addonsManager_undo
function addonsManager_undo(aSpec) { var spec = aSpec || { }; spec.link = "undo"; var link = this.getAddonLink(spec); this._controller.click(link); }
javascript
function addonsManager_undo(aSpec) { var spec = aSpec || { }; spec.link = "undo"; var link = this.getAddonLink(spec); this._controller.click(link); }
[ "function", "addonsManager_undo", "(", "aSpec", ")", "{", "var", "spec", "=", "aSpec", "||", "{", "}", ";", "spec", ".", "link", "=", "\"undo\"", ";", "var", "link", "=", "this", ".", "getAddonLink", "(", "spec", ")", ";", "this", ".", "_controller", ...
Undo the last action performed for the given add-on @param {object} aSpec Information on which add-on to operate on Elements: addon - Add-on element
[ "Undo", "the", "last", "action", "performed", "for", "the", "given", "add", "-", "on" ]
38d5e4440b2c866a78a1ccb2a18d9795a1bdeafd
https://github.com/SeleniumHQ/selenium/blob/38d5e4440b2c866a78a1ccb2a18d9795a1bdeafd/third_party/js/mozmill/shared-modules/addons.js#L416-L422
404
SeleniumHQ/selenium
third_party/js/mozmill/shared-modules/addons.js
addonsManager_addons
function addonsManager_addons(aSpec) { var spec = aSpec || {}; return this.getElements({ type: "addons", subtype: spec.attribute, value: spec.value, parent: this.selectedView }); }
javascript
function addonsManager_addons(aSpec) { var spec = aSpec || {}; return this.getElements({ type: "addons", subtype: spec.attribute, value: spec.value, parent: this.selectedView }); }
[ "function", "addonsManager_addons", "(", "aSpec", ")", "{", "var", "spec", "=", "aSpec", "||", "{", "}", ";", "return", "this", ".", "getElements", "(", "{", "type", ":", "\"addons\"", ",", "subtype", ":", "spec", ".", "attribute", ",", "value", ":", "...
Returns the addons from the currently selected view which match the filter criteria @param {object} aSpec Information about the filter to apply Elements: attribute - DOM attribute of the wanted addon [optional - default: ""] value - Value of the DOM attribute [optional - default: ""] @returns List of addons @type...
[ "Returns", "the", "addons", "from", "the", "currently", "selected", "view", "which", "match", "the", "filter", "criteria" ]
38d5e4440b2c866a78a1ccb2a18d9795a1bdeafd
https://github.com/SeleniumHQ/selenium/blob/38d5e4440b2c866a78a1ccb2a18d9795a1bdeafd/third_party/js/mozmill/shared-modules/addons.js#L438-L447
405
SeleniumHQ/selenium
third_party/js/mozmill/shared-modules/addons.js
addonsManager_getAddonButton
function addonsManager_getAddonButton(aSpec) { var spec = aSpec || { }; var addon = spec.addon; var button = spec.button; if (!button) throw new Error(arguments.callee.name + ": Button not specified."); return this.getAddonChildElement({addon: addon, type: button + "Button"}); }
javascript
function addonsManager_getAddonButton(aSpec) { var spec = aSpec || { }; var addon = spec.addon; var button = spec.button; if (!button) throw new Error(arguments.callee.name + ": Button not specified."); return this.getAddonChildElement({addon: addon, type: button + "Button"}); }
[ "function", "addonsManager_getAddonButton", "(", "aSpec", ")", "{", "var", "spec", "=", "aSpec", "||", "{", "}", ";", "var", "addon", "=", "spec", ".", "addon", ";", "var", "button", "=", "spec", ".", "button", ";", "if", "(", "!", "button", ")", "th...
Returns the element of the specified add-ons button @param {object} aSpec Information on which add-on to operate on Elements: addon - Add-on element button - Button (disable, enable, preferences, remove) @returns Add-on button @type {ElemBase}
[ "Returns", "the", "element", "of", "the", "specified", "add", "-", "ons", "button" ]
38d5e4440b2c866a78a1ccb2a18d9795a1bdeafd
https://github.com/SeleniumHQ/selenium/blob/38d5e4440b2c866a78a1ccb2a18d9795a1bdeafd/third_party/js/mozmill/shared-modules/addons.js#L460-L469
406
SeleniumHQ/selenium
third_party/js/mozmill/shared-modules/addons.js
addonsManager_getAddonLink
function addonsManager_getAddonLink(aSpec) { var spec = aSpec || { }; var addon = spec.addon; var link = spec.link; if (!link) throw new Error(arguments.callee.name + ": Link not specified."); return this.getAddonChildElement({addon: addon, type: link + "Link"}); }
javascript
function addonsManager_getAddonLink(aSpec) { var spec = aSpec || { }; var addon = spec.addon; var link = spec.link; if (!link) throw new Error(arguments.callee.name + ": Link not specified."); return this.getAddonChildElement({addon: addon, type: link + "Link"}); }
[ "function", "addonsManager_getAddonLink", "(", "aSpec", ")", "{", "var", "spec", "=", "aSpec", "||", "{", "}", ";", "var", "addon", "=", "spec", ".", "addon", ";", "var", "link", "=", "spec", ".", "link", ";", "if", "(", "!", "link", ")", "throw", ...
Returns the element of the specified add-ons link @param {object} aSpec Information on which add-on to operate on Elements: addon - Add-on element link - Link List view (more, restart, undo) Detail view (findUpdates, restart, undo) @return Add-on link @type {ElemBase}
[ "Returns", "the", "element", "of", "the", "specified", "add", "-", "ons", "link" ]
38d5e4440b2c866a78a1ccb2a18d9795a1bdeafd
https://github.com/SeleniumHQ/selenium/blob/38d5e4440b2c866a78a1ccb2a18d9795a1bdeafd/third_party/js/mozmill/shared-modules/addons.js#L484-L493
407
SeleniumHQ/selenium
third_party/js/mozmill/shared-modules/addons.js
addonsManager_getAddonRadiogroup
function addonsManager_getAddonRadiogroup(aSpec) { var spec = aSpec || { }; var addon = spec.addon; var radiogroup = spec.radiogroup; if (!radiogroup) throw new Error(arguments.callee.name + ": Radiogroup not specified."); return this.getAddonChildElement({addon: addon, type: radiogroup + "R...
javascript
function addonsManager_getAddonRadiogroup(aSpec) { var spec = aSpec || { }; var addon = spec.addon; var radiogroup = spec.radiogroup; if (!radiogroup) throw new Error(arguments.callee.name + ": Radiogroup not specified."); return this.getAddonChildElement({addon: addon, type: radiogroup + "R...
[ "function", "addonsManager_getAddonRadiogroup", "(", "aSpec", ")", "{", "var", "spec", "=", "aSpec", "||", "{", "}", ";", "var", "addon", "=", "spec", ".", "addon", ";", "var", "radiogroup", "=", "spec", ".", "radiogroup", ";", "if", "(", "!", "radiogrou...
Returns the element of the specified add-ons radio group @param {object} aSpec Information on which add-on to operate on Elements: addon - Add-on element radiogroup - Radiogroup Detail View (autoUpdate) @returns Add-on radiogroup @type {ElemBase}
[ "Returns", "the", "element", "of", "the", "specified", "add", "-", "ons", "radio", "group" ]
38d5e4440b2c866a78a1ccb2a18d9795a1bdeafd
https://github.com/SeleniumHQ/selenium/blob/38d5e4440b2c866a78a1ccb2a18d9795a1bdeafd/third_party/js/mozmill/shared-modules/addons.js#L507-L516
408
SeleniumHQ/selenium
third_party/js/mozmill/shared-modules/addons.js
addonsManager_getAddonChildElement
function addonsManager_getAddonChildElement(aSpec) { var spec = aSpec || { }; var addon = spec.addon; var attribute = spec.attribute; var value = spec.value; var type = spec.type; if (!addon) throw new Error(arguments.callee.name + ": Add-on not specified."); // If no type has been s...
javascript
function addonsManager_getAddonChildElement(aSpec) { var spec = aSpec || { }; var addon = spec.addon; var attribute = spec.attribute; var value = spec.value; var type = spec.type; if (!addon) throw new Error(arguments.callee.name + ": Add-on not specified."); // If no type has been s...
[ "function", "addonsManager_getAddonChildElement", "(", "aSpec", ")", "{", "var", "spec", "=", "aSpec", "||", "{", "}", ";", "var", "addon", "=", "spec", ".", "addon", ";", "var", "attribute", "=", "spec", ".", "attribute", ";", "var", "value", "=", "spec...
Retrieve the given child element of the specified add-on @param {object} aSpec Information for getting the add-ons child node Elements: addon - Add-on element type - Type of the element [optional - default: use attribute/value] attribute - DOM attribute of the node value - Value of the DOM attribute @ret...
[ "Retrieve", "the", "given", "child", "element", "of", "the", "specified", "add", "-", "on" ]
38d5e4440b2c866a78a1ccb2a18d9795a1bdeafd
https://github.com/SeleniumHQ/selenium/blob/38d5e4440b2c866a78a1ccb2a18d9795a1bdeafd/third_party/js/mozmill/shared-modules/addons.js#L532-L568
409
SeleniumHQ/selenium
third_party/js/mozmill/shared-modules/addons.js
addonsManager_waitForDownloaded
function addonsManager_waitForDownloaded(aSpec) { var spec = aSpec || { }; var addon = spec.addon; var timeout = (spec.timeout == undefined) ? TIMEOUT_DOWNLOAD : spec.timeout; if (!addon) throw new Error(arguments.callee.name + ": Add-on not specified."); var self = this; var node = addo...
javascript
function addonsManager_waitForDownloaded(aSpec) { var spec = aSpec || { }; var addon = spec.addon; var timeout = (spec.timeout == undefined) ? TIMEOUT_DOWNLOAD : spec.timeout; if (!addon) throw new Error(arguments.callee.name + ": Add-on not specified."); var self = this; var node = addo...
[ "function", "addonsManager_waitForDownloaded", "(", "aSpec", ")", "{", "var", "spec", "=", "aSpec", "||", "{", "}", ";", "var", "addon", "=", "spec", ".", "addon", ";", "var", "timeout", "=", "(", "spec", ".", "timeout", "==", "undefined", ")", "?", "T...
Wait until the specified add-on has been downloaded @param {object} aSpec Object with parameters for customization Elements: addon - Add-on element to wait for being downloaded timeout - Duration to wait for the target state [optional - default: 15s]
[ "Wait", "until", "the", "specified", "add", "-", "on", "has", "been", "downloaded" ]
38d5e4440b2c866a78a1ccb2a18d9795a1bdeafd
https://github.com/SeleniumHQ/selenium/blob/38d5e4440b2c866a78a1ccb2a18d9795a1bdeafd/third_party/js/mozmill/shared-modules/addons.js#L579-L599
410
SeleniumHQ/selenium
third_party/js/mozmill/shared-modules/addons.js
addonsManager_categories
function addonsManager_categories(aSpec) { var spec = aSpec || { }; var categories = this.getElements({ type: "categories", subtype: spec.attribute, value: spec.value }); if (categories.length == 0) throw new Error(arguments.callee.name + ": Categories could not be found."); ...
javascript
function addonsManager_categories(aSpec) { var spec = aSpec || { }; var categories = this.getElements({ type: "categories", subtype: spec.attribute, value: spec.value }); if (categories.length == 0) throw new Error(arguments.callee.name + ": Categories could not be found."); ...
[ "function", "addonsManager_categories", "(", "aSpec", ")", "{", "var", "spec", "=", "aSpec", "||", "{", "}", ";", "var", "categories", "=", "this", ".", "getElements", "(", "{", "type", ":", "\"categories\"", ",", "subtype", ":", "spec", ".", "attribute", ...
Returns the categories which match the filter criteria @param {object} aSpec Information about the filter to apply Elements: attribute - DOM attribute of the wanted category [optional - default: ""] value - Value of the DOM attribute [optional - default: ""] @returns List of categories @type {array of ElemBase}
[ "Returns", "the", "categories", "which", "match", "the", "filter", "criteria" ]
38d5e4440b2c866a78a1ccb2a18d9795a1bdeafd
https://github.com/SeleniumHQ/selenium/blob/38d5e4440b2c866a78a1ccb2a18d9795a1bdeafd/third_party/js/mozmill/shared-modules/addons.js#L629-L642
411
SeleniumHQ/selenium
third_party/js/mozmill/shared-modules/addons.js
addonsManager_getCategoryById
function addonsManager_getCategoryById(aSpec) { var spec = aSpec || { }; var id = spec.id; if (!id) throw new Error(arguments.callee.name + ": Category ID not specified."); return this.getCategories({ attribute: "id", value: "category-" + id })[0]; }
javascript
function addonsManager_getCategoryById(aSpec) { var spec = aSpec || { }; var id = spec.id; if (!id) throw new Error(arguments.callee.name + ": Category ID not specified."); return this.getCategories({ attribute: "id", value: "category-" + id })[0]; }
[ "function", "addonsManager_getCategoryById", "(", "aSpec", ")", "{", "var", "spec", "=", "aSpec", "||", "{", "}", ";", "var", "id", "=", "spec", ".", "id", ";", "if", "(", "!", "id", ")", "throw", "new", "Error", "(", "arguments", ".", "callee", ".",...
Get the category element for the specified id @param {object} aSpec Information for getting a category Elements: id - Category id (search, discover, languages, searchengines, extensions, themes, plugins, availableUpdates, recentUpdates) @returns Category @type {ElemBase}
[ "Get", "the", "category", "element", "for", "the", "specified", "id" ]
38d5e4440b2c866a78a1ccb2a18d9795a1bdeafd
https://github.com/SeleniumHQ/selenium/blob/38d5e4440b2c866a78a1ccb2a18d9795a1bdeafd/third_party/js/mozmill/shared-modules/addons.js#L656-L667
412
SeleniumHQ/selenium
third_party/js/mozmill/shared-modules/addons.js
addonsManager_getCategoryId
function addonsManager_getCategoryId(aSpec) { var spec = aSpec || { }; var category = spec.category; if (!category) throw new Error(arguments.callee.name + ": Category not specified."); return category.getNode().id; }
javascript
function addonsManager_getCategoryId(aSpec) { var spec = aSpec || { }; var category = spec.category; if (!category) throw new Error(arguments.callee.name + ": Category not specified."); return category.getNode().id; }
[ "function", "addonsManager_getCategoryId", "(", "aSpec", ")", "{", "var", "spec", "=", "aSpec", "||", "{", "}", ";", "var", "category", "=", "spec", ".", "category", ";", "if", "(", "!", "category", ")", "throw", "new", "Error", "(", "arguments", ".", ...
Get the ID of the given category element @param {object} aSpec Information for getting a category Elements: category - Category to get the id from @returns Category Id @type {string}
[ "Get", "the", "ID", "of", "the", "given", "category", "element" ]
38d5e4440b2c866a78a1ccb2a18d9795a1bdeafd
https://github.com/SeleniumHQ/selenium/blob/38d5e4440b2c866a78a1ccb2a18d9795a1bdeafd/third_party/js/mozmill/shared-modules/addons.js#L679-L687
413
SeleniumHQ/selenium
third_party/js/mozmill/shared-modules/addons.js
addonsManager_setCategory
function addonsManager_setCategory(aSpec) { var spec = aSpec || { }; var category = spec.category; var waitFor = (spec.waitFor == undefined) ? true : spec.waitFor; if (!category) throw new Error(arguments.callee.name + ": Category not specified."); this._controller.click(category); if (...
javascript
function addonsManager_setCategory(aSpec) { var spec = aSpec || { }; var category = spec.category; var waitFor = (spec.waitFor == undefined) ? true : spec.waitFor; if (!category) throw new Error(arguments.callee.name + ": Category not specified."); this._controller.click(category); if (...
[ "function", "addonsManager_setCategory", "(", "aSpec", ")", "{", "var", "spec", "=", "aSpec", "||", "{", "}", ";", "var", "category", "=", "spec", ".", "category", ";", "var", "waitFor", "=", "(", "spec", ".", "waitFor", "==", "undefined", ")", "?", "t...
Select the given category @param {object} aSpec Information for selecting a category Elements: category - Category element waitFor - Wait until the category has been selected [optional - default: true]
[ "Select", "the", "given", "category" ]
38d5e4440b2c866a78a1ccb2a18d9795a1bdeafd
https://github.com/SeleniumHQ/selenium/blob/38d5e4440b2c866a78a1ccb2a18d9795a1bdeafd/third_party/js/mozmill/shared-modules/addons.js#L698-L710
414
SeleniumHQ/selenium
third_party/js/mozmill/shared-modules/addons.js
addonsManager_setCategoryById
function addonsManager_setCategoryById(aSpec) { var spec = aSpec || { }; var id = spec.id; var waitFor = (spec.waitFor == undefined) ? true : spec.waitFor; if (!id) throw new Error(arguments.callee.name + ": Category ID not specified."); // Retrieve the category and set it as active var ...
javascript
function addonsManager_setCategoryById(aSpec) { var spec = aSpec || { }; var id = spec.id; var waitFor = (spec.waitFor == undefined) ? true : spec.waitFor; if (!id) throw new Error(arguments.callee.name + ": Category ID not specified."); // Retrieve the category and set it as active var ...
[ "function", "addonsManager_setCategoryById", "(", "aSpec", ")", "{", "var", "spec", "=", "aSpec", "||", "{", "}", ";", "var", "id", "=", "spec", ".", "id", ";", "var", "waitFor", "=", "(", "spec", ".", "waitFor", "==", "undefined", ")", "?", "true", ...
Select the category with the given id @param {object} aSpec Information for selecting a category Elements: id - Category id (search, discover, languages, searchengines, extensions, themes, plugins, availableUpdates, recentUpdates) waitFor - Wait until the category has been selected [optional - default: true]
[ "Select", "the", "category", "with", "the", "given", "id" ]
38d5e4440b2c866a78a1ccb2a18d9795a1bdeafd
https://github.com/SeleniumHQ/selenium/blob/38d5e4440b2c866a78a1ccb2a18d9795a1bdeafd/third_party/js/mozmill/shared-modules/addons.js#L723-L737
415
SeleniumHQ/selenium
third_party/js/mozmill/shared-modules/addons.js
addonsManager_waitForCategory
function addonsManager_waitForCategory(aSpec) { var spec = aSpec || { }; var category = spec.category; var timeout = (spec.timeout == undefined) ? TIMEOUT : spec.timeout; if (!category) throw new Error(arguments.callee.name + ": Category not specified."); // TODO: restore after 1.5.1 has lan...
javascript
function addonsManager_waitForCategory(aSpec) { var spec = aSpec || { }; var category = spec.category; var timeout = (spec.timeout == undefined) ? TIMEOUT : spec.timeout; if (!category) throw new Error(arguments.callee.name + ": Category not specified."); // TODO: restore after 1.5.1 has lan...
[ "function", "addonsManager_waitForCategory", "(", "aSpec", ")", "{", "var", "spec", "=", "aSpec", "||", "{", "}", ";", "var", "category", "=", "spec", ".", "category", ";", "var", "timeout", "=", "(", "spec", ".", "timeout", "==", "undefined", ")", "?", ...
Wait until the specified category has been selected @param {object} aSpec Object with parameters for customization Elements: category - Category element to wait for timeout - Duration to wait for the target state [optional - default: 5s]
[ "Wait", "until", "the", "specified", "category", "has", "been", "selected" ]
38d5e4440b2c866a78a1ccb2a18d9795a1bdeafd
https://github.com/SeleniumHQ/selenium/blob/38d5e4440b2c866a78a1ccb2a18d9795a1bdeafd/third_party/js/mozmill/shared-modules/addons.js#L748-L765
416
SeleniumHQ/selenium
third_party/js/mozmill/shared-modules/addons.js
addonsManager_search
function addonsManager_search(aSpec) { var spec = aSpec || { }; var value = spec.value; var timeout = (spec.timeout == undefined) ? TIMEOUT_SEARCH : spec.timeout; var waitFor = (spec.waitFor == undefined) ? true : spec.waitFor; if (!value) throw new Error(arguments.callee.name + ": Search ter...
javascript
function addonsManager_search(aSpec) { var spec = aSpec || { }; var value = spec.value; var timeout = (spec.timeout == undefined) ? TIMEOUT_SEARCH : spec.timeout; var waitFor = (spec.waitFor == undefined) ? true : spec.waitFor; if (!value) throw new Error(arguments.callee.name + ": Search ter...
[ "function", "addonsManager_search", "(", "aSpec", ")", "{", "var", "spec", "=", "aSpec", "||", "{", "}", ";", "var", "value", "=", "spec", ".", "value", ";", "var", "timeout", "=", "(", "spec", ".", "timeout", "==", "undefined", ")", "?", "TIMEOUT_SEAR...
Search for a specified add-on @param {object} aSpec Information to execute the search Elements: value - Search term timeout - Duration to wait for search results [optional - default: 30s] waitFor - Wait until the search has been finished [optional - default: true]
[ "Search", "for", "a", "specified", "add", "-", "on" ]
38d5e4440b2c866a78a1ccb2a18d9795a1bdeafd
https://github.com/SeleniumHQ/selenium/blob/38d5e4440b2c866a78a1ccb2a18d9795a1bdeafd/third_party/js/mozmill/shared-modules/addons.js#L793-L810
417
SeleniumHQ/selenium
third_party/js/mozmill/shared-modules/addons.js
addonsManager_getSearchFilter
function addonsManager_getSearchFilter(aSpec) { var spec = aSpec || { }; return this.getElements({ type: "search_filterRadioButtons", subtype: spec.attribute, value: spec.value }); }
javascript
function addonsManager_getSearchFilter(aSpec) { var spec = aSpec || { }; return this.getElements({ type: "search_filterRadioButtons", subtype: spec.attribute, value: spec.value }); }
[ "function", "addonsManager_getSearchFilter", "(", "aSpec", ")", "{", "var", "spec", "=", "aSpec", "||", "{", "}", ";", "return", "this", ".", "getElements", "(", "{", "type", ":", "\"search_filterRadioButtons\"", ",", "subtype", ":", "spec", ".", "attribute", ...
Returns the available search filters which match the filter criteria @param {object} aSpec Information about the filter to apply Elements: attribute - DOM attribute of the wanted filter [optional - default: ""] value - Value of the DOM attribute [optional - default: ""] @returns List of search filters @type {arra...
[ "Returns", "the", "available", "search", "filters", "which", "match", "the", "filter", "criteria" ]
38d5e4440b2c866a78a1ccb2a18d9795a1bdeafd
https://github.com/SeleniumHQ/selenium/blob/38d5e4440b2c866a78a1ccb2a18d9795a1bdeafd/third_party/js/mozmill/shared-modules/addons.js#L867-L875
418
SeleniumHQ/selenium
third_party/js/mozmill/shared-modules/addons.js
addonsManager_getSearchFilterByValue
function addonsManager_getSearchFilterByValue(aValue) { if (!aValue) throw new Error(arguments.callee.name + ": Search filter value not specified."); return this.getElement({ type: "search_filterRadioGroup", subtype: "value", value: aValue }); }
javascript
function addonsManager_getSearchFilterByValue(aValue) { if (!aValue) throw new Error(arguments.callee.name + ": Search filter value not specified."); return this.getElement({ type: "search_filterRadioGroup", subtype: "value", value: aValue }); }
[ "function", "addonsManager_getSearchFilterByValue", "(", "aValue", ")", "{", "if", "(", "!", "aValue", ")", "throw", "new", "Error", "(", "arguments", ".", "callee", ".", "name", "+", "\": Search filter value not specified.\"", ")", ";", "return", "this", ".", "...
Get the search filter element for the specified value @param {string} aValue Search filter value (local, remote) @returns Search filter element @type {ElemBase}
[ "Get", "the", "search", "filter", "element", "for", "the", "specified", "value" ]
38d5e4440b2c866a78a1ccb2a18d9795a1bdeafd
https://github.com/SeleniumHQ/selenium/blob/38d5e4440b2c866a78a1ccb2a18d9795a1bdeafd/third_party/js/mozmill/shared-modules/addons.js#L886-L895
419
SeleniumHQ/selenium
third_party/js/mozmill/shared-modules/addons.js
addonsManager_getSearchFilterValue
function addonsManager_getSearchFilterValue(aSpec) { var spec = aSpec || { }; var filter = spec.filter; if (!filter) throw new Error(arguments.callee.name + ": Search filter not specified."); return filter.getNode().value; }
javascript
function addonsManager_getSearchFilterValue(aSpec) { var spec = aSpec || { }; var filter = spec.filter; if (!filter) throw new Error(arguments.callee.name + ": Search filter not specified."); return filter.getNode().value; }
[ "function", "addonsManager_getSearchFilterValue", "(", "aSpec", ")", "{", "var", "spec", "=", "aSpec", "||", "{", "}", ";", "var", "filter", "=", "spec", ".", "filter", ";", "if", "(", "!", "filter", ")", "throw", "new", "Error", "(", "arguments", ".", ...
Get the value of the given search filter element @param {object} aSpec Information for getting the views matched by the criteria Elements: filter - Filter element @returns Value of the search filter @type {string}
[ "Get", "the", "value", "of", "the", "given", "search", "filter", "element" ]
38d5e4440b2c866a78a1ccb2a18d9795a1bdeafd
https://github.com/SeleniumHQ/selenium/blob/38d5e4440b2c866a78a1ccb2a18d9795a1bdeafd/third_party/js/mozmill/shared-modules/addons.js#L907-L915
420
SeleniumHQ/selenium
third_party/js/mozmill/shared-modules/addons.js
addonsManager_waitForSearchFilter
function addonsManager_waitForSearchFilter(aSpec) { var spec = aSpec || { }; var filter = spec.filter; var timeout = (spec.timeout == undefined) ? TIMEOUT : spec.timeout; if (!filter) throw new Error(arguments.callee.name + ": Search filter not specified."); // TODO: restore after 1.5.1 has ...
javascript
function addonsManager_waitForSearchFilter(aSpec) { var spec = aSpec || { }; var filter = spec.filter; var timeout = (spec.timeout == undefined) ? TIMEOUT : spec.timeout; if (!filter) throw new Error(arguments.callee.name + ": Search filter not specified."); // TODO: restore after 1.5.1 has ...
[ "function", "addonsManager_waitForSearchFilter", "(", "aSpec", ")", "{", "var", "spec", "=", "aSpec", "||", "{", "}", ";", "var", "filter", "=", "spec", ".", "filter", ";", "var", "timeout", "=", "(", "spec", ".", "timeout", "==", "undefined", ")", "?", ...
Waits until the specified search filter has been selected @param {object} aSpec Object with parameters for customization Elements: filter - Filter element to wait for timeout - Duration to wait for the target state [optional - default: 5s]
[ "Waits", "until", "the", "specified", "search", "filter", "has", "been", "selected" ]
38d5e4440b2c866a78a1ccb2a18d9795a1bdeafd
https://github.com/SeleniumHQ/selenium/blob/38d5e4440b2c866a78a1ccb2a18d9795a1bdeafd/third_party/js/mozmill/shared-modules/addons.js#L926-L944
421
SeleniumHQ/selenium
third_party/js/mozmill/shared-modules/addons.js
addonsManager_getSearchResults
function addonsManager_getSearchResults() { var filterValue = this.getSearchFilterValue({ filter: this.selectedSearchFilter }); switch (filterValue) { case "local": return this.getAddons({attribute: "status", value: "installed"}); case "remote": return this.getAddons({attr...
javascript
function addonsManager_getSearchResults() { var filterValue = this.getSearchFilterValue({ filter: this.selectedSearchFilter }); switch (filterValue) { case "local": return this.getAddons({attribute: "status", value: "installed"}); case "remote": return this.getAddons({attr...
[ "function", "addonsManager_getSearchResults", "(", ")", "{", "var", "filterValue", "=", "this", ".", "getSearchFilterValue", "(", "{", "filter", ":", "this", ".", "selectedSearchFilter", "}", ")", ";", "switch", "(", "filterValue", ")", "{", "case", "\"local\"",...
Returns the list of add-ons found by the selected filter @returns List of add-ons @type {ElemBase}
[ "Returns", "the", "list", "of", "add", "-", "ons", "found", "by", "the", "selected", "filter" ]
38d5e4440b2c866a78a1ccb2a18d9795a1bdeafd
https://github.com/SeleniumHQ/selenium/blob/38d5e4440b2c866a78a1ccb2a18d9795a1bdeafd/third_party/js/mozmill/shared-modules/addons.js#L952-L966
422
SeleniumHQ/selenium
third_party/js/mozmill/shared-modules/addons.js
addonsManager_waitForSearchFinished
function addonsManager_waitForSearchFinished(aSpec) { var spec = aSpec || { }; var timeout = (spec.timeout == undefined) ? TIMEOUT_SEARCH : spec.timeout; // TODO: restore after 1.5.1 has landed // var self = this; // // mozmill.utils.waitFor(function () { // return self.isSearching == fa...
javascript
function addonsManager_waitForSearchFinished(aSpec) { var spec = aSpec || { }; var timeout = (spec.timeout == undefined) ? TIMEOUT_SEARCH : spec.timeout; // TODO: restore after 1.5.1 has landed // var self = this; // // mozmill.utils.waitFor(function () { // return self.isSearching == fa...
[ "function", "addonsManager_waitForSearchFinished", "(", "aSpec", ")", "{", "var", "spec", "=", "aSpec", "||", "{", "}", ";", "var", "timeout", "=", "(", "spec", ".", "timeout", "==", "undefined", ")", "?", "TIMEOUT_SEARCH", ":", "spec", ".", "timeout", ";"...
Waits until the active search has been finished @param {object} aSpec Object with parameters for customization Elements: timeout - Duration to wait for the target state
[ "Waits", "until", "the", "active", "search", "has", "been", "finished" ]
38d5e4440b2c866a78a1ccb2a18d9795a1bdeafd
https://github.com/SeleniumHQ/selenium/blob/38d5e4440b2c866a78a1ccb2a18d9795a1bdeafd/third_party/js/mozmill/shared-modules/addons.js#L975-L988
423
SeleniumHQ/selenium
third_party/js/mozmill/shared-modules/addons.js
addToWhiteList
function addToWhiteList(aDomain) { pm.add(utils.createURI(aDomain), "install", Ci.nsIPermissionManager.ALLOW_ACTION); }
javascript
function addToWhiteList(aDomain) { pm.add(utils.createURI(aDomain), "install", Ci.nsIPermissionManager.ALLOW_ACTION); }
[ "function", "addToWhiteList", "(", "aDomain", ")", "{", "pm", ".", "add", "(", "utils", ".", "createURI", "(", "aDomain", ")", ",", "\"install\"", ",", "Ci", ".", "nsIPermissionManager", ".", "ALLOW_ACTION", ")", ";", "}" ]
Whitelist permission for the specified domain @param {string} aDomain The domain to add the permission for
[ "Whitelist", "permission", "for", "the", "specified", "domain" ]
38d5e4440b2c866a78a1ccb2a18d9795a1bdeafd
https://github.com/SeleniumHQ/selenium/blob/38d5e4440b2c866a78a1ccb2a18d9795a1bdeafd/third_party/js/mozmill/shared-modules/addons.js#L1234-L1238
424
SeleniumHQ/selenium
third_party/closure/goog/i18n/dateintervalformat.js
function( pattern, opt_dateIntervalSymbols, opt_dateTimeSymbols) { asserts.assert(goog.isDef(pattern), 'Pattern must be defined.'); asserts.assert( goog.isDef(opt_dateIntervalSymbols) || goog.isDef(dateIntervalSymbols.getDateIntervalSymbols()), 'goog.i18n.DateIntervalSymbols or explicit sy...
javascript
function( pattern, opt_dateIntervalSymbols, opt_dateTimeSymbols) { asserts.assert(goog.isDef(pattern), 'Pattern must be defined.'); asserts.assert( goog.isDef(opt_dateIntervalSymbols) || goog.isDef(dateIntervalSymbols.getDateIntervalSymbols()), 'goog.i18n.DateIntervalSymbols or explicit sy...
[ "function", "(", "pattern", ",", "opt_dateIntervalSymbols", ",", "opt_dateTimeSymbols", ")", "{", "asserts", ".", "assert", "(", "goog", ".", "isDef", "(", "pattern", ")", ",", "'Pattern must be defined.'", ")", ";", "asserts", ".", "assert", "(", "goog", ".",...
Constructs a DateIntervalFormat object based on the current locale. @param {number|!dateIntervalSymbols.DateIntervalPatternMap} pattern Pattern specification or pattern object. @param {!dateIntervalSymbols.DateIntervalSymbols=} opt_dateIntervalSymbols Optional DateIntervalSymbols to use for this instance rather than t...
[ "Constructs", "a", "DateIntervalFormat", "object", "based", "on", "the", "current", "locale", "." ]
38d5e4440b2c866a78a1ccb2a18d9795a1bdeafd
https://github.com/SeleniumHQ/selenium/blob/38d5e4440b2c866a78a1ccb2a18d9795a1bdeafd/third_party/closure/goog/i18n/dateintervalformat.js#L80-L153
425
SeleniumHQ/selenium
third_party/closure/goog/i18n/dateintervalformat.js
function( firstPattern, secondPattern, dateTimeSymbols, useFirstDateOnFirstPattern) { /** * Formatter_ to format the first part of the date interval. * @private {!DateTimeFormat} */ this.firstPartFormatter_ = new DateTimeFormat(firstPattern, dateTimeSymbols); /** * Formatter_ to format the second...
javascript
function( firstPattern, secondPattern, dateTimeSymbols, useFirstDateOnFirstPattern) { /** * Formatter_ to format the first part of the date interval. * @private {!DateTimeFormat} */ this.firstPartFormatter_ = new DateTimeFormat(firstPattern, dateTimeSymbols); /** * Formatter_ to format the second...
[ "function", "(", "firstPattern", ",", "secondPattern", ",", "dateTimeSymbols", ",", "useFirstDateOnFirstPattern", ")", "{", "/**\n * Formatter_ to format the first part of the date interval.\n * @private {!DateTimeFormat}\n */", "this", ".", "firstPartFormatter_", "=", "new", ...
Constructs an IntervalFormatter_ object which implements the Formatter_ interface. Internal object to construct and store a goog.i18n.DateTimeFormat for each part of the date interval pattern. @param {string} firstPattern First part of the date interval pattern. @param {string} secondPattern Second part of the date i...
[ "Constructs", "an", "IntervalFormatter_", "object", "which", "implements", "the", "Formatter_", "interface", "." ]
38d5e4440b2c866a78a1ccb2a18d9795a1bdeafd
https://github.com/SeleniumHQ/selenium/blob/38d5e4440b2c866a78a1ccb2a18d9795a1bdeafd/third_party/closure/goog/i18n/dateintervalformat.js#L556-L577
426
SeleniumHQ/selenium
third_party/closure/goog/i18n/dateintervalformat.js
function( dateTimePattern, fallbackPattern, dateTimeSymbols) { /** * Date time pattern used to format the dates. * @private {string} */ this.dateTimePattern_ = dateTimePattern; /** * Date time formatter used to format the dates. * @private {!DateTimeFormat} */ this.dateTimeFormatter_ = ...
javascript
function( dateTimePattern, fallbackPattern, dateTimeSymbols) { /** * Date time pattern used to format the dates. * @private {string} */ this.dateTimePattern_ = dateTimePattern; /** * Date time formatter used to format the dates. * @private {!DateTimeFormat} */ this.dateTimeFormatter_ = ...
[ "function", "(", "dateTimePattern", ",", "fallbackPattern", ",", "dateTimeSymbols", ")", "{", "/**\n * Date time pattern used to format the dates.\n * @private {string}\n */", "this", ".", "dateTimePattern_", "=", "dateTimePattern", ";", "/**\n * Date time formatter used to f...
Constructs a DateTimeFormatter_ object which implements the Formatter_ interface. Internal object to construct and store a goog.i18n.DateTimeFormat for the a datetime pattern and formats dates using the fallback interval pattern (e.g. '{0} – {1}'). @param {string} dateTimePattern Datetime pattern used to format the d...
[ "Constructs", "a", "DateTimeFormatter_", "object", "which", "implements", "the", "Formatter_", "interface", "." ]
38d5e4440b2c866a78a1ccb2a18d9795a1bdeafd
https://github.com/SeleniumHQ/selenium/blob/38d5e4440b2c866a78a1ccb2a18d9795a1bdeafd/third_party/closure/goog/i18n/dateintervalformat.js#L608-L628
427
SeleniumHQ/selenium
javascript/node/selenium-webdriver/lib/capabilities.js
toMap
function toMap(hash) { let m = new Map; for (let key in hash) { if (hash.hasOwnProperty(key)) { m.set(key, hash[key]); } } return m; }
javascript
function toMap(hash) { let m = new Map; for (let key in hash) { if (hash.hasOwnProperty(key)) { m.set(key, hash[key]); } } return m; }
[ "function", "toMap", "(", "hash", ")", "{", "let", "m", "=", "new", "Map", ";", "for", "(", "let", "key", "in", "hash", ")", "{", "if", "(", "hash", ".", "hasOwnProperty", "(", "key", ")", ")", "{", "m", ".", "set", "(", "key", ",", "hash", "...
Converts a generic hash object to a map. @param {!Object<string, ?>} hash The hash object. @return {!Map<string, ?>} The converted map.
[ "Converts", "a", "generic", "hash", "object", "to", "a", "map", "." ]
38d5e4440b2c866a78a1ccb2a18d9795a1bdeafd
https://github.com/SeleniumHQ/selenium/blob/38d5e4440b2c866a78a1ccb2a18d9795a1bdeafd/javascript/node/selenium-webdriver/lib/capabilities.js#L223-L231
428
SeleniumHQ/selenium
third_party/js/mozmill/shared-modules/search.js
preferencesDialog_close
function preferencesDialog_close(saveChanges) { saveChanges = (saveChanges == undefined) ? false : saveChanges; var button = this.getElement({type: "button", subtype: (saveChanges ? "accept" : "cancel")}); this._controller.click(button); }
javascript
function preferencesDialog_close(saveChanges) { saveChanges = (saveChanges == undefined) ? false : saveChanges; var button = this.getElement({type: "button", subtype: (saveChanges ? "accept" : "cancel")}); this._controller.click(button); }
[ "function", "preferencesDialog_close", "(", "saveChanges", ")", "{", "saveChanges", "=", "(", "saveChanges", "==", "undefined", ")", "?", "false", ":", "saveChanges", ";", "var", "button", "=", "this", ".", "getElement", "(", "{", "type", ":", "\"button\"", ...
Close the engine manager @param {MozMillController} controller MozMillController of the window to operate on @param {boolean} saveChanges (Optional) If true the OK button is clicked otherwise Cancel
[ "Close", "the", "engine", "manager" ]
38d5e4440b2c866a78a1ccb2a18d9795a1bdeafd
https://github.com/SeleniumHQ/selenium/blob/38d5e4440b2c866a78a1ccb2a18d9795a1bdeafd/third_party/js/mozmill/shared-modules/search.js#L202-L207
429
SeleniumHQ/selenium
third_party/js/mozmill/shared-modules/search.js
engineManager_editKeyword
function engineManager_editKeyword(name, handler) { // Select the search engine this.selectedEngine = name; // Setup the modal dialog handler md = new modalDialog.modalDialog(this._controller.window); md.start(handler); var button = this.getElement({type: "engine_button", subtype: "edit"}); ...
javascript
function engineManager_editKeyword(name, handler) { // Select the search engine this.selectedEngine = name; // Setup the modal dialog handler md = new modalDialog.modalDialog(this._controller.window); md.start(handler); var button = this.getElement({type: "engine_button", subtype: "edit"}); ...
[ "function", "engineManager_editKeyword", "(", "name", ",", "handler", ")", "{", "// Select the search engine", "this", ".", "selectedEngine", "=", "name", ";", "// Setup the modal dialog handler", "md", "=", "new", "modalDialog", ".", "modalDialog", "(", "this", ".", ...
Edit the keyword associated to a search engine @param {string} name Name of the engine to remove @param {function} handler Callback function for Engine Manager
[ "Edit", "the", "keyword", "associated", "to", "a", "search", "engine" ]
38d5e4440b2c866a78a1ccb2a18d9795a1bdeafd
https://github.com/SeleniumHQ/selenium/blob/38d5e4440b2c866a78a1ccb2a18d9795a1bdeafd/third_party/js/mozmill/shared-modules/search.js#L217-L229
430
SeleniumHQ/selenium
third_party/js/mozmill/shared-modules/search.js
engineManager_moveUpEngine
function engineManager_moveUpEngine(name) { this.selectedEngine = name; var index = this.selectedIndex; var button = this.getElement({type: "engine_button", subtype: "up"}); this._controller.click(button); this._controller.waitForEval("subject.manager.selectedIndex == subject.oldIndex - 1", TIMEOU...
javascript
function engineManager_moveUpEngine(name) { this.selectedEngine = name; var index = this.selectedIndex; var button = this.getElement({type: "engine_button", subtype: "up"}); this._controller.click(button); this._controller.waitForEval("subject.manager.selectedIndex == subject.oldIndex - 1", TIMEOU...
[ "function", "engineManager_moveUpEngine", "(", "name", ")", "{", "this", ".", "selectedEngine", "=", "name", ";", "var", "index", "=", "this", ".", "selectedIndex", ";", "var", "button", "=", "this", ".", "getElement", "(", "{", "type", ":", "\"engine_button...
Move up the engine with the given name @param {string} name Name of the engine to remove
[ "Move", "up", "the", "engine", "with", "the", "given", "name" ]
38d5e4440b2c866a78a1ccb2a18d9795a1bdeafd
https://github.com/SeleniumHQ/selenium/blob/38d5e4440b2c866a78a1ccb2a18d9795a1bdeafd/third_party/js/mozmill/shared-modules/search.js#L328-L337
431
SeleniumHQ/selenium
third_party/js/mozmill/shared-modules/search.js
engineManager_removeEngine
function engineManager_removeEngine(name) { this.selectedEngine = name; var button = this.getElement({type: "engine_button", subtype: "remove"}); this._controller.click(button); this._controller.waitForEval("subject.manager.selectedEngine != subject.removedEngine", TIMEOUT, 100, ...
javascript
function engineManager_removeEngine(name) { this.selectedEngine = name; var button = this.getElement({type: "engine_button", subtype: "remove"}); this._controller.click(button); this._controller.waitForEval("subject.manager.selectedEngine != subject.removedEngine", TIMEOUT, 100, ...
[ "function", "engineManager_removeEngine", "(", "name", ")", "{", "this", ".", "selectedEngine", "=", "name", ";", "var", "button", "=", "this", ".", "getElement", "(", "{", "type", ":", "\"engine_button\"", ",", "subtype", ":", "\"remove\"", "}", ")", ";", ...
Remove the engine with the given name @param {string} name Name of the engine to remove
[ "Remove", "the", "engine", "with", "the", "given", "name" ]
38d5e4440b2c866a78a1ccb2a18d9795a1bdeafd
https://github.com/SeleniumHQ/selenium/blob/38d5e4440b2c866a78a1ccb2a18d9795a1bdeafd/third_party/js/mozmill/shared-modules/search.js#L345-L353
432
SeleniumHQ/selenium
third_party/js/mozmill/shared-modules/search.js
searchBar_checkSearchResultPage
function searchBar_checkSearchResultPage(searchTerm) { // Retrieve the URL which is used for the currently selected search engine var targetUrl = this._bss.currentEngine.getSubmission(searchTerm, null).uri; var currentUrl = this._controller.tabs.activeTabWindow.document.location.href; // Check if pure ...
javascript
function searchBar_checkSearchResultPage(searchTerm) { // Retrieve the URL which is used for the currently selected search engine var targetUrl = this._bss.currentEngine.getSubmission(searchTerm, null).uri; var currentUrl = this._controller.tabs.activeTabWindow.document.location.href; // Check if pure ...
[ "function", "searchBar_checkSearchResultPage", "(", "searchTerm", ")", "{", "// Retrieve the URL which is used for the currently selected search engine", "var", "targetUrl", "=", "this", ".", "_bss", ".", "currentEngine", ".", "getSubmission", "(", "searchTerm", ",", "null", ...
Checks if the correct target URL has been opened for the search @param {string} searchTerm Text which should be checked for
[ "Checks", "if", "the", "correct", "target", "URL", "has", "been", "opened", "for", "the", "search" ]
38d5e4440b2c866a78a1ccb2a18d9795a1bdeafd
https://github.com/SeleniumHQ/selenium/blob/38d5e4440b2c866a78a1ccb2a18d9795a1bdeafd/third_party/js/mozmill/shared-modules/search.js#L513-L528
433
SeleniumHQ/selenium
third_party/js/mozmill/shared-modules/search.js
searchBar_clear
function searchBar_clear() { var activeElement = this._controller.window.document.activeElement; var searchInput = this.getElement({type: "searchBar_input"}); var cmdKey = utils.getEntity(this.getDtds(), "selectAllCmd.key"); this._controller.keypress(searchInput, cmdKey, {accelKey: true}); this._...
javascript
function searchBar_clear() { var activeElement = this._controller.window.document.activeElement; var searchInput = this.getElement({type: "searchBar_input"}); var cmdKey = utils.getEntity(this.getDtds(), "selectAllCmd.key"); this._controller.keypress(searchInput, cmdKey, {accelKey: true}); this._...
[ "function", "searchBar_clear", "(", ")", "{", "var", "activeElement", "=", "this", ".", "_controller", ".", "window", ".", "document", ".", "activeElement", ";", "var", "searchInput", "=", "this", ".", "getElement", "(", "{", "type", ":", "\"searchBar_input\""...
Clear the search field
[ "Clear", "the", "search", "field" ]
38d5e4440b2c866a78a1ccb2a18d9795a1bdeafd
https://github.com/SeleniumHQ/selenium/blob/38d5e4440b2c866a78a1ccb2a18d9795a1bdeafd/third_party/js/mozmill/shared-modules/search.js#L533-L544
434
SeleniumHQ/selenium
third_party/js/mozmill/shared-modules/search.js
searchBar_focus
function searchBar_focus(event) { var input = this.getElement({type: "searchBar_input"}); switch (event.type) { case "click": this._controller.click(input); break; case "shortcut": if (mozmill.isLinux) { var cmdKey = utils.getEntity(this.getDtds(), "searchFocusUn...
javascript
function searchBar_focus(event) { var input = this.getElement({type: "searchBar_input"}); switch (event.type) { case "click": this._controller.click(input); break; case "shortcut": if (mozmill.isLinux) { var cmdKey = utils.getEntity(this.getDtds(), "searchFocusUn...
[ "function", "searchBar_focus", "(", "event", ")", "{", "var", "input", "=", "this", ".", "getElement", "(", "{", "type", ":", "\"searchBar_input\"", "}", ")", ";", "switch", "(", "event", ".", "type", ")", "{", "case", "\"click\"", ":", "this", ".", "_...
Focus the search bar text field @param {object} event Specifies the event which has to be used to focus the search bar
[ "Focus", "the", "search", "bar", "text", "field" ]
38d5e4440b2c866a78a1ccb2a18d9795a1bdeafd
https://github.com/SeleniumHQ/selenium/blob/38d5e4440b2c866a78a1ccb2a18d9795a1bdeafd/third_party/js/mozmill/shared-modules/search.js#L552-L576
435
SeleniumHQ/selenium
third_party/js/mozmill/shared-modules/search.js
function(searchTerm) { var suggestions = [ ]; var popup = this.getElement({type: "searchBar_autoCompletePopup"}); var treeElem = this.getElement({type: "searchBar_suggestions"}); // Enter search term and wait for the popup this.type(searchTerm); this._controller.waitForEval("subject.popup.stat...
javascript
function(searchTerm) { var suggestions = [ ]; var popup = this.getElement({type: "searchBar_autoCompletePopup"}); var treeElem = this.getElement({type: "searchBar_suggestions"}); // Enter search term and wait for the popup this.type(searchTerm); this._controller.waitForEval("subject.popup.stat...
[ "function", "(", "searchTerm", ")", "{", "var", "suggestions", "=", "[", "]", ";", "var", "popup", "=", "this", ".", "getElement", "(", "{", "type", ":", "\"searchBar_autoCompletePopup\"", "}", ")", ";", "var", "treeElem", "=", "this", ".", "getElement", ...
Returns the search suggestions for the search term
[ "Returns", "the", "search", "suggestions", "for", "the", "search", "term" ]
38d5e4440b2c866a78a1ccb2a18d9795a1bdeafd
https://github.com/SeleniumHQ/selenium/blob/38d5e4440b2c866a78a1ccb2a18d9795a1bdeafd/third_party/js/mozmill/shared-modules/search.js#L674-L700
436
SeleniumHQ/selenium
third_party/js/mozmill/shared-modules/search.js
searchBar_openEngineManager
function searchBar_openEngineManager(handler) { this.enginesDropDownOpen = true; var engineManager = this.getElement({type: "engine_manager"}); // Setup the modal dialog handler md = new modalDialog.modalDialog(this._controller.window); md.start(handler); // XXX: Bug 555347 - Process any out...
javascript
function searchBar_openEngineManager(handler) { this.enginesDropDownOpen = true; var engineManager = this.getElement({type: "engine_manager"}); // Setup the modal dialog handler md = new modalDialog.modalDialog(this._controller.window); md.start(handler); // XXX: Bug 555347 - Process any out...
[ "function", "searchBar_openEngineManager", "(", "handler", ")", "{", "this", ".", "enginesDropDownOpen", "=", "true", ";", "var", "engineManager", "=", "this", ".", "getElement", "(", "{", "type", ":", "\"engine_manager\"", "}", ")", ";", "// Setup the modal dialo...
Open the Engine Manager @param {function} handler Callback function for Engine Manager
[ "Open", "the", "Engine", "Manager" ]
38d5e4440b2c866a78a1ccb2a18d9795a1bdeafd
https://github.com/SeleniumHQ/selenium/blob/38d5e4440b2c866a78a1ccb2a18d9795a1bdeafd/third_party/js/mozmill/shared-modules/search.js#L720-L737
437
SeleniumHQ/selenium
third_party/js/mozmill/shared-modules/search.js
searchBar_search
function searchBar_search(data) { var searchBar = this.getElement({type: "searchBar"}); this.type(data.text); switch (data.action) { case "returnKey": this._controller.keypress(searchBar, 'VK_RETURN', {}); break; case "goButton": default: this._controller.click(t...
javascript
function searchBar_search(data) { var searchBar = this.getElement({type: "searchBar"}); this.type(data.text); switch (data.action) { case "returnKey": this._controller.keypress(searchBar, 'VK_RETURN', {}); break; case "goButton": default: this._controller.click(t...
[ "function", "searchBar_search", "(", "data", ")", "{", "var", "searchBar", "=", "this", ".", "getElement", "(", "{", "type", ":", "\"searchBar\"", "}", ")", ";", "this", ".", "type", "(", "data", ".", "text", ")", ";", "switch", "(", "data", ".", "ac...
Start a search with the given search term and check if the resulting URL contains the search term. @param {object} data Object which contains the search term and the action type
[ "Start", "a", "search", "with", "the", "given", "search", "term", "and", "check", "if", "the", "resulting", "URL", "contains", "the", "search", "term", "." ]
38d5e4440b2c866a78a1ccb2a18d9795a1bdeafd
https://github.com/SeleniumHQ/selenium/blob/38d5e4440b2c866a78a1ccb2a18d9795a1bdeafd/third_party/js/mozmill/shared-modules/search.js#L783-L800
438
SeleniumHQ/selenium
javascript/selenium-core/xpath/dom.js
XNode
function XNode(type, name, opt_value, opt_owner) { this.attributes = []; this.childNodes = []; XNode.init.call(this, type, name, opt_value, opt_owner); }
javascript
function XNode(type, name, opt_value, opt_owner) { this.attributes = []; this.childNodes = []; XNode.init.call(this, type, name, opt_value, opt_owner); }
[ "function", "XNode", "(", "type", ",", "name", ",", "opt_value", ",", "opt_owner", ")", "{", "this", ".", "attributes", "=", "[", "]", ";", "this", ".", "childNodes", "=", "[", "]", ";", "XNode", ".", "init", ".", "call", "(", "this", ",", "type", ...
Our W3C DOM Node implementation. Note we call it XNode because we can't define the identifier Node. We do this mostly for Opera, where we can't reuse the HTML DOM for parsing our own XML, and for Safari, where it is too expensive to have the template processor operate on native DOM nodes.
[ "Our", "W3C", "DOM", "Node", "implementation", ".", "Note", "we", "call", "it", "XNode", "because", "we", "can", "t", "define", "the", "identifier", "Node", ".", "We", "do", "this", "mostly", "for", "Opera", "where", "we", "can", "t", "reuse", "the", "...
38d5e4440b2c866a78a1ccb2a18d9795a1bdeafd
https://github.com/SeleniumHQ/selenium/blob/38d5e4440b2c866a78a1ccb2a18d9795a1bdeafd/javascript/selenium-core/xpath/dom.js#L265-L270
439
SeleniumHQ/selenium
third_party/closure/goog/base.js
addNewerLanguageTranspilationCheck
function addNewerLanguageTranspilationCheck(modeName, isSupported) { if (transpilationRequiredForAllLaterModes) { requiresTranspilation[modeName] = true; } else if (isSupported()) { requiresTranspilation[modeName] = false; } else { requiresTranspilation[modeName] = true; transpilatio...
javascript
function addNewerLanguageTranspilationCheck(modeName, isSupported) { if (transpilationRequiredForAllLaterModes) { requiresTranspilation[modeName] = true; } else if (isSupported()) { requiresTranspilation[modeName] = false; } else { requiresTranspilation[modeName] = true; transpilatio...
[ "function", "addNewerLanguageTranspilationCheck", "(", "modeName", ",", "isSupported", ")", "{", "if", "(", "transpilationRequiredForAllLaterModes", ")", "{", "requiresTranspilation", "[", "modeName", "]", "=", "true", ";", "}", "else", "if", "(", "isSupported", "("...
Adds an entry to requiresTranspliation for the given language mode. IMPORTANT: Calls must be made in order from oldest to newest language mode. @param {string} modeName @param {function(): boolean} isSupported Returns true if the JS engine supports the given mode.
[ "Adds", "an", "entry", "to", "requiresTranspliation", "for", "the", "given", "language", "mode", "." ]
38d5e4440b2c866a78a1ccb2a18d9795a1bdeafd
https://github.com/SeleniumHQ/selenium/blob/38d5e4440b2c866a78a1ccb2a18d9795a1bdeafd/third_party/closure/goog/base.js#L2853-L2862
440
SeleniumHQ/selenium
third_party/js/mozmill/shared-modules/widgets.js
clickTreeCell
function clickTreeCell(controller, tree, rowIndex, columnIndex, eventDetails) { tree = tree.getNode(); var selection = tree.view.selection; selection.select(rowIndex); tree.treeBoxObject.ensureRowIsVisible(rowIndex); // get cell coordinates var x = {}, y = {}, width = {}, height = {}; var column = tree....
javascript
function clickTreeCell(controller, tree, rowIndex, columnIndex, eventDetails) { tree = tree.getNode(); var selection = tree.view.selection; selection.select(rowIndex); tree.treeBoxObject.ensureRowIsVisible(rowIndex); // get cell coordinates var x = {}, y = {}, width = {}, height = {}; var column = tree....
[ "function", "clickTreeCell", "(", "controller", ",", "tree", ",", "rowIndex", ",", "columnIndex", ",", "eventDetails", ")", "{", "tree", "=", "tree", ".", "getNode", "(", ")", ";", "var", "selection", "=", "tree", ".", "view", ".", "selection", ";", "sel...
Click the specified tree cell @param {MozMillController} controller MozMillController of the browser window to operate on @param {tree} tree Tree to operate on @param {number } rowIndex Index of the row @param {number} columnIndex Index of the column @param {object} eventDetails Details about the mouse event
[ "Click", "the", "specified", "tree", "cell" ]
38d5e4440b2c866a78a1ccb2a18d9795a1bdeafd
https://github.com/SeleniumHQ/selenium/blob/38d5e4440b2c866a78a1ccb2a18d9795a1bdeafd/third_party/js/mozmill/shared-modules/widgets.js#L61-L79
441
SeleniumHQ/selenium
third_party/js/mozmill/shared-modules/software-update.js
softwareUpdate
function softwareUpdate() { this._controller = null; this._wizard = null; this._aus = Cc["@mozilla.org/updates/update-service;1"]. getService(Ci.nsIApplicationUpdateService); this._ums = Cc["@mozilla.org/updates/update-manager;1"]. getService(Ci.nsIUpdateManager); this._vc = Cc["@...
javascript
function softwareUpdate() { this._controller = null; this._wizard = null; this._aus = Cc["@mozilla.org/updates/update-service;1"]. getService(Ci.nsIApplicationUpdateService); this._ums = Cc["@mozilla.org/updates/update-manager;1"]. getService(Ci.nsIUpdateManager); this._vc = Cc["@...
[ "function", "softwareUpdate", "(", ")", "{", "this", ".", "_controller", "=", "null", ";", "this", ".", "_wizard", "=", "null", ";", "this", ".", "_aus", "=", "Cc", "[", "\"@mozilla.org/updates/update-service;1\"", "]", ".", "getService", "(", "Ci", ".", "...
Constructor for software update class
[ "Constructor", "for", "software", "update", "class" ]
38d5e4440b2c866a78a1ccb2a18d9795a1bdeafd
https://github.com/SeleniumHQ/selenium/blob/38d5e4440b2c866a78a1ccb2a18d9795a1bdeafd/third_party/js/mozmill/shared-modules/software-update.js#L101-L111
442
SeleniumHQ/selenium
third_party/js/mozmill/shared-modules/software-update.js
softwareUpdate_assertUpdateApplied
function softwareUpdate_assertUpdateApplied(updateData) { // Get the information from the last update var info = updateData.updates[updateData.updateIndex]; // The upgraded version should be identical with the version given by // the update and we shouldn't have run a downgrade var check = this._vc...
javascript
function softwareUpdate_assertUpdateApplied(updateData) { // Get the information from the last update var info = updateData.updates[updateData.updateIndex]; // The upgraded version should be identical with the version given by // the update and we shouldn't have run a downgrade var check = this._vc...
[ "function", "softwareUpdate_assertUpdateApplied", "(", "updateData", ")", "{", "// Get the information from the last update", "var", "info", "=", "updateData", ".", "updates", "[", "updateData", ".", "updateIndex", "]", ";", "// The upgraded version should be identical with the...
Checks if an update has been applied correctly @param {object} updateData All the data collected during the update process
[ "Checks", "if", "an", "update", "has", "been", "applied", "correctly" ]
38d5e4440b2c866a78a1ccb2a18d9795a1bdeafd
https://github.com/SeleniumHQ/selenium/blob/38d5e4440b2c866a78a1ccb2a18d9795a1bdeafd/third_party/js/mozmill/shared-modules/software-update.js#L242-L262
443
SeleniumHQ/selenium
third_party/js/mozmill/shared-modules/software-update.js
softwareUpdate_closeDialog
function softwareUpdate_closeDialog() { if (this._controller) { this._controller.keypress(null, "VK_ESCAPE", {}); this._controller.sleep(500); this._controller = null; this._wizard = null; } }
javascript
function softwareUpdate_closeDialog() { if (this._controller) { this._controller.keypress(null, "VK_ESCAPE", {}); this._controller.sleep(500); this._controller = null; this._wizard = null; } }
[ "function", "softwareUpdate_closeDialog", "(", ")", "{", "if", "(", "this", ".", "_controller", ")", "{", "this", ".", "_controller", ".", "keypress", "(", "null", ",", "\"VK_ESCAPE\"", ",", "{", "}", ")", ";", "this", ".", "_controller", ".", "sleep", "...
Close the software update dialog
[ "Close", "the", "software", "update", "dialog" ]
38d5e4440b2c866a78a1ccb2a18d9795a1bdeafd
https://github.com/SeleniumHQ/selenium/blob/38d5e4440b2c866a78a1ccb2a18d9795a1bdeafd/third_party/js/mozmill/shared-modules/software-update.js#L267-L274
444
SeleniumHQ/selenium
third_party/js/mozmill/shared-modules/software-update.js
softwareUpdate_download
function softwareUpdate_download(channel, waitForFinish, timeout) { waitForFinish = waitForFinish ? waitForFinish : true; // Check that the correct channel has been set this._controller.assert(function() { return channel == this.channel; }, "The current update channel is identical to the specifie...
javascript
function softwareUpdate_download(channel, waitForFinish, timeout) { waitForFinish = waitForFinish ? waitForFinish : true; // Check that the correct channel has been set this._controller.assert(function() { return channel == this.channel; }, "The current update channel is identical to the specifie...
[ "function", "softwareUpdate_download", "(", "channel", ",", "waitForFinish", ",", "timeout", ")", "{", "waitForFinish", "=", "waitForFinish", "?", "waitForFinish", ":", "true", ";", "// Check that the correct channel has been set", "this", ".", "_controller", ".", "asse...
Download the update of the given channel and type @param {string} channel Update channel to use @param {boolean} waitForFinish Sets if the function should wait until the download has been finished @param {number} timeout Timeout the download has to stop
[ "Download", "the", "update", "of", "the", "given", "channel", "and", "type" ]
38d5e4440b2c866a78a1ccb2a18d9795a1bdeafd
https://github.com/SeleniumHQ/selenium/blob/38d5e4440b2c866a78a1ccb2a18d9795a1bdeafd/third_party/js/mozmill/shared-modules/software-update.js#L285-L306
445
SeleniumHQ/selenium
third_party/js/mozmill/shared-modules/software-update.js
softwareUpdate_openDialog
function softwareUpdate_openDialog(browserController) { // XXX: After Firefox 4 has been released and we do not have to test any // beta release anymore uncomment out the following code // With version >= 4.0b7pre the update dialog is reachable from within the // about window now. var appVersion = ...
javascript
function softwareUpdate_openDialog(browserController) { // XXX: After Firefox 4 has been released and we do not have to test any // beta release anymore uncomment out the following code // With version >= 4.0b7pre the update dialog is reachable from within the // about window now. var appVersion = ...
[ "function", "softwareUpdate_openDialog", "(", "browserController", ")", "{", "// XXX: After Firefox 4 has been released and we do not have to test any", "// beta release anymore uncomment out the following code", "// With version >= 4.0b7pre the update dialog is reachable from within the", "// abo...
Open software update dialog @param {MozMillController} browserController Mozmill controller of the browser window
[ "Open", "software", "update", "dialog" ]
38d5e4440b2c866a78a1ccb2a18d9795a1bdeafd
https://github.com/SeleniumHQ/selenium/blob/38d5e4440b2c866a78a1ccb2a18d9795a1bdeafd/third_party/js/mozmill/shared-modules/software-update.js#L404-L440
446
SeleniumHQ/selenium
third_party/js/mozmill/shared-modules/software-update.js
softwareUpdate_waitForCheckFinished
function softwareUpdate_waitForCheckFinished(timeout) { timeout = timeout ? timeout : gTimeoutUpdateCheck; this._controller.waitFor(function() { return this.currentPage != WIZARD_PAGES.checking; }, "Check for updates has been completed.", timeout, null, this); }
javascript
function softwareUpdate_waitForCheckFinished(timeout) { timeout = timeout ? timeout : gTimeoutUpdateCheck; this._controller.waitFor(function() { return this.currentPage != WIZARD_PAGES.checking; }, "Check for updates has been completed.", timeout, null, this); }
[ "function", "softwareUpdate_waitForCheckFinished", "(", "timeout", ")", "{", "timeout", "=", "timeout", "?", "timeout", ":", "gTimeoutUpdateCheck", ";", "this", ".", "_controller", ".", "waitFor", "(", "function", "(", ")", "{", "return", "this", ".", "currentPa...
Wait that check for updates has been finished @param {number} timeout
[ "Wait", "that", "check", "for", "updates", "has", "been", "finished" ]
38d5e4440b2c866a78a1ccb2a18d9795a1bdeafd
https://github.com/SeleniumHQ/selenium/blob/38d5e4440b2c866a78a1ccb2a18d9795a1bdeafd/third_party/js/mozmill/shared-modules/software-update.js#L446-L452
447
SeleniumHQ/selenium
third_party/js/mozmill/shared-modules/software-update.js
softwareUpdate_waitForDialogOpen
function softwareUpdate_waitForDialogOpen(browserController) { this._controller = utils.handleWindow("type", "Update:Wizard", null, true); this._wizard = this.getElement({type: "wizard"}); this._controller.waitFor(function() { return this.currentPage...
javascript
function softwareUpdate_waitForDialogOpen(browserController) { this._controller = utils.handleWindow("type", "Update:Wizard", null, true); this._wizard = this.getElement({type: "wizard"}); this._controller.waitFor(function() { return this.currentPage...
[ "function", "softwareUpdate_waitForDialogOpen", "(", "browserController", ")", "{", "this", ".", "_controller", "=", "utils", ".", "handleWindow", "(", "\"type\"", ",", "\"Update:Wizard\"", ",", "null", ",", "true", ")", ";", "this", ".", "_wizard", "=", "this",...
Wait for the software update dialog @param {MozMillController} browserController Mozmill controller of the browser window
[ "Wait", "for", "the", "software", "update", "dialog" ]
38d5e4440b2c866a78a1ccb2a18d9795a1bdeafd
https://github.com/SeleniumHQ/selenium/blob/38d5e4440b2c866a78a1ccb2a18d9795a1bdeafd/third_party/js/mozmill/shared-modules/software-update.js#L460-L470
448
SeleniumHQ/selenium
third_party/js/mozmill/shared-modules/software-update.js
softwareUpdate_waitForDownloadFinished
function softwareUpdate_waitForDownloadFinished(timeout) { timeout = timeout ? timeout : gTimeoutUpdateDownload; var progress = this.getElement({type: "download_progress"}); this._controller.waitFor(function() { return progress.getNode().value == 100; }, "Update has been finished downloading.", ...
javascript
function softwareUpdate_waitForDownloadFinished(timeout) { timeout = timeout ? timeout : gTimeoutUpdateDownload; var progress = this.getElement({type: "download_progress"}); this._controller.waitFor(function() { return progress.getNode().value == 100; }, "Update has been finished downloading.", ...
[ "function", "softwareUpdate_waitForDownloadFinished", "(", "timeout", ")", "{", "timeout", "=", "timeout", "?", "timeout", ":", "gTimeoutUpdateDownload", ";", "var", "progress", "=", "this", ".", "getElement", "(", "{", "type", ":", "\"download_progress\"", "}", "...
Wait until the download has been finished @param {number} timeout Timeout the download has to stop
[ "Wait", "until", "the", "download", "has", "been", "finished" ]
38d5e4440b2c866a78a1ccb2a18d9795a1bdeafd
https://github.com/SeleniumHQ/selenium/blob/38d5e4440b2c866a78a1ccb2a18d9795a1bdeafd/third_party/js/mozmill/shared-modules/software-update.js#L478-L487
449
SeleniumHQ/selenium
javascript/selenium-core/lib/snapsie.js
getCanonicalPath
function getCanonicalPath(path) { path = path.replace(/\//g, '\\'); path = path.replace(/\\\\/g, '\\'); return path; }
javascript
function getCanonicalPath(path) { path = path.replace(/\//g, '\\'); path = path.replace(/\\\\/g, '\\'); return path; }
[ "function", "getCanonicalPath", "(", "path", ")", "{", "path", "=", "path", ".", "replace", "(", "/", "\\/", "/", "g", ",", "'\\\\'", ")", ";", "path", "=", "path", ".", "replace", "(", "/", "\\\\\\\\", "/", "g", ",", "'\\\\'", ")", ";", "return", ...
Returns the canonical Windows path for a given path. This means basically replacing any forwards slashes with backslashes. @param path the path whose canonical form to return
[ "Returns", "the", "canonical", "Windows", "path", "for", "a", "given", "path", ".", "This", "means", "basically", "replacing", "any", "forwards", "slashes", "with", "backslashes", "." ]
38d5e4440b2c866a78a1ccb2a18d9795a1bdeafd
https://github.com/SeleniumHQ/selenium/blob/38d5e4440b2c866a78a1ccb2a18d9795a1bdeafd/javascript/selenium-core/lib/snapsie.js#L32-L36
450
SeleniumHQ/selenium
javascript/node/selenium-webdriver/lib/error.js
checkResponse
function checkResponse(data) { if (data && typeof data.error === 'string') { let ctor = ERROR_CODE_TO_TYPE.get(data.error) || WebDriverError; throw new ctor(data.message); } return data; }
javascript
function checkResponse(data) { if (data && typeof data.error === 'string') { let ctor = ERROR_CODE_TO_TYPE.get(data.error) || WebDriverError; throw new ctor(data.message); } return data; }
[ "function", "checkResponse", "(", "data", ")", "{", "if", "(", "data", "&&", "typeof", "data", ".", "error", "===", "'string'", ")", "{", "let", "ctor", "=", "ERROR_CODE_TO_TYPE", ".", "get", "(", "data", ".", "error", ")", "||", "WebDriverError", ";", ...
Checks a response object from a server that adheres to the W3C WebDriver protocol. @param {*} data The response data to check. @return {*} The response data if it was not an encoded error. @throws {WebDriverError} the decoded error, if present in the data object. @deprecated Use {@link #throwDecodedError(data)} instead...
[ "Checks", "a", "response", "object", "from", "a", "server", "that", "adheres", "to", "the", "W3C", "WebDriver", "protocol", "." ]
38d5e4440b2c866a78a1ccb2a18d9795a1bdeafd
https://github.com/SeleniumHQ/selenium/blob/38d5e4440b2c866a78a1ccb2a18d9795a1bdeafd/javascript/node/selenium-webdriver/lib/error.js#L518-L524
451
SeleniumHQ/selenium
javascript/node/selenium-webdriver/lib/error.js
throwDecodedError
function throwDecodedError(data) { if (isErrorResponse(data)) { let ctor = ERROR_CODE_TO_TYPE.get(data.error) || WebDriverError; let err = new ctor(data.message); // TODO(jleyba): remove whichever case is excluded from the final W3C spec. if (typeof data.stacktrace === 'string') { err.remoteStac...
javascript
function throwDecodedError(data) { if (isErrorResponse(data)) { let ctor = ERROR_CODE_TO_TYPE.get(data.error) || WebDriverError; let err = new ctor(data.message); // TODO(jleyba): remove whichever case is excluded from the final W3C spec. if (typeof data.stacktrace === 'string') { err.remoteStac...
[ "function", "throwDecodedError", "(", "data", ")", "{", "if", "(", "isErrorResponse", "(", "data", ")", ")", "{", "let", "ctor", "=", "ERROR_CODE_TO_TYPE", ".", "get", "(", "data", ".", "error", ")", "||", "WebDriverError", ";", "let", "err", "=", "new",...
Throws an error coded from the W3C protocol. A generic error will be thrown if the provided `data` is not a valid encoded error. @param {{error: string, message: string}} data The error data to decode. @throws {WebDriverError} the decoded error. @see https://w3c.github.io/webdriver/webdriver-spec.html#protocol
[ "Throws", "an", "error", "coded", "from", "the", "W3C", "protocol", ".", "A", "generic", "error", "will", "be", "thrown", "if", "the", "provided", "data", "is", "not", "a", "valid", "encoded", "error", "." ]
38d5e4440b2c866a78a1ccb2a18d9795a1bdeafd
https://github.com/SeleniumHQ/selenium/blob/38d5e4440b2c866a78a1ccb2a18d9795a1bdeafd/javascript/node/selenium-webdriver/lib/error.js#L547-L560
452
SeleniumHQ/selenium
javascript/node/selenium-webdriver/lib/error.js
checkLegacyResponse
function checkLegacyResponse(responseObj) { // Handle the legacy Selenium error response format. if (responseObj && typeof responseObj === 'object' && typeof responseObj['status'] === 'number' && responseObj['status'] !== 0) { let status = responseObj['status']; let ctor = LEGACY_ERROR_COD...
javascript
function checkLegacyResponse(responseObj) { // Handle the legacy Selenium error response format. if (responseObj && typeof responseObj === 'object' && typeof responseObj['status'] === 'number' && responseObj['status'] !== 0) { let status = responseObj['status']; let ctor = LEGACY_ERROR_COD...
[ "function", "checkLegacyResponse", "(", "responseObj", ")", "{", "// Handle the legacy Selenium error response format.", "if", "(", "responseObj", "&&", "typeof", "responseObj", "===", "'object'", "&&", "typeof", "responseObj", "[", "'status'", "]", "===", "'number'", "...
Checks a legacy response from the Selenium 2.0 wire protocol for an error. @param {*} responseObj the response object to check. @return {*} responseObj the original response if it does not define an error. @throws {WebDriverError} if the response object defines an error.
[ "Checks", "a", "legacy", "response", "from", "the", "Selenium", "2", ".", "0", "wire", "protocol", "for", "an", "error", "." ]
38d5e4440b2c866a78a1ccb2a18d9795a1bdeafd
https://github.com/SeleniumHQ/selenium/blob/38d5e4440b2c866a78a1ccb2a18d9795a1bdeafd/javascript/node/selenium-webdriver/lib/error.js#L569-L596
453
SeleniumHQ/selenium
javascript/selenium-core/scripts/selenium-remoterunner.js
function(commandRequest) { //decodeURIComponent doesn't strip plus signs var processed = commandRequest.replace(/\+/g, "%20"); // strip trailing spaces var processed = processed.replace(/\s+$/, ""); var vars = processed.split("&"); var cmdArgs = new Object(); for ...
javascript
function(commandRequest) { //decodeURIComponent doesn't strip plus signs var processed = commandRequest.replace(/\+/g, "%20"); // strip trailing spaces var processed = processed.replace(/\s+$/, ""); var vars = processed.split("&"); var cmdArgs = new Object(); for ...
[ "function", "(", "commandRequest", ")", "{", "//decodeURIComponent doesn't strip plus signs", "var", "processed", "=", "commandRequest", ".", "replace", "(", "/", "\\+", "/", "g", ",", "\"%20\"", ")", ";", "// strip trailing spaces", "var", "processed", "=", "proces...
Parses a URI query string into a SeleniumCommand object
[ "Parses", "a", "URI", "query", "string", "into", "a", "SeleniumCommand", "object" ]
38d5e4440b2c866a78a1ccb2a18d9795a1bdeafd
https://github.com/SeleniumHQ/selenium/blob/38d5e4440b2c866a78a1ccb2a18d9795a1bdeafd/javascript/selenium-core/scripts/selenium-remoterunner.js#L361-L383
454
SeleniumHQ/selenium
javascript/node/selenium-webdriver/lib/by.js
escapeCss
function escapeCss(css) { if (typeof css !== 'string') { throw new TypeError('input must be a string'); } let ret = ''; const n = css.length; for (let i = 0; i < n; i++) { const c = css.charCodeAt(i); if (c == 0x0) { throw new InvalidCharacterError(); } if ((c >= 0x0001 && c <= 0x0...
javascript
function escapeCss(css) { if (typeof css !== 'string') { throw new TypeError('input must be a string'); } let ret = ''; const n = css.length; for (let i = 0; i < n; i++) { const c = css.charCodeAt(i); if (c == 0x0) { throw new InvalidCharacterError(); } if ((c >= 0x0001 && c <= 0x0...
[ "function", "escapeCss", "(", "css", ")", "{", "if", "(", "typeof", "css", "!==", "'string'", ")", "{", "throw", "new", "TypeError", "(", "'input must be a string'", ")", ";", "}", "let", "ret", "=", "''", ";", "const", "n", "=", "css", ".", "length", ...
Escapes a CSS string. @param {string} css the string to escape. @return {string} the escaped string. @throws {TypeError} if the input value is not a string. @throws {InvalidCharacterError} if the string contains an invalid character. @see https://drafts.csswg.org/cssom/#serialize-an-identifier
[ "Escapes", "a", "CSS", "string", "." ]
38d5e4440b2c866a78a1ccb2a18d9795a1bdeafd
https://github.com/SeleniumHQ/selenium/blob/38d5e4440b2c866a78a1ccb2a18d9795a1bdeafd/javascript/node/selenium-webdriver/lib/by.js#L70-L109
455
SeleniumHQ/selenium
javascript/node/selenium-webdriver/lib/by.js
check
function check(locator) { if (locator instanceof By || typeof locator === 'function') { return locator; } if (locator && typeof locator === 'object' && typeof locator.using === 'string' && typeof locator.value === 'string') { return new By(locator.using, locator.value); } for (let ...
javascript
function check(locator) { if (locator instanceof By || typeof locator === 'function') { return locator; } if (locator && typeof locator === 'object' && typeof locator.using === 'string' && typeof locator.value === 'string') { return new By(locator.using, locator.value); } for (let ...
[ "function", "check", "(", "locator", ")", "{", "if", "(", "locator", "instanceof", "By", "||", "typeof", "locator", "===", "'function'", ")", "{", "return", "locator", ";", "}", "if", "(", "locator", "&&", "typeof", "locator", "===", "'object'", "&&", "t...
Checks if a value is a valid locator. @param {!(By|Function|ByHash)} locator The value to check. @return {!(By|Function)} The valid locator. @throws {TypeError} If the given value does not define a valid locator strategy.
[ "Checks", "if", "a", "value", "is", "a", "valid", "locator", "." ]
38d5e4440b2c866a78a1ccb2a18d9795a1bdeafd
https://github.com/SeleniumHQ/selenium/blob/38d5e4440b2c866a78a1ccb2a18d9795a1bdeafd/javascript/node/selenium-webdriver/lib/by.js#L258-L276
456
SeleniumHQ/selenium
javascript/selenium-core/scripts/selenium-api.js
getFailureMessage
function getFailureMessage(exceptionMessage) { var msg = 'Snapsie failed: '; if (exceptionMessage) { if (exceptionMessage == "Automation server can't create object") { msg += 'Is it installed? Does it have permission to run ' ...
javascript
function getFailureMessage(exceptionMessage) { var msg = 'Snapsie failed: '; if (exceptionMessage) { if (exceptionMessage == "Automation server can't create object") { msg += 'Is it installed? Does it have permission to run ' ...
[ "function", "getFailureMessage", "(", "exceptionMessage", ")", "{", "var", "msg", "=", "'Snapsie failed: '", ";", "if", "(", "exceptionMessage", ")", "{", "if", "(", "exceptionMessage", "==", "\"Automation server can't create object\"", ")", "{", "msg", "+=", "'Is i...
targeting snapsIE >= 0.2
[ "targeting", "snapsIE", ">", "=", "0", ".", "2" ]
38d5e4440b2c866a78a1ccb2a18d9795a1bdeafd
https://github.com/SeleniumHQ/selenium/blob/38d5e4440b2c866a78a1ccb2a18d9795a1bdeafd/javascript/selenium-core/scripts/selenium-api.js#L2982-L2998
457
SeleniumHQ/selenium
third_party/closure/goog/bootstrap/nodejs.js
nodeGlobalRequire
function nodeGlobalRequire(file) { vm.runInThisContext.call(global, fs.readFileSync(file), file); }
javascript
function nodeGlobalRequire(file) { vm.runInThisContext.call(global, fs.readFileSync(file), file); }
[ "function", "nodeGlobalRequire", "(", "file", ")", "{", "vm", ".", "runInThisContext", ".", "call", "(", "global", ",", "fs", ".", "readFileSync", "(", "file", ")", ",", "file", ")", ";", "}" ]
Declared here so it can be used to require base.js
[ "Declared", "here", "so", "it", "can", "be", "used", "to", "require", "base", ".", "js" ]
38d5e4440b2c866a78a1ccb2a18d9795a1bdeafd
https://github.com/SeleniumHQ/selenium/blob/38d5e4440b2c866a78a1ccb2a18d9795a1bdeafd/third_party/closure/goog/bootstrap/nodejs.js#L86-L88
458
SeleniumHQ/selenium
third_party/js/mozmill/shared-modules/sessionstore.js
aboutSessionRestore_getRestoreState
function aboutSessionRestore_getRestoreState(element) { var tree = this.tabList.getNode(); return tree.view.getCellValue(element.listIndex, tree.columns.getColumnAt(0)); }
javascript
function aboutSessionRestore_getRestoreState(element) { var tree = this.tabList.getNode(); return tree.view.getCellValue(element.listIndex, tree.columns.getColumnAt(0)); }
[ "function", "aboutSessionRestore_getRestoreState", "(", "element", ")", "{", "var", "tree", "=", "this", ".", "tabList", ".", "getNode", "(", ")", ";", "return", "tree", ".", "view", ".", "getCellValue", "(", "element", ".", "listIndex", ",", "tree", ".", ...
Returns the current restore state of the given element @param {object} element Element which restore state should be retrieved @returns True if the element should be restored @type {boolean}
[ "Returns", "the", "current", "restore", "state", "of", "the", "given", "element" ]
38d5e4440b2c866a78a1ccb2a18d9795a1bdeafd
https://github.com/SeleniumHQ/selenium/blob/38d5e4440b2c866a78a1ccb2a18d9795a1bdeafd/third_party/js/mozmill/shared-modules/sessionstore.js#L155-L159
459
SeleniumHQ/selenium
third_party/js/mozmill/shared-modules/sessionstore.js
aboutSessionRestore_getTabs
function aboutSessionRestore_getTabs(window) { var tabs = [ ]; var tree = this.tabList.getNode(); // Add entries when they are tabs (no container) var ii = window.listIndex + 1; while (ii < tree.view.rowCount && !tree.view.isContainer(ii)) { tabs.push({ index: tabs.length, ...
javascript
function aboutSessionRestore_getTabs(window) { var tabs = [ ]; var tree = this.tabList.getNode(); // Add entries when they are tabs (no container) var ii = window.listIndex + 1; while (ii < tree.view.rowCount && !tree.view.isContainer(ii)) { tabs.push({ index: tabs.length, ...
[ "function", "aboutSessionRestore_getTabs", "(", "window", ")", "{", "var", "tabs", "=", "[", "]", ";", "var", "tree", "=", "this", ".", "tabList", ".", "getNode", "(", ")", ";", "// Add entries when they are tabs (no container)", "var", "ii", "=", "window", "....
Get restorable tabs under the given window @param {object} window Window inside the tree @returns List of tabs @type {array of object}
[ "Get", "restorable", "tabs", "under", "the", "given", "window" ]
38d5e4440b2c866a78a1ccb2a18d9795a1bdeafd
https://github.com/SeleniumHQ/selenium/blob/38d5e4440b2c866a78a1ccb2a18d9795a1bdeafd/third_party/js/mozmill/shared-modules/sessionstore.js#L169-L186
460
SeleniumHQ/selenium
third_party/js/mozmill/shared-modules/sessionstore.js
aboutSessionRestore_getWindows
function aboutSessionRestore_getWindows() { var windows = [ ]; var tree = this.tabList.getNode(); for (var ii = 0; ii < tree.view.rowCount; ii++) { if (tree.view.isContainer(ii)) { windows.push({ index: windows.length, listIndex : ii, ...
javascript
function aboutSessionRestore_getWindows() { var windows = [ ]; var tree = this.tabList.getNode(); for (var ii = 0; ii < tree.view.rowCount; ii++) { if (tree.view.isContainer(ii)) { windows.push({ index: windows.length, listIndex : ii, ...
[ "function", "aboutSessionRestore_getWindows", "(", ")", "{", "var", "windows", "=", "[", "]", ";", "var", "tree", "=", "this", ".", "tabList", ".", "getNode", "(", ")", ";", "for", "(", "var", "ii", "=", "0", ";", "ii", "<", "tree", ".", "view", "....
Get restorable windows @returns List of windows @type {array of object}
[ "Get", "restorable", "windows" ]
38d5e4440b2c866a78a1ccb2a18d9795a1bdeafd
https://github.com/SeleniumHQ/selenium/blob/38d5e4440b2c866a78a1ccb2a18d9795a1bdeafd/third_party/js/mozmill/shared-modules/sessionstore.js#L194-L211
461
SeleniumHQ/selenium
third_party/js/mozmill/shared-modules/sessionstore.js
aboutSessionRestore_toggleRestoreState
function aboutSessionRestore_toggleRestoreState(element) { var state = this.getRestoreState(element); widgets.clickTreeCell(this._controller, this.tabList, element.listIndex, 0, {}); this._controller.sleep(0); this._controller.assertJS("subject.newState != subject.oldState", ...
javascript
function aboutSessionRestore_toggleRestoreState(element) { var state = this.getRestoreState(element); widgets.clickTreeCell(this._controller, this.tabList, element.listIndex, 0, {}); this._controller.sleep(0); this._controller.assertJS("subject.newState != subject.oldState", ...
[ "function", "aboutSessionRestore_toggleRestoreState", "(", "element", ")", "{", "var", "state", "=", "this", ".", "getRestoreState", "(", "element", ")", ";", "widgets", ".", "clickTreeCell", "(", "this", ".", "_controller", ",", "this", ".", "tabList", ",", "...
Toggles the restore state for the element @param {object} element Specifies the element which restore state should be toggled
[ "Toggles", "the", "restore", "state", "for", "the", "element" ]
38d5e4440b2c866a78a1ccb2a18d9795a1bdeafd
https://github.com/SeleniumHQ/selenium/blob/38d5e4440b2c866a78a1ccb2a18d9795a1bdeafd/third_party/js/mozmill/shared-modules/sessionstore.js#L219-L227
462
SeleniumHQ/selenium
third_party/js/mozmill/shared-modules/sessionstore.js
undoClosedTab
function undoClosedTab(controller, event) { var count = sessionStoreService.getClosedTabCount(controller.window); switch (event.type) { case "menu": throw new Error("Menu gets build dynamically and cannot be accessed."); break; case "shortcut": var cmdKey = utils.getEntity(this.getDtds(),...
javascript
function undoClosedTab(controller, event) { var count = sessionStoreService.getClosedTabCount(controller.window); switch (event.type) { case "menu": throw new Error("Menu gets build dynamically and cannot be accessed."); break; case "shortcut": var cmdKey = utils.getEntity(this.getDtds(),...
[ "function", "undoClosedTab", "(", "controller", ",", "event", ")", "{", "var", "count", "=", "sessionStoreService", ".", "getClosedTabCount", "(", "controller", ".", "window", ")", ";", "switch", "(", "event", ".", "type", ")", "{", "case", "\"menu\"", ":", ...
Restores the tab which has been recently closed @param {MozMillController} controller MozMillController of the window to operate on @param {object} event Specifies the event to use to execute the command
[ "Restores", "the", "tab", "which", "has", "been", "recently", "closed" ]
38d5e4440b2c866a78a1ccb2a18d9795a1bdeafd
https://github.com/SeleniumHQ/selenium/blob/38d5e4440b2c866a78a1ccb2a18d9795a1bdeafd/third_party/js/mozmill/shared-modules/sessionstore.js#L259-L279
463
SeleniumHQ/selenium
third_party/js/mozmill/shared-modules/sessionstore.js
undoClosedWindow
function undoClosedWindow(controller, event) { var count = sessionStoreService.getClosedWindowCount(controller.window); switch (event.type) { case "menu": throw new Error("Menu gets build dynamically and cannot be accessed."); break; case "shortcut": var cmdKey = utils.getEntity(this.getD...
javascript
function undoClosedWindow(controller, event) { var count = sessionStoreService.getClosedWindowCount(controller.window); switch (event.type) { case "menu": throw new Error("Menu gets build dynamically and cannot be accessed."); break; case "shortcut": var cmdKey = utils.getEntity(this.getD...
[ "function", "undoClosedWindow", "(", "controller", ",", "event", ")", "{", "var", "count", "=", "sessionStoreService", ".", "getClosedWindowCount", "(", "controller", ".", "window", ")", ";", "switch", "(", "event", ".", "type", ")", "{", "case", "\"menu\"", ...
Restores the window which has been recently closed @param {MozMillController} controller MozMillController of the window to operate on @param {object} event Specifies the event to use to execute the command
[ "Restores", "the", "window", "which", "has", "been", "recently", "closed" ]
38d5e4440b2c866a78a1ccb2a18d9795a1bdeafd
https://github.com/SeleniumHQ/selenium/blob/38d5e4440b2c866a78a1ccb2a18d9795a1bdeafd/third_party/js/mozmill/shared-modules/sessionstore.js#L289-L309
464
SeleniumHQ/selenium
third_party/closure/goog/labs/format/csv.js
pushBack
function pushBack(t) { goog.labs.format.csv.assertToken_(t); goog.asserts.assert(goog.isNull(pushBackToken)); pushBackToken = t; }
javascript
function pushBack(t) { goog.labs.format.csv.assertToken_(t); goog.asserts.assert(goog.isNull(pushBackToken)); pushBackToken = t; }
[ "function", "pushBack", "(", "t", ")", "{", "goog", ".", "labs", ".", "format", ".", "csv", ".", "assertToken_", "(", "t", ")", ";", "goog", ".", "asserts", ".", "assert", "(", "goog", ".", "isNull", "(", "pushBackToken", ")", ")", ";", "pushBackToke...
Special case for terminal comma. Push a single token into the push-back variable. @param {goog.labs.format.csv.Token} t Single token.
[ "Special", "case", "for", "terminal", "comma", ".", "Push", "a", "single", "token", "into", "the", "push", "-", "back", "variable", "." ]
38d5e4440b2c866a78a1ccb2a18d9795a1bdeafd
https://github.com/SeleniumHQ/selenium/blob/38d5e4440b2c866a78a1ccb2a18d9795a1bdeafd/third_party/closure/goog/labs/format/csv.js#L174-L178
465
SeleniumHQ/selenium
third_party/closure/goog/labs/format/csv.js
readQuotedField
function readQuotedField() { // We've already consumed the first quote by the time we get here. var start = index; var end = null; for (var token = nextToken(); token != EOF; token = nextToken()) { if (token == '"') { end = index - 1; token = nextToken(); // Two double qu...
javascript
function readQuotedField() { // We've already consumed the first quote by the time we get here. var start = index; var end = null; for (var token = nextToken(); token != EOF; token = nextToken()) { if (token == '"') { end = index - 1; token = nextToken(); // Two double qu...
[ "function", "readQuotedField", "(", ")", "{", "// We've already consumed the first quote by the time we get here.", "var", "start", "=", "index", ";", "var", "end", "=", "null", ";", "for", "(", "var", "token", "=", "nextToken", "(", ")", ";", "token", "!=", "EO...
Read a quoted field from input. @return {string} The field, as a string.
[ "Read", "a", "quoted", "field", "from", "input", "." ]
38d5e4440b2c866a78a1ccb2a18d9795a1bdeafd
https://github.com/SeleniumHQ/selenium/blob/38d5e4440b2c866a78a1ccb2a18d9795a1bdeafd/third_party/closure/goog/labs/format/csv.js#L225-L282
466
SeleniumHQ/selenium
third_party/closure/goog/labs/format/csv.js
readField
function readField() { var start = index; var didSeeComma = sawComma; sawComma = false; var token = nextToken(); if (token == EMPTY) { return EOR; } if (token == EOF || token == NEWLINE) { if (didSeeComma) { pushBack(EMPTY); return ''; } return EOR; ...
javascript
function readField() { var start = index; var didSeeComma = sawComma; sawComma = false; var token = nextToken(); if (token == EMPTY) { return EOR; } if (token == EOF || token == NEWLINE) { if (didSeeComma) { pushBack(EMPTY); return ''; } return EOR; ...
[ "function", "readField", "(", ")", "{", "var", "start", "=", "index", ";", "var", "didSeeComma", "=", "sawComma", ";", "sawComma", "=", "false", ";", "var", "token", "=", "nextToken", "(", ")", ";", "if", "(", "token", "==", "EMPTY", ")", "{", "retur...
Read a field from input. @return {string|!goog.labs.format.csv.Sentinels_} The field, as a string, or a sentinel (if applicable).
[ "Read", "a", "field", "from", "input", "." ]
38d5e4440b2c866a78a1ccb2a18d9795a1bdeafd
https://github.com/SeleniumHQ/selenium/blob/38d5e4440b2c866a78a1ccb2a18d9795a1bdeafd/third_party/closure/goog/labs/format/csv.js#L289-L337
467
SeleniumHQ/selenium
third_party/closure/goog/labs/format/csv.js
readRecord
function readRecord() { if (index >= text.length) { return EOF; } var record = []; for (var field = readField(); field != EOR; field = readField()) { record.push(field); } return record; }
javascript
function readRecord() { if (index >= text.length) { return EOF; } var record = []; for (var field = readField(); field != EOR; field = readField()) { record.push(field); } return record; }
[ "function", "readRecord", "(", ")", "{", "if", "(", "index", ">=", "text", ".", "length", ")", "{", "return", "EOF", ";", "}", "var", "record", "=", "[", "]", ";", "for", "(", "var", "field", "=", "readField", "(", ")", ";", "field", "!=", "EOR",...
Read the next record. @return {!Array<string>|!goog.labs.format.csv.Sentinels_} A single record with multiple fields.
[ "Read", "the", "next", "record", "." ]
38d5e4440b2c866a78a1ccb2a18d9795a1bdeafd
https://github.com/SeleniumHQ/selenium/blob/38d5e4440b2c866a78a1ccb2a18d9795a1bdeafd/third_party/closure/goog/labs/format/csv.js#L344-L353
468
SeleniumHQ/selenium
common/src/web/jquery-1.3.2.js
function( data ) { if ( data && /\S/.test(data) ) { // Inspired by code by Andrea Giammarchi // http://webreflection.blogspot.com/2007/08/global-scope-evaluation-and-dom.html var head = document.getElementsByTagName("head")[0] || document.documentElement, script = document.createElement("script"); sc...
javascript
function( data ) { if ( data && /\S/.test(data) ) { // Inspired by code by Andrea Giammarchi // http://webreflection.blogspot.com/2007/08/global-scope-evaluation-and-dom.html var head = document.getElementsByTagName("head")[0] || document.documentElement, script = document.createElement("script"); sc...
[ "function", "(", "data", ")", "{", "if", "(", "data", "&&", "/", "\\S", "/", ".", "test", "(", "data", ")", ")", "{", "// Inspired by code by Andrea Giammarchi", "// http://webreflection.blogspot.com/2007/08/global-scope-evaluation-and-dom.html", "var", "head", "=", "...
Evalulates a script in a global context
[ "Evalulates", "a", "script", "in", "a", "global", "context" ]
38d5e4440b2c866a78a1ccb2a18d9795a1bdeafd
https://github.com/SeleniumHQ/selenium/blob/38d5e4440b2c866a78a1ccb2a18d9795a1bdeafd/common/src/web/jquery-1.3.2.js#L646-L664
469
SeleniumHQ/selenium
common/src/web/jquery-1.3.2.js
num
function num(elem, prop) { return elem[0] && parseInt( jQuery.curCSS(elem[0], prop, true), 10 ) || 0; }
javascript
function num(elem, prop) { return elem[0] && parseInt( jQuery.curCSS(elem[0], prop, true), 10 ) || 0; }
[ "function", "num", "(", "elem", ",", "prop", ")", "{", "return", "elem", "[", "0", "]", "&&", "parseInt", "(", "jQuery", ".", "curCSS", "(", "elem", "[", "0", "]", ",", "prop", ",", "true", ")", ",", "10", ")", "||", "0", ";", "}" ]
Helper function used by the dimensions and offset modules
[ "Helper", "function", "used", "by", "the", "dimensions", "and", "offset", "modules" ]
38d5e4440b2c866a78a1ccb2a18d9795a1bdeafd
https://github.com/SeleniumHQ/selenium/blob/38d5e4440b2c866a78a1ccb2a18d9795a1bdeafd/common/src/web/jquery-1.3.2.js#L1266-L1268
470
SeleniumHQ/selenium
common/src/web/jquery-1.3.2.js
function( event, data, elem, bubbling ) { // Event object or event type var type = event.type || event; if( !bubbling ){ event = typeof event === "object" ? // jQuery.Event object event[expando] ? event : // Object literal jQuery.extend( jQuery.Event(type), event ) : // Just the event type...
javascript
function( event, data, elem, bubbling ) { // Event object or event type var type = event.type || event; if( !bubbling ){ event = typeof event === "object" ? // jQuery.Event object event[expando] ? event : // Object literal jQuery.extend( jQuery.Event(type), event ) : // Just the event type...
[ "function", "(", "event", ",", "data", ",", "elem", ",", "bubbling", ")", "{", "// Event object or event type", "var", "type", "=", "event", ".", "type", "||", "event", ";", "if", "(", "!", "bubbling", ")", "{", "event", "=", "typeof", "event", "===", ...
bubbling is internal
[ "bubbling", "is", "internal" ]
38d5e4440b2c866a78a1ccb2a18d9795a1bdeafd
https://github.com/SeleniumHQ/selenium/blob/38d5e4440b2c866a78a1ccb2a18d9795a1bdeafd/common/src/web/jquery-1.3.2.js#L2591-L2663
471
SeleniumHQ/selenium
common/src/web/jquery-1.3.2.js
function(isTimeout){ // The request was aborted, clear the interval and decrement jQuery.active if (xhr.readyState == 0) { if (ival) { // clear poll interval clearInterval(ival); ival = null; // Handle the global AJAX counter if ( s.global && ! --jQuery.active ) jQuery.event.tri...
javascript
function(isTimeout){ // The request was aborted, clear the interval and decrement jQuery.active if (xhr.readyState == 0) { if (ival) { // clear poll interval clearInterval(ival); ival = null; // Handle the global AJAX counter if ( s.global && ! --jQuery.active ) jQuery.event.tri...
[ "function", "(", "isTimeout", ")", "{", "// The request was aborted, clear the interval and decrement jQuery.active", "if", "(", "xhr", ".", "readyState", "==", "0", ")", "{", "if", "(", "ival", ")", "{", "// clear poll interval", "clearInterval", "(", "ival", ")", ...
Wait for a response to come back
[ "Wait", "for", "a", "response", "to", "come", "back" ]
38d5e4440b2c866a78a1ccb2a18d9795a1bdeafd
https://github.com/SeleniumHQ/selenium/blob/38d5e4440b2c866a78a1ccb2a18d9795a1bdeafd/common/src/web/jquery-1.3.2.js#L3553-L3616
472
SeleniumHQ/selenium
common/src/web/jquery-1.3.2.js
function( xhr ) { try { // IE error sometimes returns 1223 when it should be 204 so treat it as success, see #1450 return !xhr.status && location.protocol == "file:" || ( xhr.status >= 200 && xhr.status < 300 ) || xhr.status == 304 || xhr.status == 1223; } catch(e){} return false; }
javascript
function( xhr ) { try { // IE error sometimes returns 1223 when it should be 204 so treat it as success, see #1450 return !xhr.status && location.protocol == "file:" || ( xhr.status >= 200 && xhr.status < 300 ) || xhr.status == 304 || xhr.status == 1223; } catch(e){} return false; }
[ "function", "(", "xhr", ")", "{", "try", "{", "// IE error sometimes returns 1223 when it should be 204 so treat it as success, see #1450", "return", "!", "xhr", ".", "status", "&&", "location", ".", "protocol", "==", "\"file:\"", "||", "(", "xhr", ".", "status", ">="...
Determines if an XMLHttpRequest was successful or not
[ "Determines", "if", "an", "XMLHttpRequest", "was", "successful", "or", "not" ]
38d5e4440b2c866a78a1ccb2a18d9795a1bdeafd
https://github.com/SeleniumHQ/selenium/blob/38d5e4440b2c866a78a1ccb2a18d9795a1bdeafd/common/src/web/jquery-1.3.2.js#L3683-L3690
473
SeleniumHQ/selenium
third_party/js/mozmill/shared-modules/places.js
isBookmarkInFolder
function isBookmarkInFolder(uri, folderId) { var ids = bookmarksService.getBookmarkIdsForURI(uri, {}); for (let i = 0; i < ids.length; i++) { if (bookmarksService.getFolderIdForItem(ids[i]) == folderId) return true; } return false; }
javascript
function isBookmarkInFolder(uri, folderId) { var ids = bookmarksService.getBookmarkIdsForURI(uri, {}); for (let i = 0; i < ids.length; i++) { if (bookmarksService.getFolderIdForItem(ids[i]) == folderId) return true; } return false; }
[ "function", "isBookmarkInFolder", "(", "uri", ",", "folderId", ")", "{", "var", "ids", "=", "bookmarksService", ".", "getBookmarkIdsForURI", "(", "uri", ",", "{", "}", ")", ";", "for", "(", "let", "i", "=", "0", ";", "i", "<", "ids", ".", "length", "...
Check if an URI is bookmarked within the specified folder @param (nsIURI) uri URI of the bookmark @param {String} folderId Folder in which the search has to take place @return Returns if the URI exists in the given folder @type Boolean
[ "Check", "if", "an", "URI", "is", "bookmarked", "within", "the", "specified", "folder" ]
38d5e4440b2c866a78a1ccb2a18d9795a1bdeafd
https://github.com/SeleniumHQ/selenium/blob/38d5e4440b2c866a78a1ccb2a18d9795a1bdeafd/third_party/js/mozmill/shared-modules/places.js#L111-L120
474
SeleniumHQ/selenium
third_party/js/mozmill/shared-modules/places.js
restoreDefaultBookmarks
function restoreDefaultBookmarks() { // Set up the observer -- we're only checking for success here, so we'll simply // time out and throw on failure. It makes the code much clearer than handling // finished state and success state separately. var importSuccessful = false; var importObserver = { observe: ...
javascript
function restoreDefaultBookmarks() { // Set up the observer -- we're only checking for success here, so we'll simply // time out and throw on failure. It makes the code much clearer than handling // finished state and success state separately. var importSuccessful = false; var importObserver = { observe: ...
[ "function", "restoreDefaultBookmarks", "(", ")", "{", "// Set up the observer -- we're only checking for success here, so we'll simply", "// time out and throw on failure. It makes the code much clearer than handling", "// finished state and success state separately.", "var", "importSuccessful", ...
Restore the default bookmarks for the current profile
[ "Restore", "the", "default", "bookmarks", "for", "the", "current", "profile" ]
38d5e4440b2c866a78a1ccb2a18d9795a1bdeafd
https://github.com/SeleniumHQ/selenium/blob/38d5e4440b2c866a78a1ccb2a18d9795a1bdeafd/third_party/js/mozmill/shared-modules/places.js#L125-L155
475
SeleniumHQ/selenium
javascript/node/selenium-webdriver/io/zip.js
load
function load(path) { return io.read(path).then(data => { let zip = new Zip; return zip.z_.loadAsync(data).then(() => zip); }); }
javascript
function load(path) { return io.read(path).then(data => { let zip = new Zip; return zip.z_.loadAsync(data).then(() => zip); }); }
[ "function", "load", "(", "path", ")", "{", "return", "io", ".", "read", "(", "path", ")", ".", "then", "(", "data", "=>", "{", "let", "zip", "=", "new", "Zip", ";", "return", "zip", ".", "z_", ".", "loadAsync", "(", "data", ")", ".", "then", "(...
Asynchronously opens a zip archive. @param {string} path to the zip archive to load. @return {!Promise<!Zip>} a promise that will resolve with the opened archive.
[ "Asynchronously", "opens", "a", "zip", "archive", "." ]
38d5e4440b2c866a78a1ccb2a18d9795a1bdeafd
https://github.com/SeleniumHQ/selenium/blob/38d5e4440b2c866a78a1ccb2a18d9795a1bdeafd/javascript/node/selenium-webdriver/io/zip.js#L154-L159
476
SeleniumHQ/selenium
javascript/node/selenium-webdriver/io/zip.js
unzip
function unzip(src, dst) { return load(src).then(zip => { let promisedDirs = new Map; let promises = []; zip.z_.forEach((relPath, file) => { let p; if (file.dir) { p = createDir(relPath); } else { let dirname = path.dirname(relPath); if (dirname === '.') { ...
javascript
function unzip(src, dst) { return load(src).then(zip => { let promisedDirs = new Map; let promises = []; zip.z_.forEach((relPath, file) => { let p; if (file.dir) { p = createDir(relPath); } else { let dirname = path.dirname(relPath); if (dirname === '.') { ...
[ "function", "unzip", "(", "src", ",", "dst", ")", "{", "return", "load", "(", "src", ")", ".", "then", "(", "zip", "=>", "{", "let", "promisedDirs", "=", "new", "Map", ";", "let", "promises", "=", "[", "]", ";", "zip", ".", "z_", ".", "forEach", ...
Asynchronously unzips an archive file. @param {string} src path to the source file to unzip. @param {string} dst path to the destination directory. @return {!Promise<string>} a promise that will resolve with `dst` once the archive has been unzipped.
[ "Asynchronously", "unzips", "an", "archive", "file", "." ]
38d5e4440b2c866a78a1ccb2a18d9795a1bdeafd
https://github.com/SeleniumHQ/selenium/blob/38d5e4440b2c866a78a1ccb2a18d9795a1bdeafd/javascript/node/selenium-webdriver/io/zip.js#L170-L206
477
SeleniumHQ/selenium
javascript/node/selenium-webdriver/lib/http.js
headersToString
function headersToString(headers) { let ret = []; headers.forEach(function(value, name) { ret.push(`${name.toLowerCase()}: ${value}`); }); return ret.join('\n'); }
javascript
function headersToString(headers) { let ret = []; headers.forEach(function(value, name) { ret.push(`${name.toLowerCase()}: ${value}`); }); return ret.join('\n'); }
[ "function", "headersToString", "(", "headers", ")", "{", "let", "ret", "=", "[", "]", ";", "headers", ".", "forEach", "(", "function", "(", "value", ",", "name", ")", "{", "ret", ".", "push", "(", "`", "${", "name", ".", "toLowerCase", "(", ")", "}...
Converts a headers map to a HTTP header block string. @param {!Map<string, string>} headers The map to convert. @return {string} The headers as a string.
[ "Converts", "a", "headers", "map", "to", "a", "HTTP", "header", "block", "string", "." ]
38d5e4440b2c866a78a1ccb2a18d9795a1bdeafd
https://github.com/SeleniumHQ/selenium/blob/38d5e4440b2c866a78a1ccb2a18d9795a1bdeafd/javascript/node/selenium-webdriver/lib/http.js#L70-L76
478
SeleniumHQ/selenium
third_party/js/mozmill/shared-modules/tabs.js
getTabsWithURL
function getTabsWithURL(aUrl) { var tabs = [ ]; var uri = utils.createURI(aUrl, null, null); var wm = Cc["@mozilla.org/appshell/window-mediator;1"]. getService(Ci.nsIWindowMediator); var winEnum = wm.getEnumerator("navigator:browser"); // Iterate through all windows while (winEnum.hasMoreEleme...
javascript
function getTabsWithURL(aUrl) { var tabs = [ ]; var uri = utils.createURI(aUrl, null, null); var wm = Cc["@mozilla.org/appshell/window-mediator;1"]. getService(Ci.nsIWindowMediator); var winEnum = wm.getEnumerator("navigator:browser"); // Iterate through all windows while (winEnum.hasMoreEleme...
[ "function", "getTabsWithURL", "(", "aUrl", ")", "{", "var", "tabs", "=", "[", "]", ";", "var", "uri", "=", "utils", ".", "createURI", "(", "aUrl", ",", "null", ",", "null", ")", ";", "var", "wm", "=", "Cc", "[", "\"@mozilla.org/appshell/window-mediator;1...
Check and return all open tabs with the specified URL @param {string} aUrl URL to check for @returns Array of tabs
[ "Check", "and", "return", "all", "open", "tabs", "with", "the", "specified", "URL" ]
38d5e4440b2c866a78a1ccb2a18d9795a1bdeafd
https://github.com/SeleniumHQ/selenium/blob/38d5e4440b2c866a78a1ccb2a18d9795a1bdeafd/third_party/js/mozmill/shared-modules/tabs.js#L80-L111
479
SeleniumHQ/selenium
third_party/js/mozmill/shared-modules/tabs.js
tabBrowser_closeAllTabs
function tabBrowser_closeAllTabs() { while (this._controller.tabs.length > 1) { this.closeTab({type: "menu"}); } this._controller.open("about:blank"); this._controller.waitForPageLoad(); }
javascript
function tabBrowser_closeAllTabs() { while (this._controller.tabs.length > 1) { this.closeTab({type: "menu"}); } this._controller.open("about:blank"); this._controller.waitForPageLoad(); }
[ "function", "tabBrowser_closeAllTabs", "(", ")", "{", "while", "(", "this", ".", "_controller", ".", "tabs", ".", "length", ">", "1", ")", "{", "this", ".", "closeTab", "(", "{", "type", ":", "\"menu\"", "}", ")", ";", "}", "this", ".", "_controller", ...
Close all tabs of the window except the last one and open a blank page.
[ "Close", "all", "tabs", "of", "the", "window", "except", "the", "last", "one", "and", "open", "a", "blank", "page", "." ]
38d5e4440b2c866a78a1ccb2a18d9795a1bdeafd
https://github.com/SeleniumHQ/selenium/blob/38d5e4440b2c866a78a1ccb2a18d9795a1bdeafd/third_party/js/mozmill/shared-modules/tabs.js#L172-L180
480
SeleniumHQ/selenium
third_party/js/mozmill/shared-modules/tabs.js
tabBrowser_closeTab
function tabBrowser_closeTab(aEvent) { var event = aEvent || { }; var type = (event.type == undefined) ? "menu" : event.type; // Disable tab closing animation for default behavior prefs.preferences.setPref(PREF_TABS_ANIMATE, false); // Add event listener to wait until the tab has been closed v...
javascript
function tabBrowser_closeTab(aEvent) { var event = aEvent || { }; var type = (event.type == undefined) ? "menu" : event.type; // Disable tab closing animation for default behavior prefs.preferences.setPref(PREF_TABS_ANIMATE, false); // Add event listener to wait until the tab has been closed v...
[ "function", "tabBrowser_closeTab", "(", "aEvent", ")", "{", "var", "event", "=", "aEvent", "||", "{", "}", ";", "var", "type", "=", "(", "event", ".", "type", "==", "undefined", ")", "?", "\"menu\"", ":", "event", ".", "type", ";", "// Disable tab closin...
Close an open tab @param {object} aEvent The event specifies how to close a tab Elements: type - Type of event (closeButton, menu, middleClick, shortcut) [optional - default: menu]
[ "Close", "an", "open", "tab" ]
38d5e4440b2c866a78a1ccb2a18d9795a1bdeafd
https://github.com/SeleniumHQ/selenium/blob/38d5e4440b2c866a78a1ccb2a18d9795a1bdeafd/third_party/js/mozmill/shared-modules/tabs.js#L190-L231
481
SeleniumHQ/selenium
third_party/js/mozmill/shared-modules/tabs.js
tabBrowser_getTab
function tabBrowser_getTab(index) { if (index === undefined) index = this.selectedIndex; return this.getElement({type: "tabs_tab", subtype: "index", value: index}); }
javascript
function tabBrowser_getTab(index) { if (index === undefined) index = this.selectedIndex; return this.getElement({type: "tabs_tab", subtype: "index", value: index}); }
[ "function", "tabBrowser_getTab", "(", "index", ")", "{", "if", "(", "index", "===", "undefined", ")", "index", "=", "this", ".", "selectedIndex", ";", "return", "this", ".", "getElement", "(", "{", "type", ":", "\"tabs_tab\"", ",", "subtype", ":", "\"index...
Get the tab at the specified index @param {number} index Index of the tab @returns The requested tab @type {ElemBase}
[ "Get", "the", "tab", "at", "the", "specified", "index" ]
38d5e4440b2c866a78a1ccb2a18d9795a1bdeafd
https://github.com/SeleniumHQ/selenium/blob/38d5e4440b2c866a78a1ccb2a18d9795a1bdeafd/third_party/js/mozmill/shared-modules/tabs.js#L335-L340
482
SeleniumHQ/selenium
third_party/js/mozmill/shared-modules/tabs.js
tabBrowser_getTabPanelElement
function tabBrowser_getTabPanelElement(tabIndex, elemString) { var index = tabIndex ? tabIndex : this.selectedIndex; var elemStr = elemString ? elemString : ""; // Get the tab panel and check if an element has to be fetched var panel = this.getElement({type: "tabs_tabPanel", subtype: "tab", value: th...
javascript
function tabBrowser_getTabPanelElement(tabIndex, elemString) { var index = tabIndex ? tabIndex : this.selectedIndex; var elemStr = elemString ? elemString : ""; // Get the tab panel and check if an element has to be fetched var panel = this.getElement({type: "tabs_tabPanel", subtype: "tab", value: th...
[ "function", "tabBrowser_getTabPanelElement", "(", "tabIndex", ",", "elemString", ")", "{", "var", "index", "=", "tabIndex", "?", "tabIndex", ":", "this", ".", "selectedIndex", ";", "var", "elemStr", "=", "elemString", "?", "elemString", ":", "\"\"", ";", "// G...
Creates the child element of the tab's notification bar @param {number} tabIndex (Optional) Index of the tab to check @param {string} elemString (Optional) Lookup string of the notification bar's child element @return The created child element @type {ElemBase}
[ "Creates", "the", "child", "element", "of", "the", "tab", "s", "notification", "bar" ]
38d5e4440b2c866a78a1ccb2a18d9795a1bdeafd
https://github.com/SeleniumHQ/selenium/blob/38d5e4440b2c866a78a1ccb2a18d9795a1bdeafd/third_party/js/mozmill/shared-modules/tabs.js#L352-L362
483
SeleniumHQ/selenium
third_party/js/mozmill/shared-modules/tabs.js
tabBrowser_openTab
function tabBrowser_openTab(aEvent) { var event = aEvent || { }; var type = (event.type == undefined) ? "menu" : event.type; // Disable tab closing animation for default behavior prefs.preferences.setPref(PREF_TABS_ANIMATE, false); // Add event listener to wait until the tab has been opened va...
javascript
function tabBrowser_openTab(aEvent) { var event = aEvent || { }; var type = (event.type == undefined) ? "menu" : event.type; // Disable tab closing animation for default behavior prefs.preferences.setPref(PREF_TABS_ANIMATE, false); // Add event listener to wait until the tab has been opened va...
[ "function", "tabBrowser_openTab", "(", "aEvent", ")", "{", "var", "event", "=", "aEvent", "||", "{", "}", ";", "var", "type", "=", "(", "event", ".", "type", "==", "undefined", ")", "?", "\"menu\"", ":", "event", ".", "type", ";", "// Disable tab closing...
Open a new tab @param {object} aEvent The event specifies how to open a new tab (menu, shortcut, Elements: type - Type of event (menu, newTabButton, shortcut, tabStrip) [optional - default: menu]
[ "Open", "a", "new", "tab" ]
38d5e4440b2c866a78a1ccb2a18d9795a1bdeafd
https://github.com/SeleniumHQ/selenium/blob/38d5e4440b2c866a78a1ccb2a18d9795a1bdeafd/third_party/js/mozmill/shared-modules/tabs.js#L416-L468
484
SeleniumHQ/selenium
third_party/js/mozmill/shared-modules/tabs.js
tabBrowser_waitForTabPanel
function tabBrowser_waitForTabPanel(tabIndex, elemString) { // Get the specified tab panel element var tabPanel = this.getTabPanelElement(tabIndex, elemString); // Get the style information for the tab panel element var style = this._controller.window.getComputedStyle(tabPanel.getNode(), null); ...
javascript
function tabBrowser_waitForTabPanel(tabIndex, elemString) { // Get the specified tab panel element var tabPanel = this.getTabPanelElement(tabIndex, elemString); // Get the style information for the tab panel element var style = this._controller.window.getComputedStyle(tabPanel.getNode(), null); ...
[ "function", "tabBrowser_waitForTabPanel", "(", "tabIndex", ",", "elemString", ")", "{", "// Get the specified tab panel element", "var", "tabPanel", "=", "this", ".", "getTabPanelElement", "(", "tabIndex", ",", "elemString", ")", ";", "// Get the style information for the t...
Waits for a particular tab panel element to display and stop animating @param {number} tabIndex Index of the tab to check @param {string} elemString Lookup string of the tab panel element
[ "Waits", "for", "a", "particular", "tab", "panel", "element", "to", "display", "and", "stop", "animating" ]
38d5e4440b2c866a78a1ccb2a18d9795a1bdeafd
https://github.com/SeleniumHQ/selenium/blob/38d5e4440b2c866a78a1ccb2a18d9795a1bdeafd/third_party/js/mozmill/shared-modules/tabs.js#L478-L492
485
SeleniumHQ/selenium
third_party/closure/goog/string/stringformat.js
replacerDemuxer
function replacerDemuxer( match, flags, width, dotp, precision, type, offset, wholeString) { // The % is too simple and doesn't take an argument. if (type == '%') { return '%'; } // Try to get the actual value from parent function. var value = args.shift(); // If we didn't get any ...
javascript
function replacerDemuxer( match, flags, width, dotp, precision, type, offset, wholeString) { // The % is too simple and doesn't take an argument. if (type == '%') { return '%'; } // Try to get the actual value from parent function. var value = args.shift(); // If we didn't get any ...
[ "function", "replacerDemuxer", "(", "match", ",", "flags", ",", "width", ",", "dotp", ",", "precision", ",", "type", ",", "offset", ",", "wholeString", ")", "{", "// The % is too simple and doesn't take an argument.", "if", "(", "type", "==", "'%'", ")", "{", ...
Chooses which conversion function to call based on type conversion specifier. @param {string} match Contains the re matched string. @param {string} flags Formatting flags. @param {string} width Replacement string minimum width. @param {string} dotp Matched precision including a dot. @param {string} precision Specifies ...
[ "Chooses", "which", "conversion", "function", "to", "call", "based", "on", "type", "conversion", "specifier", "." ]
38d5e4440b2c866a78a1ccb2a18d9795a1bdeafd
https://github.com/SeleniumHQ/selenium/blob/38d5e4440b2c866a78a1ccb2a18d9795a1bdeafd/third_party/closure/goog/string/stringformat.js#L66-L85
486
SeleniumHQ/selenium
javascript/selenium-core/scripts/htmlutils.js
getText
function getText(element) { var text = ""; var isRecentFirefox = (browserVersion.isFirefox && browserVersion.firefoxVersion >= "1.5"); if (isRecentFirefox || browserVersion.isKonqueror || browserVersion.isSafari || browserVersion.isOpera) { text = getTextContent(element); } else if (element.tex...
javascript
function getText(element) { var text = ""; var isRecentFirefox = (browserVersion.isFirefox && browserVersion.firefoxVersion >= "1.5"); if (isRecentFirefox || browserVersion.isKonqueror || browserVersion.isSafari || browserVersion.isOpera) { text = getTextContent(element); } else if (element.tex...
[ "function", "getText", "(", "element", ")", "{", "var", "text", "=", "\"\"", ";", "var", "isRecentFirefox", "=", "(", "browserVersion", ".", "isFirefox", "&&", "browserVersion", ".", "firefoxVersion", ">=", "\"1.5\"", ")", ";", "if", "(", "isRecentFirefox", ...
Returns the text in this element
[ "Returns", "the", "text", "in", "this", "element" ]
38d5e4440b2c866a78a1ccb2a18d9795a1bdeafd
https://github.com/SeleniumHQ/selenium/blob/38d5e4440b2c866a78a1ccb2a18d9795a1bdeafd/javascript/selenium-core/scripts/htmlutils.js#L161-L177
487
SeleniumHQ/selenium
javascript/selenium-core/scripts/htmlutils.js
normalizeSpaces
function normalizeSpaces(text) { // IE has already done this conversion, so doing it again will remove multiple nbsp if (browserVersion.isIE) { return text; } // Replace multiple spaces with a single space // TODO - this shouldn't occur inside PRE elements text = text.replace(/\ +/g...
javascript
function normalizeSpaces(text) { // IE has already done this conversion, so doing it again will remove multiple nbsp if (browserVersion.isIE) { return text; } // Replace multiple spaces with a single space // TODO - this shouldn't occur inside PRE elements text = text.replace(/\ +/g...
[ "function", "normalizeSpaces", "(", "text", ")", "{", "// IE has already done this conversion, so doing it again will remove multiple nbsp", "if", "(", "browserVersion", ".", "isIE", ")", "{", "return", "text", ";", "}", "// Replace multiple spaces with a single space", "// TOD...
Replace multiple sequential spaces with a single space, and then convert &nbsp; to space.
[ "Replace", "multiple", "sequential", "spaces", "with", "a", "single", "space", "and", "then", "convert", "&nbsp", ";", "to", "space", "." ]
38d5e4440b2c866a78a1ccb2a18d9795a1bdeafd
https://github.com/SeleniumHQ/selenium/blob/38d5e4440b2c866a78a1ccb2a18d9795a1bdeafd/javascript/selenium-core/scripts/htmlutils.js#L221-L240
488
SeleniumHQ/selenium
javascript/selenium-core/scripts/htmlutils.js
setText
function setText(element, text) { if (element.textContent != null) { element.textContent = text; } else if (element.innerText != null) { element.innerText = text; } }
javascript
function setText(element, text) { if (element.textContent != null) { element.textContent = text; } else if (element.innerText != null) { element.innerText = text; } }
[ "function", "setText", "(", "element", ",", "text", ")", "{", "if", "(", "element", ".", "textContent", "!=", "null", ")", "{", "element", ".", "textContent", "=", "text", ";", "}", "else", "if", "(", "element", ".", "innerText", "!=", "null", ")", "...
Sets the text in this element
[ "Sets", "the", "text", "in", "this", "element" ]
38d5e4440b2c866a78a1ccb2a18d9795a1bdeafd
https://github.com/SeleniumHQ/selenium/blob/38d5e4440b2c866a78a1ccb2a18d9795a1bdeafd/javascript/selenium-core/scripts/htmlutils.js#L260-L266
489
SeleniumHQ/selenium
javascript/selenium-core/scripts/htmlutils.js
AssertionArguments
function AssertionArguments(args) { if (args.length == 2) { this.comment = ""; this.expected = args[0]; this.actual = args[1]; } else { this.comment = args[0] + "; "; this.expected = args[1]; this.actual = args[2]; } }
javascript
function AssertionArguments(args) { if (args.length == 2) { this.comment = ""; this.expected = args[0]; this.actual = args[1]; } else { this.comment = args[0] + "; "; this.expected = args[1]; this.actual = args[2]; } }
[ "function", "AssertionArguments", "(", "args", ")", "{", "if", "(", "args", ".", "length", "==", "2", ")", "{", "this", ".", "comment", "=", "\"\"", ";", "this", ".", "expected", "=", "args", "[", "0", "]", ";", "this", ".", "actual", "=", "args", ...
Preprocess the arguments to allow for an optional comment.
[ "Preprocess", "the", "arguments", "to", "allow", "for", "an", "optional", "comment", "." ]
38d5e4440b2c866a78a1ccb2a18d9795a1bdeafd
https://github.com/SeleniumHQ/selenium/blob/38d5e4440b2c866a78a1ccb2a18d9795a1bdeafd/javascript/selenium-core/scripts/htmlutils.js#L758-L768
490
SeleniumHQ/selenium
javascript/selenium-core/scripts/htmlutils.js
o2s
function o2s(obj) { var s = ""; for (key in obj) { var line = key + "->" + obj[key]; line.replace("\n", " "); s += line + "\n"; } return s; }
javascript
function o2s(obj) { var s = ""; for (key in obj) { var line = key + "->" + obj[key]; line.replace("\n", " "); s += line + "\n"; } return s; }
[ "function", "o2s", "(", "obj", ")", "{", "var", "s", "=", "\"\"", ";", "for", "(", "key", "in", "obj", ")", "{", "var", "line", "=", "key", "+", "\"->\"", "+", "obj", "[", "key", "]", ";", "line", ".", "replace", "(", "\"\\n\"", ",", "\" \"", ...
for use from vs.2003 debugger
[ "for", "use", "from", "vs", ".", "2003", "debugger" ]
38d5e4440b2c866a78a1ccb2a18d9795a1bdeafd
https://github.com/SeleniumHQ/selenium/blob/38d5e4440b2c866a78a1ccb2a18d9795a1bdeafd/javascript/selenium-core/scripts/htmlutils.js#L821-L829
491
SeleniumHQ/selenium
javascript/selenium-core/scripts/htmlutils.js
getTimeoutTime
function getTimeoutTime(timeout) { var now = new Date().getTime(); var timeoutLength = parseInt(timeout); if (isNaN(timeoutLength)) { throw new SeleniumError("Timeout is not a number: '" + timeout + "'"); } return now + timeoutLength; }
javascript
function getTimeoutTime(timeout) { var now = new Date().getTime(); var timeoutLength = parseInt(timeout); if (isNaN(timeoutLength)) { throw new SeleniumError("Timeout is not a number: '" + timeout + "'"); } return now + timeoutLength; }
[ "function", "getTimeoutTime", "(", "timeout", ")", "{", "var", "now", "=", "new", "Date", "(", ")", ".", "getTime", "(", ")", ";", "var", "timeoutLength", "=", "parseInt", "(", "timeout", ")", ";", "if", "(", "isNaN", "(", "timeoutLength", ")", ")", ...
Returns the absolute time represented as an offset of the current time. Throws a SeleniumException if timeout is invalid. @param timeout the number of milliseconds from "now" whose absolute time to return
[ "Returns", "the", "absolute", "time", "represented", "as", "an", "offset", "of", "the", "current", "time", ".", "Throws", "a", "SeleniumException", "if", "timeout", "is", "invalid", "." ]
38d5e4440b2c866a78a1ccb2a18d9795a1bdeafd
https://github.com/SeleniumHQ/selenium/blob/38d5e4440b2c866a78a1ccb2a18d9795a1bdeafd/javascript/selenium-core/scripts/htmlutils.js#L943-L952
492
SeleniumHQ/selenium
javascript/selenium-core/scripts/htmlutils.js
hasJavascriptHref
function hasJavascriptHref(element) { if (getTagName(element) != 'a') { return false; } if (element.getAttribute('onclick')) { return false; } if (! element.href) { return false; } if (! /\s*javascript:/i.test(element.href)) { return false; } return tr...
javascript
function hasJavascriptHref(element) { if (getTagName(element) != 'a') { return false; } if (element.getAttribute('onclick')) { return false; } if (! element.href) { return false; } if (! /\s*javascript:/i.test(element.href)) { return false; } return tr...
[ "function", "hasJavascriptHref", "(", "element", ")", "{", "if", "(", "getTagName", "(", "element", ")", "!=", "'a'", ")", "{", "return", "false", ";", "}", "if", "(", "element", ".", "getAttribute", "(", "'onclick'", ")", ")", "{", "return", "false", ...
Returns true iff the given element represents a link with a javascript href attribute, and does not have an onclick attribute defined. @param element the element to test
[ "Returns", "true", "iff", "the", "given", "element", "represents", "a", "link", "with", "a", "javascript", "href", "attribute", "and", "does", "not", "have", "an", "onclick", "attribute", "defined", "." ]
38d5e4440b2c866a78a1ccb2a18d9795a1bdeafd
https://github.com/SeleniumHQ/selenium/blob/38d5e4440b2c866a78a1ccb2a18d9795a1bdeafd/javascript/selenium-core/scripts/htmlutils.js#L1004-L1018
493
SeleniumHQ/selenium
javascript/selenium-core/scripts/htmlutils.js
XPathEngine
function XPathEngine() { // public this.doc = null; /** * Returns whether the current runtime environment supports the use of this * engine. Needs override. */ this.isAvailable = function() { return false; }; /** * Sets the document to be used for evaluation. Always returns the cur...
javascript
function XPathEngine() { // public this.doc = null; /** * Returns whether the current runtime environment supports the use of this * engine. Needs override. */ this.isAvailable = function() { return false; }; /** * Sets the document to be used for evaluation. Always returns the cur...
[ "function", "XPathEngine", "(", ")", "{", "// public", "this", ".", "doc", "=", "null", ";", "/**\n * Returns whether the current runtime environment supports the use of this\n * engine. Needs override.\n */", "this", ".", "isAvailable", "=", "function", "(", ")", ...
An interface definition for XPath engine implementations; an instance of XPathEngine should be their prototype. Sub-implementations need only define overrides of the methods provided here.
[ "An", "interface", "definition", "for", "XPath", "engine", "implementations", ";", "an", "instance", "of", "XPathEngine", "should", "be", "their", "prototype", ".", "Sub", "-", "implementations", "need", "only", "define", "overrides", "of", "the", "methods", "pr...
38d5e4440b2c866a78a1ccb2a18d9795a1bdeafd
https://github.com/SeleniumHQ/selenium/blob/38d5e4440b2c866a78a1ccb2a18d9795a1bdeafd/javascript/selenium-core/scripts/htmlutils.js#L1061-L1111
494
SeleniumHQ/selenium
javascript/selenium-core/scripts/htmlutils.js
BoundedCache
function BoundedCache(newMaxSize) { var maxSize = newMaxSize; var map = {}; var size = 0; var counter = -1; /** * Adds a key-value pair to the cache. If the cache is at its size limit, * the least-recently used entry is evicted. */ this.put = function(key, value) { if (ma...
javascript
function BoundedCache(newMaxSize) { var maxSize = newMaxSize; var map = {}; var size = 0; var counter = -1; /** * Adds a key-value pair to the cache. If the cache is at its size limit, * the least-recently used entry is evicted. */ this.put = function(key, value) { if (ma...
[ "function", "BoundedCache", "(", "newMaxSize", ")", "{", "var", "maxSize", "=", "newMaxSize", ";", "var", "map", "=", "{", "}", ";", "var", "size", "=", "0", ";", "var", "counter", "=", "-", "1", ";", "/**\n * Adds a key-value pair to the cache. If the cac...
Cache class. @param newMaxSize the maximum number of entries to keep in the cache.
[ "Cache", "class", "." ]
38d5e4440b2c866a78a1ccb2a18d9795a1bdeafd
https://github.com/SeleniumHQ/selenium/blob/38d5e4440b2c866a78a1ccb2a18d9795a1bdeafd/javascript/selenium-core/scripts/htmlutils.js#L1292-L1362
495
SeleniumHQ/selenium
javascript/selenium-core/scripts/htmlutils.js
isXPathValid
function isXPathValid(xpath, node) { var contextNode = mirror.getReflection(); return (engine.setDocument(mirror.getReflection()) .selectSingleNode(xpath, contextNode, namespaceResolver) === node); }
javascript
function isXPathValid(xpath, node) { var contextNode = mirror.getReflection(); return (engine.setDocument(mirror.getReflection()) .selectSingleNode(xpath, contextNode, namespaceResolver) === node); }
[ "function", "isXPathValid", "(", "xpath", ",", "node", ")", "{", "var", "contextNode", "=", "mirror", ".", "getReflection", "(", ")", ";", "return", "(", "engine", ".", "setDocument", "(", "mirror", ".", "getReflection", "(", ")", ")", ".", "selectSingleNo...
Returns whether the given XPath evaluates to the given node in the test document.
[ "Returns", "whether", "the", "given", "XPath", "evaluates", "to", "the", "given", "node", "in", "the", "test", "document", "." ]
38d5e4440b2c866a78a1ccb2a18d9795a1bdeafd
https://github.com/SeleniumHQ/selenium/blob/38d5e4440b2c866a78a1ccb2a18d9795a1bdeafd/javascript/selenium-core/scripts/htmlutils.js#L1642-L1646
496
SeleniumHQ/selenium
javascript/selenium-core/scripts/htmlutils.js
isDetached
function isDetached(node) { while (node = node.parentNode) { if (node.nodeType == 11) { // it's a document fragment; we're detached (IE) return true; } else if (node.nodeType == 9) { // it's a normal document; we're attached ...
javascript
function isDetached(node) { while (node = node.parentNode) { if (node.nodeType == 11) { // it's a document fragment; we're detached (IE) return true; } else if (node.nodeType == 9) { // it's a normal document; we're attached ...
[ "function", "isDetached", "(", "node", ")", "{", "while", "(", "node", "=", "node", ".", "parentNode", ")", "{", "if", "(", "node", ".", "nodeType", "==", "11", ")", "{", "// it's a document fragment; we're detached (IE)", "return", "true", ";", "}", "else",...
Returns whether a node is detached from any live documents. Detached nodes should be considered invalidated and evicted from any caches.
[ "Returns", "whether", "a", "node", "is", "detached", "from", "any", "live", "documents", ".", "Detached", "nodes", "should", "be", "considered", "invalidated", "and", "evicted", "from", "any", "caches", "." ]
38d5e4440b2c866a78a1ccb2a18d9795a1bdeafd
https://github.com/SeleniumHQ/selenium/blob/38d5e4440b2c866a78a1ccb2a18d9795a1bdeafd/javascript/selenium-core/scripts/htmlutils.js#L1814-L1828
497
SeleniumHQ/selenium
javascript/selenium-core/scripts/htmlutils.js
getEngineFor
function getEngineFor(inDocument) { if (allowNativeXPath && nativeEngine.setDocument(inDocument).isAvailable()) { return nativeEngine; } var currentEngine = engines[currentEngineName]; if (currentEngine && currentEngine.setDocument(inDocument).isAvai...
javascript
function getEngineFor(inDocument) { if (allowNativeXPath && nativeEngine.setDocument(inDocument).isAvailable()) { return nativeEngine; } var currentEngine = engines[currentEngineName]; if (currentEngine && currentEngine.setDocument(inDocument).isAvai...
[ "function", "getEngineFor", "(", "inDocument", ")", "{", "if", "(", "allowNativeXPath", "&&", "nativeEngine", ".", "setDocument", "(", "inDocument", ")", ".", "isAvailable", "(", ")", ")", "{", "return", "nativeEngine", ";", "}", "var", "currentEngine", "=", ...
Returns the most sensible engine given the settings and the document object.
[ "Returns", "the", "most", "sensible", "engine", "given", "the", "settings", "and", "the", "document", "object", "." ]
38d5e4440b2c866a78a1ccb2a18d9795a1bdeafd
https://github.com/SeleniumHQ/selenium/blob/38d5e4440b2c866a78a1ccb2a18d9795a1bdeafd/javascript/selenium-core/scripts/htmlutils.js#L1981-L1995
498
SeleniumHQ/selenium
javascript/selenium-core/scripts/htmlutils.js
dispatch
function dispatch(methodName, inDocument, xpath, contextNode, namespaceResolver) { xpath = preprocess(xpath); if (! contextNode) { contextNode = inDocument; } var result = getEngineFor(inDocument) .setIgnoreAttributesWithoutValue(ignoreAttributesWithoutValue) ...
javascript
function dispatch(methodName, inDocument, xpath, contextNode, namespaceResolver) { xpath = preprocess(xpath); if (! contextNode) { contextNode = inDocument; } var result = getEngineFor(inDocument) .setIgnoreAttributesWithoutValue(ignoreAttributesWithoutValue) ...
[ "function", "dispatch", "(", "methodName", ",", "inDocument", ",", "xpath", ",", "contextNode", ",", "namespaceResolver", ")", "{", "xpath", "=", "preprocess", "(", "xpath", ")", ";", "if", "(", "!", "contextNode", ")", "{", "contextNode", "=", "inDocument",...
Dispatches an XPath evaluation method on the relevant engine for the given document, and returns the result
[ "Dispatches", "an", "XPath", "evaluation", "method", "on", "the", "relevant", "engine", "for", "the", "given", "document", "and", "returns", "the", "result" ]
38d5e4440b2c866a78a1ccb2a18d9795a1bdeafd
https://github.com/SeleniumHQ/selenium/blob/38d5e4440b2c866a78a1ccb2a18d9795a1bdeafd/javascript/selenium-core/scripts/htmlutils.js#L2001-L2013
499
SeleniumHQ/selenium
javascript/selenium-core/scripts/htmlutils.js
eval_xpath
function eval_xpath(xpath, inDocument, opts) { if (! opts) { var opts = {}; } var contextNode = opts.contextNode ? opts.contextNode : inDocument; var namespaceResolver = opts.namespaceResolver ? opts.namespaceResolver : null; var xpathLibrary = opts.xpathLibrary ? op...
javascript
function eval_xpath(xpath, inDocument, opts) { if (! opts) { var opts = {}; } var contextNode = opts.contextNode ? opts.contextNode : inDocument; var namespaceResolver = opts.namespaceResolver ? opts.namespaceResolver : null; var xpathLibrary = opts.xpathLibrary ? op...
[ "function", "eval_xpath", "(", "xpath", ",", "inDocument", ",", "opts", ")", "{", "if", "(", "!", "opts", ")", "{", "var", "opts", "=", "{", "}", ";", "}", "var", "contextNode", "=", "opts", ".", "contextNode", "?", "opts", ".", "contextNode", ":", ...
Evaluates an xpath on a document, and returns a list containing nodes in the resulting nodeset. The browserbot xpath methods are now backed by this function. A context node may optionally be provided, and the xpath will be evaluated from that context. @param xpath the xpath to evaluate @param inDocument the doc...
[ "Evaluates", "an", "xpath", "on", "a", "document", "and", "returns", "a", "list", "containing", "nodes", "in", "the", "resulting", "nodeset", ".", "The", "browserbot", "xpath", "methods", "are", "now", "backed", "by", "this", "function", ".", "A", "context",...
38d5e4440b2c866a78a1ccb2a18d9795a1bdeafd
https://github.com/SeleniumHQ/selenium/blob/38d5e4440b2c866a78a1ccb2a18d9795a1bdeafd/javascript/selenium-core/scripts/htmlutils.js#L2140-L2181