MCPcopy Index your code
hub / github.com/codeceptjs/CodeceptJS / prepareLocateFn

Function prepareLocateFn

lib/helper/WebDriver.js:3474–3483  ·  view source on GitHub ↗
(context)

Source from the content-addressed store, hash-verified

3472}
3473
3474function prepareLocateFn(context) {
3475 if (!context) return this._locate.bind(this)
3476 return l => {
3477 l = new Locator(l, 'css')
3478 return this._locate(context, true).then(async res => {
3479 assertElementExists(res, context, 'Context element')
3480 return res[0].$$(l.simplify())
3481 })
3482 }
3483}
3484
3485function logEvents(event) {
3486 browserLogs.push(event.text) // add log message to the array

Callers

nothing calls this directly

Calls 4

$$Method · 0.80
assertElementExistsFunction · 0.70
simplifyMethod · 0.65
_locateMethod · 0.45

Tested by

no test coverage detected