MCPcopy Index your code
hub / github.com/SeleniumHQ/selenium / pause

Method pause

javascript/selenium-webdriver/lib/input.js:746–763  ·  view source on GitHub ↗

* Inserts a pause action for the specified devices, ensuring each device is * idle for a tick. The length of the pause (in milliseconds) may be specified * as the first parameter to this method (defaults to 0). Otherwise, you may * just specify the individual devices that should pause. *

(duration, ...devices)

Source from the content-addressed store, hash-verified

744 * @return {!Actions} a self reference.
745 */
746 pause(duration, ...devices) {
747 if (duration instanceof Device) {
748 devices.push(duration)
749 duration = 0
750 } else if (!duration) {
751 duration = 0
752 }
753
754 const action = { type: Action.Type.PAUSE, duration }
755
756 // NB: need a properly typed variable for type checking.
757 /** @type {!Iterable<!Device>} */
758 const iterable = devices.length === 0 ? this.sequences_.keys() : devices
759 for (const device of iterable) {
760 this.sequence_(device).push(action)
761 }
762 return this.sync_ ? this.synchronize() : this
763 }
764
765 /**
766 * Inserts an action to press a single key.

Callers 2

input_test.jsFile · 0.45
base.jsFile · 0.45

Calls 3

sequence_Method · 0.95
synchronizeMethod · 0.95
keysMethod · 0.45

Tested by

no test coverage detected