MCPcopy Create free account
hub / github.com/SeleniumHQ/selenium / stalenessOf

Function stalenessOf

javascript/selenium-webdriver/lib/until.js:264–278  ·  view source on GitHub ↗

* Creates a condition that will wait for the given element to become stale. An * element is considered stale once it is removed from the DOM, or a new page * has loaded. * * @param {!./webdriver.WebElement} element The element that should become stale. * @return {!Condition } The new co

(element)

Source from the content-addressed store, hash-verified

262 * @return {!Condition<boolean>} The new condition.
263 */
264function stalenessOf(element) {
265 return new Condition('element to become stale', function () {
266 return element.getTagName().then(
267 function () {
268 return false
269 },
270 function (e) {
271 if (e instanceof error.StaleElementReferenceError) {
272 return true
273 }
274 throw e
275 },
276 )
277 })
278}
279
280/**
281 * Creates a condition that will wait for the given element to become visible.

Callers

nothing calls this directly

Calls 1

getTagNameMethod · 0.65

Tested by

no test coverage detected