UNPKG

testcafe

Version:

Automated browser testing for the modern web development stack.

1 lines 123 kB
window["%hammerhead%"].utils.removeInjectedScript(),function Tc(Nc){var Rc=Nc.document;!function(c,t,_,E,e){function n(t){return t&&"object"==typeof t&&"default"in t?t:{default:t}}var s=n(c),i=n(t),o=n(e),r=function(t,e){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])})(t,e)};function a(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}function l(t,s,a,l){return new(a=a||i.default)(function(n,e){function i(t){try{o(l.next(t))}catch(t){e(t)}}function r(t){try{o(l.throw(t))}catch(t){e(t)}}function o(t){var e;t.done?n(t.value):((e=t.value)instanceof a?e:new a(function(t){t(e)})).then(i,r)}o((l=l.apply(t,s||[])).next())})}function C(n,i){var r,o,s,a={label:0,sent:function(){if(1&s[0])throw s[1];return s[1]},trys:[],ops:[]},l=Object.create(("function"==typeof Iterator?Iterator:Object).prototype);return l.next=t(0),l.throw=t(1),l.return=t(2),"function"==typeof Symbol&&(l[Symbol.iterator]=function(){return this}),l;function t(e){return function(t){return function(e){if(r)throw new TypeError("Generator is already executing.");for(;l&&e[l=0]&&(a=0),a;)try{if(r=1,o&&(s=2&e[0]?o.return:e[0]?o.throw||((s=o.return)&&s.call(o),0):o.next)&&!(s=s.call(o,e[1])).done)return s;switch(o=0,s&&(e=[2&e[0],s.value]),e[0]){case 0:case 1:s=e;break;case 4:return a.label++,{value:e[1],done:!1};case 5:a.label++,o=e[1],e=[0];continue;case 7:e=a.ops.pop(),a.trys.pop();continue;default:if(!(s=0<(s=a.trys).length&&s[s.length-1])&&(6===e[0]||2===e[0])){a=0;continue}if(3===e[0]&&(!s||e[1]>s[0]&&e[1]<s[3])){a.label=e[1];break}if(6===e[0]&&a.label<s[1]){a.label=s[1],s=e;break}if(s&&a.label<s[2]){a.label=s[2],a.ops.push(e);break}s[2]&&a.ops.pop(),a.trys.pop();continue}e=i.call(n,a)}catch(t){e=[6,t],o=0}finally{r=s=0}if(5&e[0])throw e[1];return{value:e[0]?e[1]:void 0,done:!0}}([e,t])}}}var u,d,h=Math.floor(399);(d=u=u||{}).ready="ready",d.readyForBrowserManipulation="ready-for-browser-manipulation",d.waitForFileDownload="wait-for-file-download";var f=u,p={dispatchEvent:"dispatch-event",click:"click",rightClick:"right-click",doubleClick:"double-click",drag:"drag",dragToElement:"drag-to-element",hover:"hover",scroll:"scroll",scrollBy:"scroll-by",scrollIntoView:"scroll-into-view",typeText:"type-text",selectText:"select-text",selectTextAreaContent:"select-text-area-content",selectEditableContent:"select-editable-content",pressKey:"press-key",wait:"wait",navigateTo:"navigate-to",setFilesToUpload:"set-files-to-upload",clearUpload:"clear-upload",executeClientFunction:"execute-client-function",executeSelector:"execute-selector",takeScreenshot:"take-screenshot",takeElementScreenshot:"take-element-screenshot",takeScreenshotOnFail:"take-screenshot-on-fail",prepareBrowserManipulation:"prepare-browser-manipulation",showAssertionRetriesStatus:"show-assertion-retries-status",hideAssertionRetriesStatus:"hide-assertion-retries-status",setBreakpoint:"set-breakpoint",resizeWindow:"resize-window",resizeWindowToFitDevice:"resize-window-to-fit-device",maximizeWindow:"maximize-window",switchToIframe:"switch-to-iframe",switchToMainWindow:"switch-to-main-window",openWindow:"open-window",closeWindow:"close-window",getCurrentWindow:"get-current-window",getCurrentWindows:"get-current-windows",getCurrentCDPSession:"get-current-c-d-p-session",switchToWindow:"switch-to-window",switchToWindowByPredicate:"switch-to-window-by-predicate",switchToParentWindow:"switch-to-parent-window",switchToPreviousWindow:"switch-to-previous-window",setNativeDialogHandler:"set-native-dialog-handler",getNativeDialogHistory:"get-native-dialog-history",getBrowserConsoleMessages:"get-browser-console-messages",getActiveElement:"get-active-element",setTestSpeed:"set-test-speed",setPageLoadTimeout:"set-page-load-timeout",debug:"debug",assertion:"assertion",useRole:"useRole",testDone:"test-done",backupStorages:"backup-storages",executeExpression:"execute-expression",executeAsyncExpression:"execute-async-expression",unlockPage:"unlock-page",closeChildWindowOnFileDownloading:"close-child-window-on-file-downloading",recorder:"recorder",prepareClientEnvironmentInDebugMode:"prepare-client-environment-in-debug-mode",getCookies:"get-cookies",setCookies:"set-cookies",deleteCookies:"delete-cookies",getProxyUrl:"get-proxy-url",request:"request",skipJsErrors:"skip-js-errors",addRequestHooks:"add-request-hooks",removeRequestHooks:"remove-request-hooks",runCustomAction:"run-custom-action",report:"report"};function m(t){return!(g(i=t)||i.type===p.wait||i.type===p.assertion||i.type===p.executeExpression||w(t)||(n=t).type===p.testDone||n.type===p.showAssertionRetriesStatus||n.type===p.hideAssertionRetriesStatus||n.type===p.setBreakpoint||n.type===p.takeScreenshotOnFail||n.type===p.recorder||n.type===p.getProxyUrl)||v(t)&&!((e=t).type===p.switchToIframe||e.type===p.switchToMainWindow);var e,n,i}function g(t){return t.type===p.executeClientFunction||t.type===p.executeSelector}function v(t){return t.type===p.resizeWindow||t.type===p.resizeWindowToFitDevice||t.type===p.maximizeWindow}function w(t){return(e=t).type===p.takeScreenshot||e.type===p.takeElementScreenshot||e.type===p.takeScreenshotOnFail||v(t);var e}function y(t,e){this.code=t,this.isTestCafeError=!0,this.callsite=e||null}var I,S="step",A="E1",W="E4",b="E5",T="E9",N="E10",R="E11",x="E12",D="E24",P="E26",M="E27",F="E28",O="E29",k="E30",L="E31",U="E32",H="E33",G="E34",B="E35",V="E36",q="E37",z="E39",j="E40",X="E41",Y="E42",J="E43",K="E44",$="E45",Q="E46",Z="E49",tt="E50",et="E51",nt="E52",it="E57",rt="E64",ot="E65",st="E68",at="E69",lt="E70",ut="E71",ct="E72",dt="E73",ht="E74",ft="E76",pt="E77",mt="E78",gt="E82",vt="E83",wt="E90",yt="E91",_t="E92",Et="E93",Ct="E94",It="E95",St="E97",At="E99",Wt="E100",bt="E101",Tt="E102",Nt=(a(Rt,I=y),Rt);function Rt(t,e,n){var i=I.call(this,t)||this;return i.optionName=e,i.actualValue=n,i}var xt,Dt=(a(Pt,xt=y),Pt);function Pt(t,e){var n=xt.call(this,Z,e)||this;return n.instantiationCallsiteName=t,n}var Mt,Ft=(a(Ot,Mt=y),Ot);function Ot(t,e){var n=Mt.call(this,tt,e)||this;return n.instantiationCallsiteName=t,n}var kt,Lt=(a(Ut,kt=y),Ut);function Ut(t,e,n){var i=void 0===e?{}:e,r=i.apiFnChain,o=i.apiFnIndex,s=i.reason,a=kt.call(this,t,n)||this;return a.apiFnChain=r,a.apiFnIndex=o,a.reason=s,a}var Ht,Gt=(a(Bt,Ht=y),Bt);function Bt(t){return Ht.call(this,et,t)||this}var Vt,qt=(a(zt,Vt=Lt),zt);function zt(t,e){return Vt.call(this,nt,e,t)||this}var jt,Xt=(a(Yt,jt=y),Yt);function Yt(t,e){var n=jt.call(this,A)||this;return n.errStack=t,n.pageDestUrl=e,n}var Jt,Kt=(a($t,Jt=y),$t);function $t(t,e,n){var i=Jt.call(this,W,n)||this;return i.errMsg=String(e),i.instantiationCallsiteName=t,i}var Qt,Zt=(a(te,Qt=y),te);function te(t,e,n,i){var r=Qt.call(this,b,i)||this;return r.errMsg=String(e),r.property=n,r.instantiationCallsiteName=t,r}var ee,ne=(a(ie,ee=y),ie);function ie(t){var e=ee.call(this,rt)||this;return e.errMsg=String(t),e}var re,oe=(a(se,re=y),se);function se(t,e){var n=re.call(this,ot)||this;return n.errMsg=String(t),n.moduleName=e,n}var ae,le=(a(ue,ae=Nt),ue);function ue(t,e){return ae.call(this,T,t,e)||this}var ce,de=(a(he,ce=Nt),he);function he(t,e){return ce.call(this,N,t,e)||this}var fe,pe=(a(me,fe=Nt),me);function me(t,e){return fe.call(this,R,t,e)||this}var ge,ve=(a(we,ge=Nt),we);function we(t,e){return ge.call(this,x,t,e)||this}var ye,_e=(a(Ee,ye=Nt),Ee);function Ee(t,e){return ye.call(this,wt,t,e)||this}var Ce,Ie=(a(Se,Ce=Nt),Se);function Se(t,e){return Ce.call(this,St,t,e)||this}var Ae,We=(a(be,Ae=Nt),be);function be(t,e){return Ae.call(this,yt,t,e)||this}var Te,Ne=(a(Re,Te=Nt),Re);function Re(t,e){return Te.call(this,_t,t,e)||this}var xe,De=(a(Pe,xe=Nt),Pe);function Pe(t,e){return xe.call(this,Et,t,e)||this}var Me,Fe=(a(Oe,Me=Nt),Oe);function Oe(t,e){return Me.call(this,Ct,t,e)||this}var ke,Le=(a(Ue,ke=Nt),Ue);function Ue(t,e){return ke.call(this,It,t,e)||this}var He,Ge=(a(Be,He=Nt),Be);function Be(t,e){return He.call(this,At,t,e)||this}var Ve,qe=(a(ze,Ve=y),ze);function ze(t,e,n){var i=Ve.call(this,Wt)||this;return i.objectName=t,i.propertyName=e,i.availableProperties=n,i}var je,Xe=(a(Ye,je=Lt),Ye);function Ye(t,e){return je.call(this,D,e,t)||this}var Je,Ke=(a($e,Je=Lt),$e);function $e(t,e){return Je.call(this,P,e,t)||this}var Qe,Ze=(a(tn,Qe=y),tn);function tn(t){var e=Qe.call(this,M)||this;return e.nodeDescription=t,e}var en,nn=(a(rn,en=Lt),rn);function rn(t,e){var n=en.call(this,F,e)||this;return n.argumentName=t,n}var on,sn=(a(an,on=y),an);function an(t){return on.call(this,bt,t)||this}var ln,un=(a(cn,ln=Lt),cn);function cn(t,e){var n=ln.call(this,O,e)||this;return n.argumentName=t,n}var dn,hn=(a(fn,dn=y),fn);function fn(t,e){var n=dn.call(this,k)||this;return n.argumentName=t,n.nodeDescription=e,n}var pn,mn=(a(gn,pn=y),gn);function gn(){return pn.call(this,L)||this}var vn,wn=(a(yn,vn=y),yn);function yn(){return vn.call(this,U)||this}var _n,En=(a(Cn,_n=y),Cn);function Cn(t){var e=_n.call(this,H)||this;return e.argumentName=t,e}var In,Sn=(a(An,In=y),An);function An(){return In.call(this,B)||this}var Wn,bn=(a(Tn,Wn=y),Tn);function Tn(t){var e=Wn.call(this,V)||this;return e.argumentName=t,e}var Nn,Rn=(a(xn,Nn=y),xn);function xn(t,e){var n=Nn.call(this,q)||this;return n.filePaths=t,n.scannedFilePaths=e,n}var Dn,Pn=(a(Mn,Dn=y),Mn);function Mn(){return Dn.call(this,G)||this}var Fn,On=(a(kn,Fn=y),kn);function kn(t,e){var n=Fn.call(this,X)||this;return n.properties=t?"scrollTargetY property":e?"scrollTargetX property":"scrollTargetX and scrollTargetY properties",n}var Ln,Un=(a(Hn,Ln=y),Hn);function Hn(t,e){var n=Ln.call(this,it)||this;return t<=0?e<=0?(n.verb="are",n.dimensions="width and height"):(n.verb="is",n.dimensions="width"):(n.verb="is",n.dimensions="height"),n}var Gn,Bn=(a(Vn,Gn=y),Vn);function Vn(t){return Gn.call(this,j,t)||this}var qn,zn=(a(jn,qn=y),jn);function jn(){return qn.call(this,z)||this}var Xn,Yn=(a(Jn,Xn=y),Jn);function Jn(){return Xn.call(this,Y)||this}var Kn,$n=(a(Qn,Kn=y),Qn);function Qn(){return Kn.call(this,at)||this}var Zn,ti=(a(ei,Zn=y),ei);function ei(){return Zn.call(this,st)||this}var ni,ii=(a(ri,ni=y),ri);function ri(){return ni.call(this,lt)||this}var oi,si=(a(ai,oi=y),ai);function ai(){return oi.call(this,ut)||this}var li,ui=(a(ci,li=y),ci);function ci(){return li.call(this,dt)||this}var di,hi=(a(fi,di=y),fi);function fi(){return di.call(this,gt)||this}var pi,mi=(a(gi,pi=y),gi);function gi(t){var e=pi.call(this,mt)||this;return e.errMsg=t,e}var vi,wi=(a(yi,vi=y),yi);function yi(){return vi.call(this,ht)||this}var _i,Ei=(a(Ci,_i=y),Ci);function Ci(){return _i.call(this,ft)||this}var Ii,Si=(a(Ai,Ii=y),Ai);function Ai(){return Ii.call(this,pt)||this}var Wi,bi=(a(Ti,Wi=y),Ti);function Ti(){return Wi.call(this,ct)||this}var Ni,Ri=(a(xi,Ni=y),xi);function xi(){return Ni.call(this,vt)||this}var Di,Pi=(a(Mi,Di=y),Mi);function Mi(){return Di.call(this,J)||this}var Fi,Oi=(a(ki,Fi=y),ki);function ki(){return Fi.call(this,K)||this}var Li,Ui=(a(Hi,Li=y),Hi);function Hi(t,e){var n=Li.call(this,$)||this;return n.dialogType=t,n.pageUrl=e,n}var Gi,Bi=(a(Vi,Gi=y),Vi);function Vi(t,e,n){var i=Gi.call(this,Q)||this;return i.dialogType=t,i.errMsg=e,i.pageUrl=n,i}var qi,zi=(a(ji,qi=y),ji);function ji(){return qi.call(this,Tt)||this}var Xi=Object.freeze({__proto__:null,TestRunErrorBase:y,ClientFunctionExecutionInterruptionError:Dt,DomNodeClientFunctionResultError:Ft,SelectorErrorBase:Lt,InvalidSelectorResultError:Gt,CannotObtainInfoForElementSpecifiedBySelectorError:qt,UncaughtErrorOnPage:Xt,UncaughtErrorInClientFunctionCode:Kt,UncaughtErrorInCustomDOMPropertyCode:Zt,UncaughtErrorInCustomClientScriptCode:ne,UncaughtErrorInCustomClientScriptLoadedFromModule:oe,ActionIntegerOptionError:le,ActionPositiveIntegerOptionError:de,ActionBooleanOptionError:pe,ActionSpeedOptionError:ve,ActionStringOptionError:_e,ActionStringOrRegexOptionError:Ie,ActionDateOptionError:We,ActionNumberOptionError:Ne,ActionUrlOptionError:De,ActionUrlSearchParamsOptionError:Fe,ActionObjectOptionError:Le,ActionFunctionOptionError:Ge,ActionInvalidObjectPropertyError:qe,ActionElementNotFoundError:Xe,ActionElementIsInvisibleError:Ke,ActionSelectorMatchesWrongNodeTypeError:Ze,ActionAdditionalElementNotFoundError:nn,ActionElementIsNotTargetError:sn,ActionAdditionalElementIsInvisibleError:un,ActionAdditionalSelectorMatchesWrongNodeTypeError:hn,ActionElementNonEditableError:mn,ActionElementNotTextAreaError:wn,ActionElementNonContentEditableError:En,ActionRootContainerNotFoundError:Sn,ActionIncorrectKeysError:bn,ActionCannotFindFileToUploadError:Rn,ActionElementIsNotFileInputError:Pn,ActionInvalidScrollTargetError:On,InvalidElementScreenshotDimensionsError:Un,ActionElementNotIframeError:Bn,ActionIframeIsNotLoadedError:zn,CurrentIframeIsNotLoadedError:Yn,ChildWindowNotFoundError:$n,ChildWindowIsNotLoadedError:ti,CannotSwitchToWindowError:ii,CloseChildWindowError:si,CannotCloseWindowWithChildrenError:ui,CannotCloseWindowWithoutParentError:hi,SwitchToWindowPredicateError:mi,WindowNotFoundError:wi,ParentWindowNotFoundError:Ei,PreviousWindowNotFoundError:Si,ChildWindowClosedBeforeSwitchingError:bi,CannotRestoreChildWindowError:Ri,CurrentIframeNotFoundError:Pi,CurrentIframeIsInvisibleError:Oi,NativeDialogNotHandledError:Ui,UncaughtErrorInNativeDialogHandler:Bi,MultipleWindowsModeIsNotSupportedInNativeAutomationModeError:zi}),Yi="_nativeMethods",Ji=(Ki.prototype._ensureNativeMethods=function(t){return t||{objectKeys:Object.keys,arrayForEach:Array.prototype.forEach,arrayConcat:Array.prototype.concat,arraySlice:Array.prototype.slice,objectDefineProperty:Object.defineProperty}},Ki.prototype._getWindowIds=function(t){return this[Yi].objectKeys(t)},Ki.prototype._copyArray=function(t){return this[Yi].arraySlice.call(t)},Ki.prototype._concatArrays=function(t,e){return this[Yi].arrayConcat.call(t,e)},Ki.prototype.ensureMessageContainer=function(t){this[t]||(this[t]={log:[],info:[],warn:[],error:[]})},Ki.prototype.concat=function(e){var n=this;if(!e)return this;var t=this._getWindowIds(e);return this[Yi].arrayForEach.call(t,function(t){n.ensureMessageContainer(t),n[t].log=n._concatArrays(n[t].log,e[t].log),n[t].info=n._concatArrays(n[t].info,e[t].info),n[t].warn=n._concatArrays(n[t].warn,e[t].warn),n[t].error=n._concatArrays(n[t].error,e[t].error)}),this},Ki.prototype.addMessage=function(t,e,n){this.ensureMessageContainer(n),this[n][t].push(e)},Ki.prototype.getCopy=function(){var e=this,n={},t=this._getWindowIds(this);return this[Yi].arrayForEach.call(t,function(t){n[t]={log:e._copyArray(e[t].log),info:e._copyArray(e[t].info),warn:e._copyArray(e[t].warn),error:e._copyArray(e[t].error)}}),n},Ki);function Ki(t,e){var n=this._ensureNativeMethods(e);n.objectDefineProperty(this,Yi,{value:n}),this.concat(t)}var $i,Qi=(a(Zi,$i=Ji),Zi);function Zi(t){return $i.call(this,t,c.nativeMethods)||this}var tr,er,nr=(function(t){function n(t){return!!s[t]}function i(t,e){this.references=t,this.transforms=e,this.circularCandidates=[],this.circularCandidatesDescrs=[],this.circularRefCount=0}var o=/^#*@(t|r)$/,r=(0,eval)("this"),s={Int8Array:"function"==typeof Int8Array?Int8Array:void 0,Uint8Array:"function"==typeof Uint8Array?Uint8Array:void 0,Uint8ClampedArray:"function"==typeof Uint8ClampedArray?Uint8ClampedArray:void 0,Int16Array:"function"==typeof Int16Array?Int16Array:void 0,Uint16Array:"function"==typeof Uint16Array?Uint16Array:void 0,Int32Array:"function"==typeof Int32Array?Int32Array:void 0,Uint32Array:"function"==typeof Uint32Array?Uint32Array:void 0,Float32Array:"function"==typeof Float32Array?Float32Array:void 0,Float64Array:"function"==typeof Float64Array?Float64Array:void 0},a="function"==typeof ArrayBuffer,l="function"==typeof Map,u="function"==typeof Set,c="function"==typeof Buffer,d=Array.prototype.slice,e={serialize:function(t){return JSON.stringify(t)},deserialize:function(t){return JSON.parse(t)}};function h(t,e){this.references=t,this.transformMap=e,this.activeTransformsStack=[],this.visitedRefs=Object.create(null)}i._createRefMark=function(t){var e=Object.create(null);return e["@r"]=t,e},i.prototype._createCircularCandidate=function(t,e,n){this.circularCandidates.push(t),this.circularCandidatesDescrs.push({parent:e,key:n,refIdx:-1})},i.prototype._applyTransform=function(t,e,n,i){var r=Object.create(null),o=i.toSerializable(t);return"object"==typeof o&&this._createCircularCandidate(t,e,n),r["@t"]=i.type,r.data=this._handleValue(o,e,n),r},i.prototype._handleArray=function(t){for(var e=[],n=0;n<t.length;n++)e[n]=this._handleValue(t[n],e,n);return e},i.prototype._handlePlainObject=function(n){var i=this,r=Object.create(null);return Object.getOwnPropertyNames(n).forEach(function(t){var e=o.test(t)?"#"+t:t;r[e]=i._handleValue(n[t],r,e)}),r},i.prototype._handleObject=function(t,e,n){return this._createCircularCandidate(t,e,n),Array.isArray(t)?this._handleArray(t):this._handlePlainObject(t)},i.prototype._ensureCircularReference=function(t){var e=this.circularCandidates.indexOf(t);if(-1<e){var n=this.circularCandidatesDescrs[e];return-1===n.refIdx&&(n.refIdx=n.parent?++this.circularRefCount:0),i._createRefMark(n.refIdx)}return null},i.prototype._handleValue=function(t,e,n){var i=typeof t,r="object"==i&&null!==t;if(r){var o=this._ensureCircularReference(t);if(o)return o}for(var s=0;s<this.transforms.length;s++){var a=this.transforms[s];if(a.shouldTransform(i,t))return this._applyTransform(t,e,n,a)}return r?this._handleObject(t,e,n):t},i.prototype.transform=function(){for(var t=[this._handleValue(this.references,null,null)],e=0;e<this.circularCandidatesDescrs.length;e++){var n=this.circularCandidatesDescrs[e];0<n.refIdx&&(t[n.refIdx]=n.parent[n.key],n.parent[n.key]=i._createRefMark(n.refIdx))}return t},h.prototype._handlePlainObject=function(e){var t,n=this,i=Object.create(null),r=Object.getOwnPropertyNames(e);for(t in r.forEach(function(t){n._handleValue(e[t],e,t),o.test(t)&&(i[t.substring(1)]=e[t],delete e[t])}),i)e[t]=i[t]},h.prototype._handleTransformedObject=function(t,e,n){var i=t["@t"],r=this.transformMap[i];if(!r)throw new Error("Can't find transform for \""+i+'" type.');this.activeTransformsStack.push(t),this._handleValue(t.data,t,"data"),this.activeTransformsStack.pop(),e[n]=r.fromSerializable(t.data)},h.prototype._handleCircularSelfRefDuringTransform=function(t,e,n){var i=this.references,r=void 0;Object.defineProperty(e,n,{configurable:!0,enumerable:!0,get:function(){return void 0===r&&(r=i[t]),r},set:function(t){return r=t}})},h.prototype._handleCircularRef=function(t,e,n){-1<this.activeTransformsStack.indexOf(this.references[t])?this._handleCircularSelfRefDuringTransform(t,e,n):(this.visitedRefs[t]||(this.visitedRefs[t]=!0,this._handleValue(this.references[t],this.references,t)),e[n]=this.references[t])},h.prototype._handleValue=function(t,e,n){if("object"==typeof t&&null!==t){var i=t["@r"];if(void 0!==i)this._handleCircularRef(i,e,n);else if(t["@t"])this._handleTransformedObject(t,e,n);else if(Array.isArray(t))for(var r=0;r<t.length;r++)this._handleValue(t[r],t,r);else this._handlePlainObject(t)}},h.prototype.transform=function(){return this.visitedRefs[0]=!0,this._handleValue(this.references[0],this.references,0),this.references[0]};var f=[{type:"[[NaN]]",shouldTransform:function(t,e){return"number"===t&&isNaN(e)},toSerializable:function(){return""},fromSerializable:function(){return NaN}},{type:"[[undefined]]",shouldTransform:function(t){return"undefined"===t},toSerializable:function(){return""},fromSerializable:function(){}},{type:"[[Date]]",shouldTransform:function(t,e){return e instanceof Date},toSerializable:function(t){return t.getTime()},fromSerializable:function(t){var e=new Date;return e.setTime(t),e}},{type:"[[RegExp]]",shouldTransform:function(t,e){return e instanceof RegExp},toSerializable:function(t){var e={src:t.source,flags:""};return t.global&&(e.flags+="g"),t.ignoreCase&&(e.flags+="i"),t.multiline&&(e.flags+="m"),e},fromSerializable:function(t){return new RegExp(t.src,t.flags)}},{type:"[[Error]]",shouldTransform:function(t,e){return e instanceof Error},toSerializable:function(t){return{name:t.name,message:t.message,stack:t.stack}},fromSerializable:function(t){var e=new(r[t.name]||Error)(t.message);return e.stack=t.stack,e}},{type:"[[ArrayBuffer]]",shouldTransform:function(t,e){return a&&e instanceof ArrayBuffer},toSerializable:function(t){var e=new Int8Array(t);return d.call(e)},fromSerializable:function(t){if(a){var e=new ArrayBuffer(t.length);return new Int8Array(e).set(t),e}return t}},{type:"[[Buffer]]",shouldTransform:function(t,e){return c&&e instanceof Buffer},toSerializable:function(t){return d.call(t)},fromSerializable:function(t){return c?Buffer.from(t):t}},{type:"[[TypedArray]]",shouldTransform:function(t,e){return Object.keys(s).some(function(t){return n(t)&&e instanceof s[t]})},toSerializable:function(t){return{ctorName:t.constructor.name,arr:d.call(t)}},fromSerializable:function(t){return n(t.ctorName)?new s[t.ctorName](t.arr):t.arr}},{type:"[[Map]]",shouldTransform:function(t,e){return l&&e instanceof Map},toSerializable:function(t){var n=[];return t.forEach(function(t,e){n.push(e),n.push(t)}),n},fromSerializable:function(t){if(l){for(var e=new Map,n=0;n<t.length;n+=2)e.set(t[n],t[n+1]);return e}for(var i=[],r=0;r<t.length;r+=2)i.push([t[n],t[n+1]]);return i}},{type:"[[Set]]",shouldTransform:function(t,e){return u&&e instanceof Set},toSerializable:function(t){var e=[];return t.forEach(function(t){e.push(t)}),e},fromSerializable:function(t){if(u){for(var e=new Set,n=0;n<t.length;n++)e.add(t[n]);return e}return t}}],p=t.exports=function(t){this.transforms=[],this.transformsMap=Object.create(null),this.serializer=t||e,this.addTransforms(f)};p.prototype.addTransforms=function(t){t=Array.isArray(t)?t:[t];for(var e=0;e<t.length;e++){var n=t[e];if(this.transformsMap[n.type])throw new Error('Transform with type "'+n.type+'" was already added.');this.transforms.push(n),this.transformsMap[n.type]=n}return this},p.prototype.removeTransforms=function(t){t=Array.isArray(t)?t:[t];for(var e=0;e<t.length;e++){var n=t[e],i=this.transforms.indexOf(n);-1<i&&this.transforms.splice(i,1),delete this.transformsMap[n.type]}return this},p.prototype.encode=function(t){var e=new i(t,this.transforms).transform();return this.serializer.serialize(e)},p.prototype.decode=function(t){var e=this.serializer.deserialize(t);return new h(e,this.transformsMap).transform()}}(tr={exports:{}}),tr.exports),ir=function(t){return t};function rr(t){return new nr({serialize:ir,deserialize:ir}).addTransforms(t)}var or=1,sr=2,ar=3,lr=((er={})[or]=/^\.filterVisible\(\)$/,er[sr]=/^\.filterHidden\(\)$/,er[ar]=/^\.nth\(\d+\)$/,er);function ur(){this._err=null}var cr=(Object.defineProperty(ur.prototype,"error",{get:function(){return this._err},set:function(t){null===this._err&&(this._err=t)},enumerable:!1,configurable:!0}),ur.prototype.filter=function(t,e,n){if(e.filterVisible&&(t=t.filter(_.positionUtils.isElementVisible),this._assertFilterError(t,n,or)),e.filterHidden&&(t=t.filter(function(t){return!_.positionUtils.isElementVisible(t)}),this._assertFilterError(t,n,sr)),e.counterMode)return null===e.index?t.length:ur._getNodeByIndex(t,e.index)?1:0;var i;if(e.collectionMode)return null!==e.index&&(t=(i=ur._getNodeByIndex(t,e.index))?[i]:[],this._assertFilterError(t,n,ar)),t;var r=ur._getNodeByIndex(t,e.index||0);return r||(this.error=ur._getErrorItem(n,ar)),r},ur.prototype.cast=function(t){if(null==t)return[];if(t instanceof c.nativeMethods.Node)return[t];if(function(t){if(c.nativeMethods.isArray(t)){for(var e=0;e<t.length;e++)if(!(t[e]instanceof c.nativeMethods.Node))return;return 1}}(t))return t;if((e=t)instanceof c.nativeMethods.HTMLCollection||e instanceof c.nativeMethods.NodeList)return function(t){for(var e=t.length,n=[],i=0;i<e;i++)n.push(t[i]);return n}(t);var e;throw new Gt},ur.prototype._assertFilterError=function(t,e,n){0===t.length&&(this.error=ur._getErrorItem(e,n))},ur._getErrorItem=function(t,e){var n=t.apiFnChain,i=t.apiFnID;if(e)for(var r=i;r<n.length;r++)if(lr[e].test(n[r]))return r;return null},ur._getNodeByIndex=function(t,e){return e<0?t[t.length+e]:t[e]},new ur);function dr(t,e){return new c.nativeMethods.Function("fnCode","__dependencies$","Promise","RegExp",'"use strict"; return eval(fnCode)')(t,e,c.Promise,RegExp)}var hr=(fr.prototype.shouldTransform=function(t){return"function"===t},fr.prototype.toSerializable=function(){return""},fr.prototype.fromSerializable=function(t){var e=t.fnCode,n=t.dependencies;return"filterOptions"in n&&(n.selectorFilter=cr),dr(e,n)},fr);function fr(){this.type="Function"}var pr=(mr.prototype.shouldTransform=function(t,e){if(e instanceof c.nativeMethods.Node)throw new Ft(this._instantiationCallsiteName);return!1},mr.prototype.toSerializable=function(){},mr.prototype.fromSerializable=function(){},mr);function mr(t){this.type="Node",this._instantiationCallsiteName=t}var gr=(vr.prototype.getResult=function(){var e=this;return c.Promise.resolve().then(function(){var t=e.replicator.decode(e.command.args);return e._executeFn(t)}).catch(function(t){throw t.isTestCafeError||(t=new Kt(e.command.instantiationCallsiteName,t)),t})},vr.prototype.encodeResult=function(t){return this.replicator.encode(t)},vr.prototype._createReplicator=function(){return rr([new pr(this.command.instantiationCallsiteName),new hr])},vr.prototype._executeFn=function(t){return this.fn.apply(Nc,t)},vr);function vr(t){this.command=t,this.replicator=this._createReplicator(),this.dependencies=this.replicator.decode(t.dependencies),this.fn=dr(t.fnCode,this.dependencies)}var wr="appeared-dialog",yr="unexpected-dialog",_r="handler-error",Er=s.default.eventSandbox.message,Cr=s.default.processScript,Ir=s.default.nativeMethods,Sr="testcafe|native-dialog-tracker|appeared-dialogs",Ar="testcafe|native-dialog-tracker|unexpected-dialog",Wr="testcafe|native-dialog-tracker|error-in-handler",br=Cr("window.location.href"),Tr=["alert","confirm","prompt","print"],Nr="geolocation",Rr=(Object.defineProperty(xr.prototype,"appearedDialogs",{get:function(){var t=this.contextStorage.getItem(Sr);return t||(t=[],this.appearedDialogs=t),t},set:function(t){this.contextStorage.setItem(Sr,t)},enumerable:!1,configurable:!0}),Object.defineProperty(xr.prototype,"unexpectedDialog",{get:function(){return this.contextStorage.getItem(Ar)},set:function(t){this.contextStorage.setItem(Ar,t)},enumerable:!1,configurable:!0}),Object.defineProperty(xr.prototype,"handlerError",{get:function(){return this.contextStorage.getItem(Wr)},set:function(t){this.contextStorage.setItem(Wr,t)},enumerable:!1,configurable:!0}),xr._getPageUrl=function(){return Ir.eval(br)},xr.prototype._initListening=function(){var n=this;Er.on(Er.SERVICE_MSG_RECEIVED_EVENT,function(t){var e=t.message;e.type===wr?n._addAppearedDialogs(e.dialogType,e.text,e.url):e.type!==yr||n.unexpectedDialog?e.type!==_r||n.handlerError||n._onHandlerError(e.dialogType,e.message,e.url):n.unexpectedDialog={type:e.dialogType,url:e.url}})},xr.prototype._init=function(){var e=this;s.default.on(s.default.EVENTS.beforeUnload,function(t){t.prevented&&!t.isFakeIEEvent&&(e.dialogHandler?e._createDialogHandler("beforeunload")(t.returnValue||""):e._defaultDialogHandler("beforeunload")),e.contextStorage&&e.contextStorage.save()}),this._setCustomOrDefaultHandler()},xr.prototype._createDialogHandler=function(r){var o=this;return function(t){var e=xr._getPageUrl();o._addAppearedDialogs(r,t,e);var n=new gr(o.dialogHandler),i=null;try{i=n.fn.apply(Nc,[r,t,e])}catch(t){o._onHandlerError(r,t.message||String(t),e)}return i}},xr.prototype._handleGeolocationDialog=function(t,e){if(!this.dialogHandler)return this._defaultDialogHandler(Nr),void t();var n=xr._getPageUrl();Ir.arraySome.call(this.appearedDialogs,function(t){return t.type===Nr&&t.url===n})||this._addAppearedDialogs(Nr,void 0,n);var i=new gr(this.dialogHandler),r=null;try{r=i.fn.apply(Nc,[Nr,void 0,n])}catch(t){this._onHandlerError(Nr,t.message||String(t),n)}(r instanceof Error?e:t)(r)},xr.prototype._defaultDialogHandler=function(t){var e=xr._getPageUrl();this.unexpectedDialog=this.unexpectedDialog||{type:t,url:e}},xr.prototype._addAppearedDialogs=function(t,e,n){this.appearedDialogs.splice(0,0,{type:t,text:e,url:n})},xr.prototype._onHandlerError=function(t,e,n){this.handlerError=this.handlerError||{type:t,message:e,url:n}},xr.prototype._setCustomOrDefaultHandler=function(){var e=this;Tr.forEach(function(t){Nc[t]=e.dialogHandler?e._createDialogHandler(t):function(){return e._defaultDialogHandler(t)}}),this._setGeolocationDialogHandler()},xr.prototype._setGeolocationDialogHandler=function(){var t,e,n=null===(t=Nc.Geolocation)||void 0===t?void 0:t.prototype,i=null===(e=Nc.navigator)||void 0===e?void 0:e.geolocation;this._shouldOverrideGeolocationDialog(n)&&this._shouldOverrideGeolocationDialog(i)&&(n.getCurrentPosition=this._handleGeolocationDialog.bind(this))},xr.prototype._shouldOverrideGeolocationDialog=function(t){if(null==t||!t.getCurrentPosition)return!1;var e=Ir.isNativeCode(t.getCurrentPosition),n=t.getCurrentPosition===this._handleGeolocationDialog;return e||n},xr.prototype.setHandler=function(t){this.dialogHandler=t,this._setCustomOrDefaultHandler()},xr.prototype.getUnexpectedDialogError=function(){var t=this.unexpectedDialog,e=this.handlerError;return this.unexpectedDialog=null,this.handlerError=null,t?new Ui(t.type,t.url):e?new Bi(e.type,e.message,e.url):null},xr);function xr(t,e){var n=(void 0===e?{}:e).dialogHandler;this.contextStorage=t,this.dialogHandler=n,this._init(),this._initListening()}function Dr(){return"".concat(c.nativeMethods.performanceNow(),".").concat(Math.floor(1e5*Math.random()))}function Pr(t){this.type=t,this.id=Dr()}var Mr,Fr="driver|establish-connection",Or="driver|switch-to-window",kr="driver|close-window",Lr="driver|close-window-validation",Ur="driver|switch-to-window-validation",Hr="driver|get-windows",Gr="driver|command-executed",Br="driver|execute-command",Vr="driver|confirmation",qr="driver|set-native-dialog-handler",zr="driver|set-as-master",jr="driver|close-all-child-windows",Xr="driver|start-to-restore-child-link",Yr="driver|restore-child-link",Jr="driver|child-window-is-loaded-in-iframe",Kr="driver|child-window-is-opened-in-iframe",$r="driver|stop-internal-from-iframe",Qr="driver|has-pending-action-flags",Zr=(a(to,Mr=Pr),to);function to(){return Mr.call(this,Fr)||this}var eo,no=(a(io,eo=Pr),io);function io(t){var e=t.windowId,n=eo.call(this,Lr)||this;return n.windowId=e,n}var ro,oo=(a(so,ro=Pr),so);function so(t){var e=t.windowId,n=t.fn,i=ro.call(this,Ur)||this;return i.windowId=e,i.fn=n,i}var ao,lo=(a(uo,ao=Pr),uo);function uo(){return ao.call(this,Hr)||this}var co,ho=(a(fo,co=Pr),fo);function fo(t){var e=t.windowId,n=t.isCurrentWindow,i=co.call(this,kr)||this;return i.windowId=e,i.isCurrentWindow=n,i}var po,mo=(a(go,po=Pr),go);function go(t){var e=t.windowId,n=t.fn,i=po.call(this,Or)||this;return i.windowId=e,i.fn=n,i}var vo,wo=(a(yo,vo=Pr),yo);function yo(t){var e=vo.call(this,Gr)||this;return e.driverStatus=t,e}var _o,Eo=(a(Co,_o=Pr),Co);function Co(t,e){var n=_o.call(this,Br)||this;return n.command=t,n.testSpeed=e,n}var Io,So=(a(Ao,Io=Pr),Ao);function Ao(t,e){var n=Io.call(this,Vr)||this;return n.requestMessageId=t,n.result=e,n}var Wo,bo=(a(To,Wo=Pr),To);function To(t){var e=Wo.call(this,qr)||this;return e.dialogHandler=t,e}var No,Ro=(a(xo,No=Pr),xo);function xo(t){var e=No.call(this,zr)||this;return e.finalizePendingCommand=t,e}var Do,Po=(a(Mo,Do=Pr),Mo);function Mo(){return Do.call(this,jr)||this}var Fo,Oo=(a(ko,Fo=Pr),ko);function ko(){return Fo.call(this,Xr)||this}var Lo,Uo=(a(Ho,Lo=Pr),Ho);function Ho(t){var e=Lo.call(this,Yr)||this;return e.windowId=t,e}var Go,Bo=(a(Vo,Go=Pr),Vo);function Vo(t){var e=Go.call(this,Jr)||this;return e.windowId=t,e}var qo,zo=(a(jo,qo=Pr),jo);function jo(){return qo.call(this,Kr)||this}var Xo,Yo=(a(Jo,Xo=Pr),Jo);function Jo(){return Xo.call(this,$r)||this}var Ko,$o=(a(Qo,Ko=Pr),Qo);function Qo(){return Ko.call(this,Qr)||this}var Zo=s.default.json,ts=s.default.nativeMethods,es="%nativeAutomationContextStorage%",ns=(is.prototype.loadFromStorage=function(){var t={},e=this._getData();return e&&(t=Zo.parse(e),this._deleteData()),t},is.prototype._getData=function(){throw new Error("Not implemented")},is.prototype._deleteData=function(){throw new Error("Not implemented")},is.prototype.save=function(){throw new Error("Not implemented")},is.prototype.sync=function(){},is.prototype.dispose=function(){this._deleteData()},is);function is(){}var rs,os=(a(ss,rs=ns),ss.prototype._createStorageKey=function(t,e){var n="testcafe|driver|"+t;return e?n+"|"+e:n},ss.prototype._getData=function(){return ts.storageGetItem.call(this.storage,this.storageKey)},ss.prototype._deleteData=function(){ts.storageRemoveItem.call(this.storage,this.storageKey)},ss.prototype.save=function(t){ts.storageSetItem.call(this.storage,this.storageKey,Zo.stringify(t))},ss);function ss(t,e,n){var i=rs.call(this)||this;return i.storage=ts.winSessionStorageGetter.call(t),i.storageKey=i._createStorageKey(e,n),i}var as,ls=(a(us,as=ns),us.prototype._getData=function(){var t;return null===(t=Nc[es])||void 0===t?void 0:t[this.frameId]},us.prototype._deleteData=function(){Nc[es]=null},us.prototype.save=function(t){Nc.NATIVE_AUTOMATION_STORAGE_BINDING&&Nc.NATIVE_AUTOMATION_STORAGE_BINDING(Zo.stringify({testRunId:this.testRunId,frameDriverId:this.frameId,data:Zo.stringify(t)}))},us);function us(t,e){var n=as.call(this)||this,i=e.split("-"),r=i[0],o=i[1];return n.testRunId=r,n.frameId=o||"main",n}var cs=(ds.prototype._createStorageStrategy=function(t,e,n,i){return new(t?ls:os)(e,n,i)},ds.prototype.save=function(){this.strategy.save(this.data)},ds.prototype.setItem=function(t,e){this.data[t]=e,this.save(this.data)},ds.prototype.getItem=function(t){return this.data[t]},ds.prototype.dispose=function(){this.strategy.dispose()},ds);function ds(t,e){var n=e.testRunId,i=e.windowId,r=e.nativeAutomation;this.strategy=this._createStorageStrategy(r,t,n,i),this.data=this.strategy.loadFromStorage(),this.testRunId=n}var hs=Object.prototype.toString,fs=String.prototype.indexOf,ps=String.prototype.endsWith||function(t,e){var n=hs.call(this);(void 0===e||e>n.length)&&(e=n.length),e-=t.length;var i=fs.call(n,t,e);return-1!==i&&i===e},ms=Array.prototype.indexOf,gs=Array.prototype.map,vs=Array.prototype.sort,ws=Array.prototype.filter,ys=Array.prototype.concat,_s="Command",Es=(Cs.prototype.getAssignableProperties=function(){return[]},Cs.prototype.getAllAssignableProperties=function(){for(var t=Object.getPrototypeOf(this),e=[];t&&t.getAssignableProperties;)e=ys.call(e,t.getAssignableProperties()),t=Object.getPrototypeOf(t);return e},Cs.prototype.getNonReportedProperties=function(){return[]},Cs.prototype.getReportedProperties=function(){var t=gs.call(this.getAllAssignableProperties(),function(t){return t.name}),e=this.getNonReportedProperties();return ws.call(t,function(t){return!(-1<ms.call(e,t))})},Cs.prototype._assignFrom=function(t,e,n){if(void 0===n&&(n={}),t){e&&function(t,e){var n,i=e.constructor.name,r=gs.call(e.getAllAssignableProperties(),function(t){return t.name}),o=vs.call(e.getReportedProperties());for(n in t)if(!(-1<ms.call(r,n)||n in e))throw new qe(i,n,o)}(t,this);for(var i,r,o=this.getAllAssignableProperties(),s=0;s<o.length;s++){var a=o[s],l=a.name,u=a.type,c=a.required,d=a.init,h=a.defaultValue;void 0!==h&&(this[l]=h);var f=t[l];void 0===f&&!c||(e&&u&&u((i=this.constructor.name,r=l,ps.call(i,_s)?r:"".concat(i,".").concat(r)),f),this[l]=d?d(l,f,n,e):f)}}},Cs);function Cs(){}var Is,Ss=(a(As,Is=Es),As.prototype.getAssignableProperties=function(){return[{name:"isCommandResult"},{name:"executionError"},{name:"pageError"},{name:"result"},{name:"consoleMessages"},{name:"isPendingWindowSwitching"},{name:"isObservingFileDownloadingInNewWindow"},{name:"isFirstRequestAfterWindowSwitching"},{name:"warnings"}]},As);function As(t){var e=Is.call(this,t)||this;return e.id=Dr(),e.isCommandResult=!1,e.executionError=null,e.pageError=null,e.resent=!1,e.result=null,e.consoleMessages=null,e.isPendingWindowSwitching=!1,e.isObservingFileDownloadingInNewWindow=!1,e.isFirstRequestAfterWindowSwitching=!1,e.warnings=null,e._assignFrom(t,!0),e}function Ws(n,t,e,i){var r=null,o=null,s=null;return e=Math.max(e||0,2500),c.Promise.race([_.delay(e),new c.Promise(function(e){s=function(t){t.message.type===Vr&&t.message.requestMessageId===n.id&&e(t.message)},c.eventSandbox.message.on(c.eventSandbox.message.SERVICE_MSG_RECEIVED_EVENT,s),r=c.nativeMethods.setInterval.call(Nc,function(){return c.eventSandbox.message.sendServiceMsg(n,t)},1e3),c.eventSandbox.message.sendServiceMsg(n,t)})]).then(function(t){if(c.nativeMethods.clearInterval.call(Nc,r),c.nativeMethods.clearTimeout.call(Nc,o),c.eventSandbox.message.off(c.eventSandbox.message.SERVICE_MSG_RECEIVED_EVENT,s),!t)throw new i;return t})}var bs=2e4;function Ts(t){var e=t.requestMsgId,n=t.result,i=t.window,r=new So(e,n);c.eventSandbox.message.sendServiceMsg(r,i)}var Ns=(Object.defineProperty(Rs.prototype,"availabilityTimeout",{set:function(t){this.iframeAvailabilityTimeout=t},enumerable:!1,configurable:!0}),Rs.prototype._ensureIframe=function(){var t=this;return _.domUtils.isElementInDocument(this.driverIframe)?_.waitFor(function(){return _.positionUtils.isIframeVisible(t.driverIframe)?t.driverIframe:null},200,this.iframeAvailabilityTimeout).catch(function(){throw new Oi}):c.Promise.reject(new Pi)},Rs.prototype._waitForIframeRemovedOrHidden=function(){var e=this;return new c.Promise(function(t){e.checkIframeInterval=c.nativeMethods.setInterval.call(Nc,function(){e._ensureIframe().catch(function(){return _.delay(500).then(function(){return t(new Ss({isCommandResult:!0}))})})},1e3)})},Rs.prototype._waitForCommandResult=function(){var e=this,n=null;return c.Promise.race([this._waitForIframeRemovedOrHidden(),new c.Promise(function(e){n=function(t){t.message.type===Gr&&e(t.message.driverStatus)},c.eventSandbox.message.on(c.eventSandbox.message.SERVICE_MSG_RECEIVED_EVENT,n)})]).then(function(t){return c.eventSandbox.message.off(c.eventSandbox.message.SERVICE_MSG_RECEIVED_EVENT,n),c.nativeMethods.clearInterval.call(Nc,e.checkIframeInterval),t})},Rs.prototype.sendConfirmationMessage=function(t){Ts({requestMsgId:t,result:{id:this.driverId,dispatchNativeAutomationEventUrls:this.dispatchNativeAutomationEventUrls},window:this.driverWindow})},Rs.prototype.executeCommand=function(e,n){var i=this;return this._ensureIframe().then(function(){var t=new Eo(e,n);return c.Promise.all([Ws(t,i.driverWindow,i.iframeAvailabilityTimeout,Yn),i._waitForCommandResult()])}).then(function(t){return t[1]})},Rs);function Rs(t,e,n){this.driverWindow=t,this.driverIframe=_.domUtils.findIframeByWindow(t),this.driverId=e,this.iframeAvailabilityTimeout=0,this.dispatchNativeAutomationEventUrls=n}var xs=["nodeType","textContent","childNodeCount","hasChildNodes","childElementCount","hasChildElements"],Ds=["tagName","attributes"],Ps=["tagName","visible","focused","attributes","boundingClientRect","classNames","style","innerText","namespaceURI","id","value","checked","selected","selectedIndex","scrollWidth","scrollHeight","scrollLeft","scrollTop","offsetWidth","offsetHeight","offsetLeft","offsetTop","clientWidth","clientHeight","clientLeft","clientTop"];xs.concat(Ps);var Ms={childNodeCount:function(t){return t.childNodes.length},hasChildNodes:function(t){return!!Ms.childNodeCount(t)},childElementCount:function(t){var e;return(null===(e=t.children)||void 0===e?void 0:e.length)||0},hasChildElements:function(t){return!!Ms.childElementCount(t)}},Fs=(Os.prototype._initializeProperties=function(t,e,n){for(var i=0,r=e;i<r.length;i++){var o=r[i],s=n[o];this[o]=s?s(t):t[o]}},Os);function Os(){}var ks,Ls=(a(Us,ks=Fs),Us);function Us(t){var e=ks.call(this)||this;return e._initializeProperties(t,xs,Ms),e}var Hs,Gs={tagName:function(t){return t.tagName.toLowerCase()},visible:function(t){return _.positionUtils.isElementVisible(t)},focused:function(t){return c.utils.dom.getActiveElement()===t},attributes:function(t){for(var e=t.attributes,n={},i=e.length-1;0<=i;i--)n[e[i].name]=e[i].value;return n},boundingClientRect:function(t){var e=t.getBoundingClientRect();return{left:e.left,right:e.right,top:e.top,bottom:e.bottom,width:e.width,height:e.height}},classNames:function(t){var e=t.className;return"string"==typeof e.animVal&&(e=e.animVal),e.replace(/^\s+|\s+$/g,"").split(/\s+/g)},style:function(t){for(var e={},n=Nc.getComputedStyle(t),i=0;i<n.length;i++){var r=n[i];e[r]=n[r]}return e},innerText:function(t){return t.innerText}},Bs=(a(Vs,Hs=Fs),Vs);function Vs(t){var e=Hs.call(this)||this;return e._initializeProperties(t,Ds,Gs),e}var qs,zs=(a(js,qs=Ls),js);function js(t){var e=qs.call(this,t)||this;return e._initializeProperties(t,Ps,Gs),e}var Xs=(Ys.prototype._extend=function(t,e){for(var n=0,i=c.nativeMethods.objectKeys(this._customDOMProperties);n<i.length;n++){var r=i[n];try{t[r]=this._customDOMProperties[r](e)}catch(t){throw new Zt(this._instantiationCallsiteName,t,r)}}},Ys.prototype.shouldTransform=function(t,e){return e instanceof c.nativeMethods.Node},Ys.prototype.toSerializable=function(t){var e=new(1===t.nodeType?zs:Ls)(t);return this._extend(e,t),e},Ys.prototype.fromSerializable=function(){},Ys);function Ys(t,e){void 0===t&&(t={}),this.type="Node",this._customDOMProperties=t,this._instantiationCallsiteName=e}var Js=(Ks.prototype.on=function(t,e){this._eventsListeners[t]||(this._eventsListeners[t]=[]),this._eventsListeners[t].push(e)},Ks.prototype.once=function(n,i){var r=this;this.on(n,function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return r.off(n,i),i.apply(void 0,t)})},Ks.prototype.off=function(t,e){var n=this._eventsListeners[t];n&&(this._eventsListeners[t]=c.nativeMethods.arrayFilter.call(n,function(t){return t!==e}))},Ks.prototype.offAll=function(t){t?this._eventsListeners[t]=[]:this._eventsListeners={}},Ks.prototype.emit=function(t){for(var e=[],n=1;n<arguments.length;n++)e[n-1]=arguments[n];var i=this._eventsListeners[t];if(i)for(var r=0;r<i.length;r++)i[r].apply(this,e)},Ks);function Ks(){this._eventsListeners={}}var $s=s.default.Promise,Qs=s.default.nativeMethods;function Zs(e){return new $s(function(t){return Qs.setTimeout.call(Nc,t,e)})}var ta={1:"element",2:"attribute",3:"text",4:"cdata section",5:"entity reference",6:"entity node",7:"processing instruction",8:"comment",9:"document",10:"document type",11:"document fragment",12:"notation"};function ea(t){return t?{name:"ActionAdditionalElementIsInvisibleError",firstArg:t}:"ActionElementIsInvisibleError"}function na(t){return t?{name:"ActionAdditionalElementNotFoundError",firstArg:t}:"ActionElementNotFoundError"}function ia(t){var e="string"==typeof t?Xi[t]:Xi[t.name],n="string"==typeof t?null:t.firstArg;return function(t){return new e(n,t)}}var ra=(oa.prototype.push=function(t,i){var r=this;this._ensureElementsPromise=this._ensureElementsPromise.then(function(){return r._executeSelectorFn(t,{invisible:ea(i),notFound:na(i)},r._ensureElementsStartTime)}).then(function(t){if(!_.domUtils.isDomElement(t)){var e=t.nodeType,n=ta[e];throw i?new hn(i,n):new Ze(n)}r._elements.push(t)})},oa.prototype.getElements=function(){var t=this;return this._ensureElementsPromise.then(function(){return t._elements})},oa);function oa(t,e){this._globalSelectorTimeout=t,this._ensureElementsStartTime=c.nativeMethods.dateNow(),this._ensureElementsPromise=c.Promise.resolve(),this._executeSelectorFn=e,this._elements=[]}var sa=(aa.create=function(t){return new aa(t.top,t.right,t.bottom,t.left)},aa.prototype.add=function(t){return this.top+=t.top,this.right+=t.right,this.bottom+=t.bottom,this.left+=t.left,this},aa.prototype.sub=function(t){return"top"in t&&(this.top-=t.top,this.left-=t.left),this.bottom-=t.bottom,this.right-=t.right,this},aa.prototype.round=function(t,e){return void 0===t&&(t=Math.round),void 0===e&&(e=t),this.top=t(this.top),this.right=e(this.right),this.bottom=e(this.bottom),this.left=t(this.left),this},aa.prototype.contains=function(t){return t.x>=this.left&&t.x<=this.right&&t.y>=this.top&&t.y<=this.bottom},aa);function aa(t,e,n,i){void 0===t&&(t=0),void 0===e&&(e=0),void 0===n&&(n=0),void 0===i&&(i=0),this.top=t,this.right=e,this.bottom=n,this.left=i}function la(t){var e="array"+t.charAt(0).toUpperCase()+t.slice(1);return c.nativeMethods[e],1}la("filter"),la("map"),la("slice"),la("splice"),la("unshift"),la("forEach"),la("indexOf"),la("some"),la("reverse"),la("reduce"),la("concat"),la("join"),la("every"),s.default.utils.browser,s.default.nativeMethods,s.default.utils.style.get,s.default.utils.dom.getActiveElement,s.default.utils.dom.findDocument,s.default.utils.dom.find,s.default.utils.dom.isElementInDocument;var ua=s.default.utils.dom.isElementInIframe,ca=s.default.utils.dom.getIframeByElement;s.default.utils.dom.isCrossDomainWindows,s.default.utils.dom.getSelectParent,s.default.utils.dom.getChildVisibleIndex,s.default.utils.dom.getSelectVisibleChildren,s.default.utils.dom.isElementNode,s.default.utils.dom.isTextNode,s.default.utils.dom.isRenderedNode,s.default.utils.dom.isIframeElement,s.default.utils.dom.isInputElement,s.default.utils.dom.isButtonElement,s.default.utils.dom.isFileInput,s.default.utils.dom.isTextAreaElement,s.default.utils.dom.isAnchorElement,s.default.utils.dom.isImgElement,s.default.utils.dom.isFormElement,s.default.utils.dom.isLabelElement,s.default.utils.dom.isSelectElement,s.default.utils.dom.isRadioButtonElement,s.default.utils.dom.isColorInputElement,s.default.utils.dom.isCheckboxElement,s.default.utils.dom.isOptionElement,s.default.utils.dom.isSVGElement,s.default.utils.dom.isMapElement,s.default.utils.dom.isBodyElement;var da=s.default.utils.dom.isHtmlElement;s.default.utils.dom.isDocument,s.default.utils.dom.isTextEditableInput,s.default.utils.dom.isTextEditableElement,s.default.utils.dom.isTextEditableElementAndEditingAllowed,s.default.utils.dom.isContentEditableElement,s.default.utils.dom.isDomElement,s.default.utils.dom.isShadowUIElement,s.default.utils.dom.isShadowRoot,s.default.utils.dom.isElementFocusable,s.default.utils.dom.isHammerheadAttr,s.default.utils.dom.isElementReadOnly;var ha=s.default.utils.dom.getScrollbarSize;s.default.utils.dom.getMapContainer,s.default.utils.dom.getTagName,s.default.utils.dom.closest,s.default.utils.dom.getParents,s.default.utils.dom.findParent,s.default.utils.dom.getTopSameDomainWindow,s.default.utils.dom.getParentExceptShadowRoot,s.default.utils.style;var fa=s.default.utils.style.getBordersWidth;s.default.utils.style.getComputedStyle,s.default.utils.style.getElementMargin,s.default.utils.style.getElementPadding;var pa=s.default.utils.style.getElementScroll;s.default.utils.style.getOptionHeight,s.default.utils.style.getSelectElementSize,s.default.utils.style.isElementVisible,s.default.utils.style.isVisibleChild,s.default.utils.style.getWidth,s.default.utils.style.getHeight;var ma=s.default.utils.style.getInnerWidth,ga=s.default.utils.style.getInnerHeight;s.default.utils.style.getScrollLeft,s.default.utils.style.getScrollTop,s.default.utils.style.setScrollLeft,s.default.utils.style.setScrollTop,s.default.utils.style.get,s.default.utils.style.getBordersWidthFloat,s.default.utils.style.getElementPaddingFloat,s.default.shadowUI,s.default.nativeMethods;var va=(wa.create=function(t){return"left"in t?new wa(t.left,t.top):"right"in t?new wa(t.right,t.bottom):new wa(t.x,t.y)},wa.prototype.add=function(t){return this.x+=t.x,this.y+=t.y,this},wa.prototype.sub=function(t){return this.x-=t.x,this.y-=t.y,this},wa.prototype.round=function(t){return void 0===t&&(t=Math.round),this.x=t(this.x),this.y=t(this.y),this},wa.prototype.eql=function(t){return this.x===t.x&&this.y===t.y},wa.prototype.mul=function(t){return this.x*=t,this.y*=t,this},wa.prototype.distance=function(t){return Math.sqrt(Math.pow(this.x-t.x,2)+Math.pow(this.y-t.y,2))},wa);function wa(t,e){this.x=t,this.y=e}var ya=function(t,e,n,i,r,o){this.width=t,this.height=e,this.left=n.x,this.top=n.y,this.right=n.x+t,this.bottom=n.y+e,this.border=i,this.scrollbar=o,this.scroll=r};s.default.utils.html,s.default.nativeMethods;var _a=s.default.utils.position.getElementRectangle,Ea=s.default.utils.position.getOffsetPosition,Ca=s.default.utils.position.offsetToClientCoords;function Ia(t){var e=t/2;return e<1?0:Math.round(e)}function Sa(t,e,n){var i,r={offsetX:Ia((i=_a(t)).width),offsetY:Ia(i.height)};if(e="number"==typeof e?Math.round(e):r.offsetX,n="number"==typeof n?Math.round(n):r.offsetY,0<e&&0<n)return{offsetX:e,offsetY:n};var o=function(t){var e,n,i,r,o=da(t),s=o?t.getElementsByTagName("body")[0]:null,a=t.getBoundingClientRect(),l=sa.create(fa(t)),u=pa(t),c=ua(t),d="BackCompat"===t.ownerDocument.compatMode,h=o?new va(0,0):va.create(a),f=a.height,p=a.width;o&&(p=s&&d?(f=s.clientHeight,s.clientWidth):(f=t.clientHeight,t.clientWidth)),!c||(e=ca(t))&&(n=Ea(e),i=Ca(va.create(n)),r=fa(e),h.add(i).add(va.create(r)),o&&l.add(r));var m=!o&&ma(t)!==t.clientWidth,g=!o&&ga(t)!==t.clientHeight,v={right:m?ha():0,bottom:g?ha():0};return new ya(p,f,h,l,u,v)}(t),s=Math.round(Math.max(t.scrollWidth,o.width)),a=Math.round(Math.max(t.scrollHeight,o.height)),l=o.scrollbar.right+o.border.left+o.border.right+s,u=o.scrollbar.bottom+o.border.top+o.border.bottom+a;return{offsetX:e<0?l+e:e,offsetY:n<0?u+n:n}}var Aa,Wa=(a(ba,Aa=Js),ba.prototype._prepareCommand=function(t,e){t.options&&!t.options.speed&&(t.options.speed=e.testSpeed)},ba.prototype._getCommandSelectorTimeout=function(t,e){var n;return"number"==typeof(null===(n=t.selector)||void 0===n?void 0:n.timeout)?t.selector.timeout:e.globalSelectorTimeout},ba.prototype._delayAfterExecution=function(){return this._command.options&&1!==this._command.options.speed?Zs(2e3*(1-this._command.options.speed)):c.Promise.resolve()},ba.prototype._isExecutionTimeoutExpired=function(){return c.nativeMethods.dateNow()-this._executionStartTime>=this._commandSelectorTimeou