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

Method type

lib/helper/WebDriver.js:2269–2284  ·  view source on GitHub ↗

* {{> type }}

(keys, delay = null)

Source from the content-addressed store, hash-verified

2267 * {{> type }}
2268 */
2269 async type(keys, delay = null) {
2270 await checkFocusBeforeType(this)
2271
2272 if (!Array.isArray(keys)) {
2273 keys = keys.toString()
2274 keys = keys.split('')
2275 }
2276 if (delay) {
2277 for (const key of keys) {
2278 await this.browser.keys(key)
2279 await this.wait(delay / 1000)
2280 }
2281 return
2282 }
2283 await this.browser.keys(keys)
2284 }
2285
2286 /**
2287 * Appium: not tested in web, in apps doesn't work

Callers

nothing calls this directly

Calls 3

waitMethod · 0.95
checkFocusBeforeTypeFunction · 0.90
toStringMethod · 0.45

Tested by

no test coverage detected