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

Method clearField

lib/helper/Playwright.js:2300–2311  ·  view source on GitHub ↗

* {{> clearField }}

(locator, context = null)

Source from the content-addressed store, hash-verified

2298 * {{> clearField }}
2299 */
2300 async clearField(locator, context = null) {
2301 const els = await findFields.call(this, locator, context)
2302 assertElementExists(els, locator, 'Field to clear')
2303
2304 const el = selectElement(els, locator, this)
2305
2306 await highlightActiveElement.call(this, el)
2307
2308 await el.clear()
2309
2310 return this._waitForAction()
2311 }
2312
2313 /**
2314 * {{> appendField }}

Callers

nothing calls this directly

Calls 4

_waitForActionMethod · 0.95
selectElementFunction · 0.90
assertElementExistsFunction · 0.70
clearMethod · 0.45

Tested by

no test coverage detected