Sha256: d504cdc69c8ddace1a5ce93b018b45f37411ce1a967d833eaf100fcb7f885fe3
Contents?: true
Size: 1.13 KB
Versions: 26
Compression:
Stored size: 1.13 KB
Contents
'use strict'; var index = require('../keyboard/index.js'); require('../utils/click/isClickableInput.js'); require('../utils/dataTransfer/Clipboard.js'); require('../utils/edit/isEditable.js'); require('../utils/edit/maxLength.js'); require('../utils/keyDef/readNextDescriptor.js'); require('../utils/misc/level.js'); require('../options.js'); var setSelectionRange = require('../event/selection/setSelectionRange.js'); async function type(element, text, { skipClick = this.config.skipClick, skipAutoClose = this.config.skipAutoClose, initialSelectionStart, initialSelectionEnd } = {}) { // TODO: properly type guard // we use this workaround for now to prevent changing behavior if (element.disabled) return; if (!skipClick) { await this.click(element); } if (initialSelectionStart !== undefined) { setSelectionRange.setSelectionRange(element, initialSelectionStart, initialSelectionEnd !== null && initialSelectionEnd !== void 0 ? initialSelectionEnd : initialSelectionStart); } await this.keyboard(text); if (!skipAutoClose) { await index.releaseAllKeys(this); } } exports.type = type;
Version data entries
26 entries across 26 versions & 1 rubygems