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

Method focus

lib/helper/WebDriver.js:2320–2326  ·  view source on GitHub ↗

* {{> focus }} *

(locator)

Source from the content-addressed store, hash-verified

2318 *
2319 */
2320 async focus(locator) {
2321 const els = await this._locate(locator)
2322 assertElementExists(els, locator, 'Element to focus')
2323 const el = usingFirstElement(els)
2324
2325 await focusElement(el, this.browser)
2326 }
2327
2328 /**
2329 * {{> blur }}

Callers

nothing calls this directly

Calls 4

_locateMethod · 0.95
focusElementFunction · 0.90
usingFirstElementFunction · 0.85
assertElementExistsFunction · 0.70

Tested by

no test coverage detected