Inputmask icon indicating copy to clipboard operation
Inputmask copied to clipboard

Selenium don't record typing

Open sanyi9305 opened this issue 2 years ago • 2 comments

I would like to use the Selenium IDE for testing, but the typing will not be recorded. I see that this section no longer allows: keypressEvent: function (e, t, i, a, o) { var u = this.inputmask || this, c = u.opts, f = u.dependencyLib, d = u.maskset, p = u.el, h = f(p), v = e.keyCode; if (!(!0 === t || e.ctrlKey && e.altKey) && (e.ctrlKey || e.metaKey || u.ignorable)) return v === r.default.ENTER && u.undoValue !== u._valueGet(!0) && (u.undoValue = u._valueGet(!0), setTimeout((function () { h.trigger("change") }), 0)), u.skipInputEvent = !0, !0; if (v) { 44 !== v && 46 !== v || 3 !== e.location || "" === c.radixPoint || (v = c.radixPoint.charCodeAt(0)); var m, g = t ? { begin: o, end: o } : n.caret.call(u, p), k = String.fromCharCode(v); k = c.substitutes[k] || k, d.writeOutBuffer = !0; var y = s.isValid.call(u, g, k, a, void 0, void 0, void 0, t); if (!1 !== y && (n.resetMaskSet.call(u, !0), m = void 0 !== y.caret ? y.caret : n.seekNext.call(u, y.pos.begin ? y.pos.begin : y.pos), d.p = m), m = c.numericInput && void 0 === y.caret ? n.seekPrevious.call(u, m) : m, !1 !== i && (setTimeout((function () { c.onKeyValidation.call(p, v, y) }), 0), d.writeOutBuffer && !1 !== y)) { var b = n.getBuffer.call(u); (0, l.writeBuffer)(p, b, m, e, !0 !== t) } if (e.preventDefault(), t) return !1 !== y && (y.forwardPosition = m), y } }, You will try here: https://codepen.io/sanyi9305/pen/popPQvP

  • Inputmask version: Version: 5.0.8-beta.17

sanyi9305 avatar Apr 01 '22 13:04 sanyi9305

I think is more a jquery issue. Can you try with the version with the "native" dependencylib. inputmask.js

On Fri, Apr 1, 2022 at 3:52 PM sanyi9305 @.***> wrote:

I would like to use the Selenium IDE for testing, but the typing will not be recorded. I see that this section no longer allows: keypressEvent: function (e, t, i, a, o) { var u = this.inputmask || this, c = u.opts, f = u.dependencyLib, d = u.maskset, p = u.el, h = f(p), v = e.keyCode; if (!(!0 === t || e.ctrlKey && e.altKey) && (e.ctrlKey || e.metaKey || u.ignorable)) return v === r.default.ENTER && u.undoValue !== u._valueGet(!0) && (u.undoValue = u._valueGet(!0), setTimeout((function () { h.trigger("change") }), 0)), u.skipInputEvent = !0, !0; if (v) { 44 !== v && 46 !== v || 3 !== e.location || "" === c.radixPoint || (v = c.radixPoint.charCodeAt(0)); var m, g = t ? { begin: o, end: o } : n.caret.call(u, p), k = String.fromCharCode(v); k = c.substitutes[k] || k, d.writeOutBuffer = !0; var y = s.isValid.call(u, g, k, a, void 0, void 0, void 0, t); if (!1 !== y && (n.resetMaskSet.call(u, !0), m = void 0 !== y.caret ? y.caret : n.seekNext.call(u, y.pos.begin ? y.pos.begin : y.pos), d.p = m), m = c.numericInput && void 0 === y.caret ? n.seekPrevious.call(u, m) : m, !1 !== i && (setTimeout((function () { c.onKeyValidation.call(p, v, y) }), 0), d.writeOutBuffer && !1 !== y)) { var b = n.getBuffer.call(u); (0, l.writeBuffer)(p, b, m, e, !0 !== t) } if (e.preventDefault(), t) return !1 !== y && (y.forwardPosition = m), y } }, You will try here: https://codepen.io/sanyi9305/pen/popPQvP

  • Inputmask version: Version: 5.0.8-beta.17

— Reply to this email directly, view it on GitHub https://github.com/RobinHerbots/Inputmask/issues/2608, or unsubscribe https://github.com/notifications/unsubscribe-auth/AACNX35SZRLZSVJJW2NCMITVC35QJANCNFSM5SIYPDUA . You are receiving this because you are subscribed to this thread.Message ID: @.***>

RobinHerbots avatar Apr 06 '22 13:04 RobinHerbots

When I comment this : (e.preventDefault() the reording was good but When I pressed a character it became duplicate.

sanyi9305 avatar Apr 12 '22 11:04 sanyi9305