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

Method focus

lib/helper/Playwright.js:1530–1536  ·  view source on GitHub ↗

* {{> focus }} *

(locator, options = {})

Source from the content-addressed store, hash-verified

1528 *
1529 */
1530 async focus(locator, options = {}) {
1531 const el = await this._locateElement(locator)
1532 assertElementExists(el, locator, 'Element to focus')
1533
1534 await el.focus(options)
1535 return this._waitForAction()
1536 }
1537
1538 /**
1539 * {{> blur }}

Callers

nothing calls this directly

Calls 3

_locateElementMethod · 0.95
_waitForActionMethod · 0.95
assertElementExistsFunction · 0.70

Tested by

no test coverage detected