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

Method type

lib/helper/Puppeteer.js:1570–1582  ·  view source on GitHub ↗

* {{> type }}

(keys, delay = null)

Source from the content-addressed store, hash-verified

1568 * {{> type }}
1569 */
1570 async type(keys, delay = null) {
1571 await checkFocusBeforeType(this)
1572
1573 if (!Array.isArray(keys)) {
1574 keys = keys.toString()
1575 keys = keys.split('')
1576 }
1577
1578 for (const key of keys) {
1579 await this.page.keyboard.press(key)
1580 if (delay) await this.wait(delay / 1000)
1581 }
1582 }
1583
1584 /**
1585 * {{> fillField }}

Callers 9

getBrowserErrorsFunction · 0.45
normalizeBrowserLogsFunction · 0.45
_afterMethod · 0.45
_sessionMethod · 0.45
fillFieldMethod · 0.45
appendFieldMethod · 0.45
targetCreatedHandlerFunction · 0.45
heal.jsFile · 0.45
heal_recipes.jsFile · 0.45

Calls 3

waitMethod · 0.95
checkFocusBeforeTypeFunction · 0.90
toStringMethod · 0.45

Tested by

no test coverage detected