MCPcopy
hub / github.com/codeceptjs/CodeceptJS / dontSeeElement

Method dontSeeElement

lib/helper/Appium.js:1567–1589  ·  view source on GitHub ↗

* {{> dontSeeElement }}

(locator, context = null)

Source from the content-addressed store, hash-verified

1565 * {{> dontSeeElement }}
1566 */
1567 async dontSeeElement(locator, context = null) {
1568 if (this.isWeb) return super.dontSeeElement(locator, context)
1569
1570 // For mobile native apps, use safe isDisplayed wrapper
1571 const parsedLocator = parseLocator.call(this, locator)
1572 const res = await this._locate(parsedLocator, false)
1573
1574 if (!res || res.length === 0) {
1575 return truth(`elements of ${Locator.build(parsedLocator)}`, 'to be seen').negate(false)
1576 }
1577
1578 const selected = []
1579 for (const el of res) {
1580 const displayed = await this._isDisplayedSafe(el)
1581 if (displayed) selected.push(true)
1582 }
1583
1584 try {
1585 return truth(`elements of ${Locator.build(parsedLocator)}`, 'to be seen').negate(selected)
1586 } catch (err) {
1587 throw err
1588 }
1589 }
1590
1591 /**
1592 * {{> dontSeeInField }}

Callers 13

AppiumWeb_test.jsFile · 0.45
Playwright_test.jsFile · 0.45
Appium_ios_test.jsFile · 0.45
WebDriver_test.jsFile · 0.45
Puppeteer_test.jsFile · 0.45
Appium_test.jsFile · 0.45
testsFunction · 0.45
AppiumTs.types.tsFile · 0.45
Appium.types.tsFile · 0.45

Calls 5

_isDisplayedSafeMethod · 0.95
truthFunction · 0.90
negateMethod · 0.80
pushMethod · 0.80
_locateMethod · 0.45

Tested by

no test coverage detected