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

Function stalenessOf

javascript/selenium-webdriver/lib/until.js:266–280  ·  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

264 * @return {!Condition<boolean>} The new condition.
265 */
266function stalenessOf(element) {
267 return new Condition('element to become stale', function () {
268 return element.getTagName().then(
269 function () {
270 return false
271 },
272 function (e) {
273 if (e instanceof error.StaleElementReferenceError) {
274 return true
275 }
276 throw e
277 },
278 )
279 })
280}
281
282/**
283 * 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