MCPcopy Index your code
hub / github.com/SeleniumHQ/selenium / normalize_

Method normalize_

javascript/selenium-webdriver/lib/webdriver.js:1029–1036  ·  view source on GitHub ↗

* @param {!Function} webElementPromise The webElement in unresolved state * @return {!Promise<!WebElement>} First single WebElement from array of resolved promises

(webElementPromise)

Source from the content-addressed store, hash-verified

1027 * @return {!Promise<!WebElement>} First single WebElement from array of resolved promises
1028 */
1029 async normalize_(webElementPromise) {
1030 let result = await webElementPromise
1031 if (result.length === 0) {
1032 throw new NoSuchElementError('Cannot locate an element with provided parameters')
1033 } else {
1034 return result[0]
1035 }
1036 }
1037
1038 /**
1039 * @param {!Function} locatorFn The locator function to use.

Callers 1

findElementMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected