@unotest/web 0.42.0 → 0.43.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +423 -3
- package/README.md +37 -5
- package/dist/config/schema.d.ts +98 -63
- package/dist/config/schema.js +1 -1
- package/dist/driver/index.js +1 -1
- package/dist/dsl/index.d.ts +66 -2
- package/dist/dsl/index.js +1 -1
- package/dist/dsl/web-dsl-language-service.d.ts +1 -1
- package/dist/dsl/web-dsl-language-service.js +1 -1
- package/dist/{linter-Yf4gPe5J.d.ts → linter-BWSAYBQy.d.ts} +24 -0
- package/dist/mcp/server.js +1 -1
- package/dist/runner/cli.d.ts +1 -1
- package/dist/runner/cli.js +1 -1
- package/dist/runner/init/chrome-probe.js +1 -1
- package/dist/runner/init.js +1 -1
- package/dist/runner/install-chromium.js +1 -1
- package/dist/runner/prepare-fix.js +1 -1
- package/dist/runner/scaffold-workspace.js +1 -1
- package/dist/runner/serve-fixture.js +1 -1
- package/dist/runner/web-runner-adapter.js +1 -1
- package/guides/agent-integration.md +105 -6
- package/guides/dsl-reference.md +19 -0
- package/package.json +8 -8
package/dist/driver/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const _0x26592c=_0xd816;(function(_0x26e4b4,_0x24b9c9){const _0x5cff5c={_0x4f2151:0x1d3,_0x4dfd6f:0x1c0,_0x3a6762:0x1c5,_0x4fd7ec:0x1d5,_0x194b35:0x17f,_0x474042:0x169,_0x145557:0x19a},_0x4802e2=_0xd816,_0x5566c8=_0x26e4b4();while(!![]){try{const _0x3a2eb7=-parseInt(_0x4802e2(_0x5cff5c._0x4f2151))/0x1+-parseInt(_0x4802e2(_0x5cff5c._0x4dfd6f))/0x2*(parseInt(_0x4802e2(0x16f))/0x3)+parseInt(_0x4802e2(0x1c7))/0x4*(-parseInt(_0x4802e2(_0x5cff5c._0x3a6762))/0x5)+-parseInt(_0x4802e2(_0x5cff5c._0x4fd7ec))/0x6+parseInt(_0x4802e2(_0x5cff5c._0x194b35))/0x7*(parseInt(_0x4802e2(0x184))/0x8)+parseInt(_0x4802e2(_0x5cff5c._0x474042))/0x9*(parseInt(_0x4802e2(0x1e5))/0xa)+parseInt(_0x4802e2(0x1cb))/0xb*(parseInt(_0x4802e2(_0x5cff5c._0x145557))/0xc);if(_0x3a2eb7===_0x24b9c9)break;else _0x5566c8['push'](_0x5566c8['shift']());}catch(_0x202bd9){_0x5566c8['push'](_0x5566c8['shift']());}}}(_0x4caa,0xef38e));function _0x4caa(){const _0x5e6843=['lNbHz2u','yxr0ywnOrxHPC3rPBMC','CgfNzsbPBMrLEcbVDxqGB2yGCMfUz2u','C3rLChm','ntbes3ryreS','y3r4','C2nYzwvUC2HVDevSzw1LBNq','D2fPDezVCLrLEhq','zMfRzsb0AxrSzq','ywrK','D2fPDezVCKXVywrtDgf0zq','mZiZnJmZn1fIqNfQva','zw50zxjgCMfTzq','Bg9JywXtDg9YywDLu3rHDgu','AxnwAxnPyMXL','ywn0AxzLugfNzq','Aw5ZCgvJDevSzw1LBNq','mtG2mZG2n2TLrNrftq','zMfRzs1WBMC','ywjVDxq6yMXHBMS','D2fPDezVCK5HDMLNyxrPB24','zxzHBhvHDgvpBKXVy2f0B3i','z2v0tg9JywXtDg9YywDL','DxjS','zNjHBwvtDgfJAW','zNjHBwvezxb0Aa','y2XPCgjVyxjKugfZDgu','y29UBMvJDfnOyxjLzcbUB3qGC3vWCg9YDgvKigj5iezHA2vxzwjeCML2zxi','AxneAxnHyMXLza','y2XVC2u','yMvOyxzPB3i','y2XPy2S','Aw5WDxrwywX1zq','mti4muX1zxrWEq','rhjPDMvYrxjYB3i','z29cywnR','zNvUy3rPB24','z2v0qxr0CMLIDxrL','mtuYogLssevZua','zMLSDgvY','C2nYzwvUC2HVDa','C2v0q29VA2LL','zgvMAw5LuhjVCgvYDhK','BMfTzq','D2fPDezVCLvYBa','z29gB3j3yxjK','CMvJB3jKzxi','AxneAxnHyMXLzej5rgvMyxvSDa','yxr0CMLIDxrLC0j5rgvMyxvSDa','BgvUz3rO','pgrPDIbKyxrHlxvUB3rLC3qTCMvMpsi','B3v0zxjive1m','DhLWzq','CMvSB2fK','DgL0Bgu','Dgv4DenVBNrLBNrcEurLzMf1Bhq','z2v0q29VA2LL','Cg9WDxbpBKnSAwnR','C2f2zvn0B3jHz2vtDgf0zq','y291BNrcEurLzMf1Bhq','mtjewMDXuum','rMfRzunVBNrLEhq','AxnwAxnPyMXLqNLezwzHDwX0','Aw5UzxjuzxH0qNLezwzHDwX0','Aw5PDgLHBfvYBa','B25ozxDqywDL','BMv3q29UDgv4Da','Bgf1BMnO','DxbSB2fKrMLSzq','y29VA2LLCW','y3vYCMvUDfvYBa','zxzHBhvHDgvszxn1Bhq','C2vSzwn0t3b0Aw9U','z290BW','y2fSBhm','y29UC29SzuvUDhjPzxm','zxzHBhvHDgu','Bwf5yMvuAhjVDW','zxjYB3jpBK5LEhrby3rPB24','y2fSBhngB3i','iJ48l2rPDJ4','zxHPDezYyw1L','zxHPDezYyw1LignHBgXLzcb3AxrOig5VigzYyw1Lig9UihrOzsbZDgfJAW','pgrPDJ48l2rPDJ4','y2HLy2TLzfn0yxrLqNLezwzHDwX0','C3vIC2nYAwjL','Dgv4DenVBNrLBNq','zhjHz0fUzerYB3a','C2nYzwvUC2HVDej5DgvZ','Aw5UzxjuzxH0','y29UDgv4Dhm','Dw5JAgvJAW','ChvZAa','B3v0zxjiDg1SqNLszwy','zgvSzxrL','y2XVC2vgywTLugfNzq','BMv0D29YA0vUDhjPzxm','BMv3q29UDgv4DcbJywXSzwqGyMvMB3jLigXHDw5JAcGP','mKvSC3PJzG','Bwv0Ag9K','zMLSBa','zhjPDMvY','CgfNzxm','mteWnw9KyMnbDa','Ag92zxi','odiZmMfiBLH4vq','zw1PDezHA2vqB3b1Ca','y2HLy2S','Bgf1BMnOzwq','mtq3ntm5odfjv1DKzwG','C2nYB2XSsw50B1zPzxC','D2fPDezVCG','Cg9W','tg9JyxrVCKvYCM9Y','y2HLy2TLzfn0yxrL','CgfNzuXPC3q','A2LUza','ndG1otvqChP3D2K','Aw5WDxrwywX1zuj5rgvMyxvSDa','nJqXnZC5oeHHDvfhqG','zg91yMXLq2XPy2S','C2nVCgu','C3bSAwnL','y291BNq','CMvM','zNjVBq','BM8Gywn0AxzLihbHz2uGAw4Gy29UDgv4Da','CMvJB3jK','ywn0AxzLswr4','B25bzNrLCKnSAwnR','rMfRzvDLyKrYAxzLCG'];_0x4caa=function(){return _0x5e6843;};return _0x4caa();}var __defProp=Object[_0x26592c(0x188)],__name=(_0x4dbe34,_0x4a6ea0)=>__defProp(_0x4dbe34,_0x26592c(0x189),{'value':_0x4a6ea0,'configurable':!![]});function subscribe(_0x5b621c,_0x315a8d){const _0x59d99f={_0x44be23:0x1bc},_0xeadc65=_0x26592c;return _0x5b621c[_0xeadc65(0x167)](_0x315a8d),()=>{const _0xb92b2f=_0xeadc65;_0x5b621c[_0xb92b2f(_0x59d99f._0x44be23)](_0x315a8d);};}__name(subscribe,_0x26592c(0x1b3));import{UnotestError}from'@unotest/core';var DriverError=class extends UnotestError{static{__name(this,_0x26592c(0x180));}},LocatorError=class extends UnotestError{static{__name(this,_0x26592c(0x1cf));}};function createRecorder(){const _0x20c04a=_0x26592c,_0x2b85a5=[];let _0x2b1f88=0x0;return{'push':__name(_0x57a817=>_0x2b85a5[_0x20c04a(0x1ba)]({..._0x57a817,'seq':_0x2b1f88++}),'push'),'calls':__name(()=>_0x2b85a5,_0x20c04a(0x1a8))};}__name(createRecorder,'createRecorder');function _0xd816(_0x6a3183,_0x3a8802){_0x6a3183=_0x6a3183-0x163;const _0x4caaf0=_0x4caa();let _0xd816d0=_0x4caaf0[_0x6a3183];if(_0xd816['nvdVzS']===undefined){var _0x4ae72b=function(_0x4d5eba){const _0xc50e46='abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+/=';let _0x4dbe34='',_0x4a6ea0='';for(let _0x5b621c=0x0,_0x315a8d,_0x2b85a5,_0x2b1f88=0x0;_0x2b85a5=_0x4d5eba['charAt'](_0x2b1f88++);~_0x2b85a5&&(_0x315a8d=_0x5b621c%0x4?_0x315a8d*0x40+_0x2b85a5:_0x2b85a5,_0x5b621c++%0x4)?_0x4dbe34+=String['fromCharCode'](0xff&_0x315a8d>>(-0x2*_0x5b621c&0x6)):0x0){_0x2b85a5=_0xc50e46['indexOf'](_0x2b85a5);}for(let _0x57a817=0x0,_0x592659=_0x4dbe34['length'];_0x57a817<_0x592659;_0x57a817++){_0x4a6ea0+='%'+('00'+_0x4dbe34['charCodeAt'](_0x57a817)['toString'](0x10))['slice'](-0x2);}return decodeURIComponent(_0x4a6ea0);};_0xd816['besSTE']=_0x4ae72b,_0xd816['NyOmQr']={},_0xd816['nvdVzS']=!![];}const _0x50f20a=_0x4caaf0[0x0],_0x446a10=_0x6a3183+_0x50f20a,_0x58b4e7=_0xd816['NyOmQr'][_0x446a10];return!_0x58b4e7?(_0xd816d0=_0xd816['besSTE'](_0xd816d0),_0xd816['NyOmQr'][_0x446a10]=_0xd816d0):_0xd816d0=_0x58b4e7,_0xd816d0;}var FakePage=class{constructor(_0x592659,_0x42c83b,_0x14d9b6,_0x126ea1){const _0x183222={_0x4fea3a:0x18c,_0x34255b:0x1d7,_0x55b023:0x1a4},_0x3ab7ba=_0x26592c;this[_0x3ab7ba(_0x183222._0x4fea3a)]=_0x592659,this[_0x3ab7ba(0x17c)]=_0x42c83b,this[_0x3ab7ba(_0x183222._0x34255b)]=_0x14d9b6,this[_0x3ab7ba(_0x183222._0x55b023)]=_0x126ea1;}['recorder'];[_0x26592c(0x17c)];[_0x26592c(0x1d7)];static{__name(this,'FakePage');}[_0x26592c(0x1a4)];['onAfterClick'];[_0x26592c(0x1dd)](_0x123f15,_0x1d02a1){const _0xf86024=_0x26592c;this[_0xf86024(0x18c)]['push']({'scope':this['scope'],'method':_0x123f15,'args':_0x1d02a1});}[_0x26592c(0x1ab)](){const _0x1722a8={_0x311f0c:0x1ac},_0x34ffbf=_0x26592c;if(this[_0x34ffbf(0x17c)][_0x34ffbf(_0x1722a8._0x311f0c)]){const _0x1e9290=this[_0x34ffbf(0x17c)]['errorOnNextAction'];this[_0x34ffbf(0x17c)][_0x34ffbf(_0x1722a8._0x311f0c)]=void 0x0;throw _0x1e9290;}}[_0x26592c(0x175)](){const _0x3277c4=_0x26592c;return this[_0x3277c4(0x1a4)];}async[_0x26592c(0x194)](){const _0x567a0a={_0xaa5e97:0x1dd},_0x268f17=_0x26592c;return this[_0x268f17(_0x567a0a._0xaa5e97)](_0x268f17(0x194),[]),_0x268f17(0x166);}async['click'](_0x4fdd6f,_0x58a946){const _0x17f792={_0x370ce4:0x1dd,_0x19ad6c:0x17d,_0x16e455:0x1ab},_0x4a033a=_0x26592c;this[_0x4a033a(_0x17f792._0x370ce4)](_0x4a033a(_0x17f792._0x19ad6c),[_0x4fdd6f,_0x58a946]),this[_0x4a033a(_0x17f792._0x16e455)](),this[_0x4a033a(0x1df)]?.();}async[_0x26592c(0x1d6)](_0x283a93,_0x3e5430){const _0x59aa06={_0x4a9edb:0x1dd,_0x40b7ba:0x1d6,_0x3220a0:0x1ab},_0x29ed9d=_0x26592c;this[_0x29ed9d(_0x59aa06._0x4a9edb)](_0x29ed9d(_0x59aa06._0x40b7ba),[_0x283a93,_0x3e5430]),this[_0x29ed9d(_0x59aa06._0x3220a0)]();}async[_0x26592c(0x1c2)](_0x397be6,_0x266d21,_0x5127dd){const _0x495b5a={_0x39dff9:0x1dd,_0x4a7e12:0x1c2},_0xcd36ca=_0x26592c;this[_0xcd36ca(_0x495b5a._0x39dff9)](_0xcd36ca(_0x495b5a._0x4a7e12),[_0x397be6,_0x266d21,_0x5127dd]),this['maybeThrow']();}async['press'](_0x2e8102,_0xef7dc5,_0x32f89b){const _0x363b9d=_0x26592c;this['record']('press',[_0x2e8102,_0xef7dc5,_0x32f89b]),this[_0x363b9d(0x1ab)]();}async[_0x26592c(0x1c9)](_0x5b77d4,_0x1ede18){const _0x442c83={_0x379e59:0x1dd},_0x5be3e9=_0x26592c;this[_0x5be3e9(_0x442c83._0x379e59)]('check',[_0x5b77d4,_0x1ede18]),this[_0x5be3e9(0x1ab)]();}async[_0x26592c(0x1b9)](_0x4db841,_0x544388){const _0x554e6b={_0x29d79a:0x1b9},_0x251550=_0x26592c;this[_0x251550(0x1dd)](_0x251550(_0x554e6b._0x29d79a),[_0x4db841,_0x544388]),this['maybeThrow']();}async['selectOption'](_0x2401b4,_0x3d3524,_0x50449f){const _0x1ddfac={_0x3c64ca:0x1dd},_0x53369d=_0x26592c;this[_0x53369d(_0x1ddfac._0x3c64ca)](_0x53369d(0x1a6),[_0x2401b4,_0x3d3524,_0x50449f]),this[_0x53369d(0x1ab)]();}async[_0x26592c(0x1c6)](_0x155326,_0x15c8b3){const _0x318a7d=_0x26592c;this[_0x318a7d(0x1dd)]('hover',[_0x155326,_0x15c8b3]),this[_0x318a7d(0x1ab)]();}async[_0x26592c(0x1cc)](_0x4df822){const _0x195f69=_0x26592c;this[_0x195f69(0x1dd)](_0x195f69(0x1cc),[_0x4df822]),this[_0x195f69(0x1ab)]();}async[_0x26592c(0x1b5)](_0x129b13,_0x18f333,_0x438712){const _0x2998d4={_0x80c7c9:0x1b5,_0x4eb396:0x1ab},_0x1746f9=_0x26592c;this['record'](_0x1746f9(_0x2998d4._0x80c7c9),[_0x129b13,_0x18f333,_0x438712]),this[_0x1746f9(_0x2998d4._0x4eb396)]();}async[_0x26592c(0x1a2)](_0xb2cd0d,_0x9d44e7){const _0xf74ad7={_0x566cb3:0x1dd,_0x46f94d:0x1a2,_0x356bc5:0x1ab},_0x4d8a80=_0x26592c;this[_0x4d8a80(_0xf74ad7._0x566cb3)](_0x4d8a80(_0xf74ad7._0x46f94d),[_0xb2cd0d,_0x9d44e7]),this[_0x4d8a80(_0xf74ad7._0x356bc5)]();}async[_0x26592c(0x178)](_0x48bea3,_0x1ede15){const _0x5343fb=_0x26592c;this[_0x5343fb(0x1dd)]('clipboardPaste',[_0x48bea3,_0x1ede15]),this[_0x5343fb(0x1ab)]();}async['count'](_0xf44b02){const _0x59f186={_0x86be09:0x1d9},_0x21fa38=_0x26592c;return this['record'](_0x21fa38(_0x59f186._0x86be09),[_0xf44b02]),this[_0x21fa38(0x17c)][_0x21fa38(0x199)]??0x1;}async[_0x26592c(0x1b4)](_0x22feed){const _0x5552bb={_0x16fc4e:0x195},_0x58ca5=_0x26592c;return this['record'](_0x58ca5(0x1b4),[_0x22feed]),this[_0x58ca5(0x17c)][_0x58ca5(_0x5552bb._0x16fc4e)]??'';}async['innerText'](_0x1b7324){const _0x289392={_0x1b757b:0x1b7,_0x1e8168:0x17c,_0x27ee1e:0x19d,_0x33ec89:0x17c},_0x53ad4f=_0x26592c;return this['record'](_0x53ad4f(_0x289392._0x1b757b),[_0x1b7324]),this[_0x53ad4f(_0x289392._0x1e8168)][_0x53ad4f(_0x289392._0x27ee1e)]??this[_0x53ad4f(_0x289392._0x33ec89)]['textContentByDefault']??'';}async[_0x26592c(0x17e)](_0x12b8de){const _0x53d984={_0x21919f:0x1dd},_0x2a8cd8=_0x26592c;return this[_0x2a8cd8(_0x53d984._0x21919f)](_0x2a8cd8(0x17e),[_0x12b8de]),this['behavior'][_0x2a8cd8(0x1d4)]??'';}async[_0x26592c(0x1d0)](_0x50c4d2){const _0x2640e2=_0x26592c;return this['record'](_0x2640e2(0x1d0),[_0x50c4d2]),this[_0x2640e2(0x17c)][_0x2640e2(0x1b2)]??null;}async[_0x26592c(0x16c)](_0x1a51a4){const _0x2d2da3={_0x44ac1d:0x17c,_0x39653a:0x19c},_0x8812bf=_0x26592c;return this['record'](_0x8812bf(0x16c),[_0x1a51a4]),this[_0x8812bf(_0x2d2da3._0x44ac1d)][_0x8812bf(_0x2d2da3._0x39653a)]??!![];}async[_0x26592c(0x17a)](_0x8cf678){const _0x5490e2={_0x7aafd:0x17c},_0x3a81ad=_0x26592c;return this['record'](_0x3a81ad(0x17a),[_0x8cf678]),this[_0x3a81ad(_0x5490e2._0x7aafd)][_0x3a81ad(0x18d)]??![];}async[_0x26592c(0x183)](_0x2a5f66,_0xc856b6){const _0x49c5cd=_0x26592c;return this['record'](_0x49c5cd(0x183),[_0x2a5f66,_0xc856b6]),this['behavior'][_0x49c5cd(0x18e)]?.[_0xc856b6]??null;}async[_0x26592c(0x1cd)](_0x261756,_0x57dc43){const _0x46a583=_0x26592c;this[_0x46a583(0x1dd)](_0x46a583(0x1cd),[_0x261756,_0x57dc43]);}async[_0x26592c(0x18a)](_0x566403,_0x52bb4a){const _0x572f8c={_0x37830f:0x18a},_0x2a03e9=_0x26592c;this[_0x2a03e9(0x1dd)](_0x2a03e9(_0x572f8c._0x37830f),[_0x566403,_0x52bb4a]);}async[_0x26592c(0x165)](_0x506f70,_0x44452a){const _0x20a4e0={_0x2fbead:0x1dd,_0x33bac2:0x165},_0x411cd8=_0x26592c;this[_0x411cd8(_0x20a4e0._0x2fbead)](_0x411cd8(_0x20a4e0._0x33bac2),[_0x506f70,_0x44452a]);}async[_0x26592c(0x172)](_0x357f3d){const _0x129ddf=_0x26592c;this[_0x129ddf(0x1dd)](_0x129ddf(0x172),[_0x357f3d]);}async['waitForLoadState'](_0x1619f6,_0x4d790d){const _0x32aafb={_0x29b987:0x168},_0x11d8ec=_0x26592c;this['record'](_0x11d8ec(_0x32aafb._0x29b987),[_0x1619f6,_0x4d790d]);}async['goto'](_0x19d697,_0x46e939){const _0x5496cc={_0x36a4de:0x1dd},_0x167186=_0x26592c;this[_0x167186(_0x5496cc._0x36a4de)](_0x167186(0x1a7),[_0x19d697,_0x46e939]),this['currentUrl']=_0x19d697;}async[_0x26592c(0x193)](_0x5c2f71){const _0x459ca3={_0x3be099:0x1dd,_0x3bb60b:0x193},_0x26da2c=_0x26592c;this[_0x26da2c(_0x459ca3._0x3be099)](_0x26da2c(_0x459ca3._0x3bb60b),[_0x5c2f71]);}async[_0x26592c(0x181)](_0x2759d3){const _0x339895=_0x26592c;this[_0x339895(0x1dd)]('goBack',[_0x2759d3]);}async[_0x26592c(0x18b)](_0x1296ad){const _0x234db0={_0x10ffae:0x1dd},_0x44fcd2=_0x26592c;this[_0x44fcd2(_0x234db0._0x10ffae)](_0x44fcd2(0x18b),[_0x1296ad]);}async['evaluate'](_0x29d4dd){const _0x586ebb={_0x59abff:0x1aa},_0x59d6cc=_0x26592c;return this['record'](_0x59d6cc(_0x586ebb._0x59abff),[_0x29d4dd]),this['behavior'][_0x59d6cc(0x1a5)];}async['evaluateOnLocator'](_0x4a12d4,_0x55c6cf){const _0x18b54d={_0xe7a3d4:0x173},_0x55a2b3=_0x26592c;return this[_0x55a2b3(0x1dd)](_0x55a2b3(_0x18b54d._0xe7a3d4),[_0x4a12d4,_0x55c6cf]),void 0x0;}async[_0x26592c(0x16e)](_0x2294f8){const _0x244f20={_0x13e736:0x1da,_0x4da851:0x1e4},_0x139652=_0x26592c;this[_0x139652(0x1dd)](_0x139652(0x16e),[_0x2294f8]);if(_0x2294f8['steps']['length']!==0x1||_0x2294f8[_0x139652(0x1e4)][0x0][_0x139652(0x1d2)]!==_0x139652(_0x244f20._0x13e736))return null;const _0x15cb09=_0x2294f8[_0x139652(_0x244f20._0x4da851)][0x0][_0x139652(0x1da)],_0x83d23b=this[_0x139652(0x17c)]['elementHintByRef']?.[_0x15cb09];return _0x83d23b??null;}async[_0x26592c(0x186)](_0x517571){const _0x34cafe={_0x43bc40:0x1dd,_0x10a487:0x186,_0x4b51d0:0x1b6},_0x57848c=_0x26592c;return this[_0x57848c(_0x34cafe._0x43bc40)](_0x57848c(_0x34cafe._0x10a487),[_0x517571]),this[_0x57848c(_0x34cafe._0x4b51d0)](_0x517571?.[_0x57848c(0x192)]);}async[_0x26592c(0x164)](_0x229420,_0x2cf8cc){const _0x49104a={_0x300407:0x164},_0x173456=_0x26592c;return this[_0x173456(0x1dd)](_0x173456(_0x49104a._0x300407),[_0x229420,_0x2cf8cc]),this['screenshotBytes'](_0x2cf8cc?.['type']);}[_0x26592c(0x1b6)](_0x164275){const _0x527699={_0x4751bc:0x1db},_0x50eb43=_0x26592c,_0x16b3ab=this[_0x50eb43(0x17c)][_0x50eb43(0x1b6)];if(_0x16b3ab===void 0x0)return Buffer[_0x50eb43(_0x527699._0x4751bc)](_0x50eb43(0x170));return typeof _0x16b3ab===_0x50eb43(0x182)?_0x16b3ab(_0x164275):_0x16b3ab;}async['outerHTML'](_0x3db27a){const _0x21fd32={_0x2e242c:0x1e4,_0x4208cb:0x18f,_0x45fc16:0x190,_0x3966b5:0x1ae,_0x15748a:0x1b1},_0x4eef64=_0x26592c;this[_0x4eef64(0x1dd)](_0x4eef64(0x191),[_0x3db27a]);if(_0x3db27a[_0x4eef64(_0x21fd32._0x2e242c)][_0x4eef64(_0x21fd32._0x4208cb)]===0x1&&_0x3db27a[_0x4eef64(0x1e4)][0x0][_0x4eef64(0x1d2)]===_0x4eef64(0x1da)){const _0x476421=_0x3db27a[_0x4eef64(0x1e4)][0x0][_0x4eef64(0x1da)];return this[_0x4eef64(0x17c)][_0x4eef64(0x1bb)]?.[_0x476421]??_0x4eef64(_0x21fd32._0x45fc16)+_0x476421+_0x4eef64(_0x21fd32._0x3966b5);}return _0x4eef64(_0x21fd32._0x15748a);}},FakeContext=class{constructor(_0x1760da,_0x8027e7,_0x5acc94){const _0x5dfd43={_0x480cf1:0x19e,_0xfeb96f:0x1df},_0x2b24d3=_0x26592c;this['recorder']=_0x1760da,this['behavior']=_0x8027e7,this['scope']=_0x5acc94;const _0x302b86=new FakePage(_0x1760da,_0x8027e7,_0x5acc94+'.page0',_0x8027e7[_0x2b24d3(_0x5dfd43._0x480cf1)]??_0x2b24d3(0x171));_0x8027e7[_0x2b24d3(0x197)]&&(_0x302b86[_0x2b24d3(_0x5dfd43._0xfeb96f)]=()=>{this['emitFakePopup'](_0x8027e7['popupOnClick']);}),this['pageList']=[_0x302b86],this[_0x2b24d3(0x16b)]={..._0x8027e7['localStorage']??{}},this['cookieState']={..._0x8027e7[_0x2b24d3(0x1a3)]??{}};}[_0x26592c(0x18c)];[_0x26592c(0x17c)];[_0x26592c(0x1d7)];static{__name(this,_0x26592c(0x19b));}[_0x26592c(0x1d1)];[_0x26592c(0x1de)]=0x0;[_0x26592c(0x176)]=[];[_0x26592c(0x16b)];['cookieState'];['newPageListeners']=new Set();[_0x26592c(0x1dd)](_0x44a4a8,_0x38b4a6){const _0x18ed92={_0x1a50dd:0x1d7},_0x34426e=_0x26592c;this[_0x34426e(0x18c)][_0x34426e(0x1ba)]({'scope':this[_0x34426e(_0x18ed92._0x1a50dd)],'method':_0x44a4a8,'args':_0x38b4a6});}[_0x26592c(0x1c4)](){const _0x11f540={_0x34e401:0x1d1},_0x2c6404=_0x26592c;return this[_0x2c6404(_0x11f540._0x34e401)];}[_0x26592c(0x16d)](){const _0x4bb6a0={_0x1be02c:0x1de},_0x37cc4d=_0x26592c,_0x7864ad=this['pageList'][this[_0x37cc4d(_0x4bb6a0._0x1be02c)]];if(!_0x7864ad)throw new DriverError(_0x37cc4d(0x1dc),{'activeIdx':this[_0x37cc4d(0x1de)]});return _0x7864ad;}[_0x26592c(0x1a9)](){const _0x4dd0a6=_0x26592c;return this['behavior'][_0x4dd0a6(0x1a9)]??[];}[_0x26592c(0x1be)](){const _0x317def=_0x26592c;return this[_0x317def(0x17c)]['networkEntries']??[];}async['setActivePage'](_0x542b08){const _0x62667f={_0x2ad670:0x1d1,_0x30131b:0x18f},_0x466280=_0x26592c;this[_0x466280(0x1dd)]('setActivePage',[_0x542b08]);if(_0x542b08<0x0||_0x542b08>=this[_0x466280(0x1d1)]['length'])throw new DriverError('page\x20index\x20out\x20of\x20range',{'index':_0x542b08,'available':this[_0x466280(_0x62667f._0x2ad670)][_0x466280(0x18f)]});this['activeIdx']=_0x542b08,this[_0x466280(0x176)][_0x466280(_0x62667f._0x30131b)]=0x0;}[_0x26592c(0x19f)](_0x20e1a1){return subscribe(this['newPageListeners'],_0x20e1a1);}[_0x26592c(0x1c8)](_0x770a6c){const _0x176932={_0x4554af:0x1d1,_0x352888:0x18f,_0x51cf63:0x17c},_0x49b368=_0x26592c,_0x2cdbe7=this[_0x49b368(0x1d7)]+_0x49b368(0x1e1)+this[_0x49b368(_0x176932._0x4554af)][_0x49b368(_0x176932._0x352888)],_0x46a587=new FakePage(this[_0x49b368(0x18c)],this[_0x49b368(_0x176932._0x51cf63)],_0x2cdbe7,_0x770a6c);this['pageList'][_0x49b368(0x1ba)](_0x46a587);const _0x411590=this[_0x49b368(_0x176932._0x4554af)][_0x49b368(_0x176932._0x352888)]-0x1;for(const _0x5a1b7f of this['newPageListeners']){try{_0x5a1b7f({'index':_0x411590,'url':_0x770a6c});}catch{}}return _0x411590;}[_0x26592c(0x1bd)](_0x1da927){const _0x2bd199={_0xc9c2f2:0x1e3,_0x4b0023:0x1d8},_0x4137f4=_0x26592c;if(_0x1da927<0x0||_0x1da927>=this[_0x4137f4(0x1d1)]['length'])throw new DriverError(_0x4137f4(_0x2bd199._0xc9c2f2),{'index':_0x1da927,'available':this[_0x4137f4(0x1d1)]['length']});this[_0x4137f4(0x1d1)][_0x4137f4(_0x2bd199._0x4b0023)](_0x1da927,0x1);}async[_0x26592c(0x16a)](_0x1d3602){const _0x11f486={_0x415d11:0x1e4},_0x34f446=_0x26592c;this['record'](_0x34f446(0x16a),[_0x1d3602]);if(!_0x1d3602[_0x34f446(_0x11f486._0x415d11)][_0x34f446(0x18f)])throw new LocatorError('enterFrame\x20called\x20with\x20empty\x20locator',{'locator':_0x1d3602});this['frameStack'][_0x34f446(0x1ba)](_0x1d3602);}async['exitFrame'](){const _0x3fa800={_0x36ed0e:0x18f,_0x443bba:0x1b0},_0x4b7c42=_0x26592c;this[_0x4b7c42(0x1dd)](_0x4b7c42(0x1af),[]);if(this[_0x4b7c42(0x176)][_0x4b7c42(_0x3fa800._0x36ed0e)]===0x0)throw new DriverError(_0x4b7c42(_0x3fa800._0x443bba),{});this[_0x4b7c42(0x176)][_0x4b7c42(0x1ce)]();}async['setLocalStorage'](_0x288508,_0x1d44e1){const _0x3810cd={_0x117a29:0x16b},_0xa65bfb=_0x26592c;this[_0xa65bfb(0x1dd)]('setLocalStorage',[_0x288508,_0x1d44e1]),this[_0xa65bfb(_0x3810cd._0x117a29)][_0x288508]=_0x1d44e1;}async[_0x26592c(0x174)](_0x3f40bf){const _0x5085c5={_0x221678:0x1dd},_0x440e48=_0x26592c;return this[_0x440e48(_0x5085c5._0x221678)](_0x440e48(0x174),[_0x3f40bf]),this[_0x440e48(0x16b)][_0x3f40bf]??null;}async['setCookie'](_0x5931f5,_0x9cf2f3,_0x56bd6a){const _0x2fd8b7={_0x3c687e:0x1dd},_0x1084b4=_0x26592c;this[_0x1084b4(_0x2fd8b7._0x3c687e)](_0x1084b4(0x187),[_0x5931f5,_0x9cf2f3,_0x56bd6a]),this['cookieState'][_0x5931f5]=_0x9cf2f3;}async[_0x26592c(0x196)](_0x5a4e57){const _0x3c59c6=_0x26592c;return this['record'](_0x3c59c6(0x196),[_0x5a4e57]),this['cookieState'][_0x5a4e57]??null;}async[_0x26592c(0x198)](_0x2b6b89){const _0x2b4183={_0x4ffa62:0x1dd},_0x329480=_0x26592c;this[_0x329480(_0x2b4183._0x4ffa62)](_0x329480(0x198),[_0x2b6b89]);}async[_0x26592c(0x1aa)](_0x3720be){const _0x1c406a={_0x3be31a:0x1aa},_0x53bbf7=_0x26592c;return this['record'](_0x53bbf7(_0x1c406a._0x3be31a),[_0x3720be]),void 0x0;}async['close'](){const _0x3ec69f=_0x26592c;this['record'](_0x3ec69f(0x17b),[]);}[_0x26592c(0x177)](){const _0x24749b={_0x5e1d95:0x176},_0xc8a89b=_0x26592c;return this[_0xc8a89b(_0x24749b._0x5e1d95)][_0xc8a89b(0x18f)];}},FakeWebDriver=class{constructor(_0x933b11={}){const _0x2a1470={_0x3e52fb:0x18c},_0x3bd456=_0x26592c;this['behavior']=_0x933b11,this[_0x3bd456(_0x2a1470._0x3e52fb)]=createRecorder();}[_0x26592c(0x17c)];static{__name(this,_0x26592c(0x1e0));}['launched']=![];[_0x26592c(0x18c)];[_0x26592c(0x1b8)]=[];async[_0x26592c(0x1a1)](_0x185b02){const _0x3a9996=_0x26592c;this['recorder'][_0x3a9996(0x1ba)]({'scope':'driver','method':'launch','args':[_0x185b02]}),this['launched']=!![];}async[_0x26592c(0x1a0)](_0x54fed5){const _0x118c7d={_0x232dda:0x1ba,_0x10559c:0x1c3,_0x3208c3:0x1a0,_0x41b155:0x1ca,_0x53fae5:0x1bf},_0x1fbfd2=_0x26592c;this[_0x1fbfd2(0x18c)][_0x1fbfd2(_0x118c7d._0x232dda)]({'scope':_0x1fbfd2(_0x118c7d._0x10559c),'method':_0x1fbfd2(_0x118c7d._0x3208c3),'args':[_0x54fed5]});if(!this[_0x1fbfd2(_0x118c7d._0x41b155)])throw new DriverError(_0x1fbfd2(_0x118c7d._0x53fae5),{});const _0x46a3e8=new FakeContext(this['recorder'],this[_0x1fbfd2(0x17c)],_0x1fbfd2(0x163)+this[_0x1fbfd2(0x1b8)][_0x1fbfd2(0x18f)]);return this['contexts'][_0x1fbfd2(_0x118c7d._0x232dda)](_0x46a3e8),_0x46a3e8;}async['close'](){const _0x4ee164={_0x24d3b9:0x1c3},_0x13f66f=_0x26592c;this[_0x13f66f(0x18c)][_0x13f66f(0x1ba)]({'scope':_0x13f66f(_0x4ee164._0x24d3b9),'method':'close','args':[]}),this['launched']=![];}['wsEndpoint'](){return void 0x0;}async['connectShared'](){const _0xb1b1ce={_0xfd4da4:0x179},_0x1f83b3=_0x26592c;throw new DriverError(_0x1f83b3(_0xb1b1ce._0xfd4da4),{});}[_0x26592c(0x1e2)](_0x40d6eb){throw new DriverError('attachExisting\x20not\x20supported\x20by\x20FakeWebDriver',{});}['calls'](){const _0x5351c3={_0x389277:0x1a8},_0x59e0f3=_0x26592c;return this[_0x59e0f3(0x18c)][_0x59e0f3(_0x5351c3._0x389277)]();}[_0x26592c(0x1ad)](_0x3394dd){const _0x2e0b15={_0x14692e:0x18c,_0x2cb697:0x1a8,_0x315791:0x185},_0x45c76c=_0x26592c;return this[_0x45c76c(_0x2e0b15._0x14692e)][_0x45c76c(_0x2e0b15._0x2cb697)]()[_0x45c76c(_0x2e0b15._0x315791)](_0x4b952a=>_0x4b952a[_0x45c76c(0x1c1)]===_0x3394dd);}};export{FakeWebDriver};
|
|
1
|
+
const _0x36c638=_0x259f;(function(_0x19efe8,_0x15e9a1){const _0x17611f={_0x527417:0x17d,_0x58afc6:0x167,_0x2f84d9:0x13f,_0x5670ca:0x168,_0x28140f:0x15c},_0x4d2156=_0x259f,_0x26c1bd=_0x19efe8();while(!![]){try{const _0x204a0f=parseInt(_0x4d2156(0x146))/0x1+parseInt(_0x4d2156(_0x17611f._0x527417))/0x2+parseInt(_0x4d2156(_0x17611f._0x58afc6))/0x3+-parseInt(_0x4d2156(_0x17611f._0x2f84d9))/0x4+parseInt(_0x4d2156(_0x17611f._0x5670ca))/0x5*(-parseInt(_0x4d2156(0x174))/0x6)+-parseInt(_0x4d2156(0x19b))/0x7*(parseInt(_0x4d2156(0x15f))/0x8)+parseInt(_0x4d2156(_0x17611f._0x28140f))/0x9;if(_0x204a0f===_0x15e9a1)break;else _0x26c1bd['push'](_0x26c1bd['shift']());}catch(_0x3c11b9){_0x26c1bd['push'](_0x26c1bd['shift']());}}}(_0x4c32,0x44af3));var __defProp=Object['defineProperty'],__name=(_0x5e421b,_0x2ab47c)=>__defProp(_0x5e421b,_0x36c638(0x15a),{'value':_0x2ab47c,'configurable':!![]});function _0x4c32(){const _0x3f188e=['nZmZmJy2s0n0zKvf','mtiXmJvZDNLSCu8','z290BW','C2nYzwvUC2HVDevSzw1LBNq','AxnwAxnPyMXL','C2v0q29VA2LL','Dw5JAgvJAW','Dgv4DenVBNrLBNrcEurLzMf1Bhq','CMvJB3jKzxi','z2v0q29VA2LL','zNjHBwvezxb0Aa','y2HLy2S','C3vIC2nYAwjL','ntqWqLzNr3np','y2HLy2TLzfn0yxrL','Ag92zxi','lNbHz2uW','rMfRzvbHz2u','AxneAxnHyMXLza','y2XPy2S','y2fSBhngB3i','C3rLChm','mta1nZuWnNPICfbjCW','y29UBMvJDfnOyxjLzcbUB3qGC3vWCg9YDgvKigj5iezHA2vxzwjeCML2zxi','zMLSBa','y2fSBhm','zxzHBhvHDgvpBKXVy2f0B3i','Bgf1BMnOzwq','CgfNzxm','D2fPDezVCLrLEhq','y2HLy2TLzfn0yxrLqNLezwzHDwX0','z29cywnR','C2f2zvn0B3jHz2vtDgf0zq','z2v0tg9JywXtDg9YywDL','yxr0ywnOrxHPC3rPBMCGBM90ihn1ChbVCNrLzcbIEsbgywTLv2vIrhjPDMvY','iJ48l2rPDJ4','CgfNzuXPC3q','Aw5UzxjuzxH0','AxneAxnHyMXLzej5rgvMyxvSDa','Bgf1BMnO','y2XVC2vgywTLugfNzq','yxr0CMLIDxrLC0j5rgvMyxvSDa','zw1PDezHA2vqB3b1Ca','C2v0qwn0AxzLugfNzq','yxr0ywnOrxHPC3rPBMC','BMv3q29UDgv4DcbJywXSzwqGyMvMB3jLigXHDw5JAcGP','zxzHBhvHDgu','zxjYB3jpBK5LEhrby3rPB24','C2nVCgu','Bg9JywXtDg9YywDLu3rHDgu','DgL0Bgu','Dgv4DenVBNrLBNq','mJC0otC3nvfTAMHbrW','zhjHz0fUzerYB3a','rMfRzunVBNrLEhq','pgrPDJ48l2rPDJ4','ywn0AxzLswr4','DxjS','lNbHz2u','BMv0D29YA0vUDhjPzxm','y29UC29SzuvUDhjPzxm','C2nYzwvUC2HVDej5DgvZ','BgvUz3rO','BMv3q29UDgv4Da','D3nfBMrWB2LUDa','Cg9W','Bwf5yMvuAhjVDW','y29VA2LLu3rHDgu','D2fPDezVCLvYBa','Aw5WDxrwywX1zuj5rgvMyxvSDa','DhLWzq','CMvJB3jK','B25ozxDqywDL','zNjHBwvtDgfJAW','zxzHBhvHDgvszxn1Bhq','C2v0tg9JywXtDg9YywDL','rhjPDMvYrxjYB3i','A2LUza','mty5nJe5mNrRvvLzwa','Aw5WDxrwywX1zq','C3bSAwnL','zMfRzs1WBMC','CMvM','CMvSB2fK','y2XPCgjVyxjKugfZDgu','mZKYndqZveznEuX6','zgvSzxrL','Cg9WDxbpBKnSAwnR','y29VA2LLCW','zg91yMXLq2XPy2S','C2vSzwn0t3b0Aw9U','yMvOyxzPB3i','z29gB3j3yxjK','y29UDgv4Dhm','B3v0zxjiDg1SqNLszwy','zNvUy3rPB24','B25bzNrLCKnSAwnR','B3v0zxjive1m','C2nYB2XSsw50B1zPzxC','CgfNzsbPBMrLEcbVDxqGB2yGCMfUz2u','DxbSB2fKrMLSzq','y291BNq','Aw5ZCgvJDevSzw1LBNq','ChvZAa','BMv3ugfNzuXPC3rLBMvYCW','BMfTzq','zhjPDMvY','mtm1nZuYnefxAMnwrq','y2XVC2u','zw50zxjgCMfTzq','oeLkCuXbBG','D2fPDezVCG','D2fPDezVCKXVywrtDgf0zq','zxHPDezYyw1L','y3vYCMvUDfvYBa','C2nYzwvUC2HVDa','tg9JyxrVCKvYCM9Y','z2v0qxr0CMLIDxrL'];_0x4c32=function(){return _0x3f188e;};return _0x4c32();}function subscribe(_0x14dec1,_0x86dc39){const _0x18e6dc={_0x35d235:0x147};return _0x14dec1['add'](_0x86dc39),()=>{const _0x352cb7=_0x259f;_0x14dec1[_0x352cb7(_0x18e6dc._0x35d235)](_0x86dc39);};}function _0x259f(_0x378a54,_0x2823ec){_0x378a54=_0x378a54-0x13f;const _0x4c32cd=_0x4c32();let _0x259f30=_0x4c32cd[_0x378a54];if(_0x259f['fqsYRa']===undefined){var _0x3d1fcf=function(_0x5adf40){const _0x4bbdc7='abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+/=';let _0x5e421b='',_0x2ab47c='';for(let _0x14dec1=0x0,_0x86dc39,_0x39cc01,_0x391e50=0x0;_0x39cc01=_0x5adf40['charAt'](_0x391e50++);~_0x39cc01&&(_0x86dc39=_0x14dec1%0x4?_0x86dc39*0x40+_0x39cc01:_0x39cc01,_0x14dec1++%0x4)?_0x5e421b+=String['fromCharCode'](0xff&_0x86dc39>>(-0x2*_0x14dec1&0x6)):0x0){_0x39cc01=_0x4bbdc7['indexOf'](_0x39cc01);}for(let _0xe45d0=0x0,_0x2acf36=_0x5e421b['length'];_0xe45d0<_0x2acf36;_0xe45d0++){_0x2ab47c+='%'+('00'+_0x5e421b['charCodeAt'](_0xe45d0)['toString'](0x10))['slice'](-0x2);}return decodeURIComponent(_0x2ab47c);};_0x259f['swvlrN']=_0x3d1fcf,_0x259f['OnhmPU']={},_0x259f['fqsYRa']=!![];}const _0x36c961=_0x4c32cd[0x0],_0x145f24=_0x378a54+_0x36c961,_0x41b508=_0x259f['OnhmPU'][_0x145f24];return!_0x41b508?(_0x259f30=_0x259f['swvlrN'](_0x259f30),_0x259f['OnhmPU'][_0x145f24]=_0x259f30):_0x259f30=_0x41b508,_0x259f30;}__name(subscribe,_0x36c638(0x173));import{UnotestError}from'@unotest/core';var DriverError=class extends UnotestError{static{__name(this,_0x36c638(0x1b3));}},LocatorError=class extends UnotestError{static{__name(this,_0x36c638(0x165));}};function createRecorder(){const _0x54a8c2={_0x3525fc:0x158,_0x699e1f:0x180},_0x320230=_0x36c638,_0x39cc01=[];let _0x391e50=0x0;return{'push':__name(_0xe45d0=>_0x39cc01[_0x320230(0x158)]({..._0xe45d0,'seq':_0x391e50++}),_0x320230(_0x54a8c2._0x3525fc)),'calls':__name(()=>_0x39cc01,_0x320230(_0x54a8c2._0x699e1f))};}__name(createRecorder,'createRecorder');var FakePage=class{constructor(_0x2acf36,_0x313a84,_0x42270a,_0x73cc5b){const _0x31244a={_0x3d62ca:0x14c},_0x2c4160=_0x36c638;this['recorder']=_0x2acf36,this[_0x2c4160(_0x31244a._0x3d62ca)]=_0x313a84,this[_0x2c4160(0x197)]=_0x42270a,this[_0x2c4160(0x163)]=_0x73cc5b;}['recorder'];['behavior'];[_0x36c638(0x197)];static{__name(this,_0x36c638(0x178));}[_0x36c638(0x163)];[_0x36c638(0x151)];[_0x36c638(0x1ae)](_0x2e98c8,_0xf1f5d0){const _0x3ff3b2=_0x36c638;this[_0x3ff3b2(0x16f)]['push']({'scope':this[_0x3ff3b2(0x197)],'method':_0x2e98c8,'args':_0xf1f5d0});}[_0x36c638(0x1a9)](){const _0x395895={_0xdb0db5:0x196},_0x5c8b7b=_0x36c638;if(this[_0x5c8b7b(0x14c)][_0x5c8b7b(_0x395895._0xdb0db5)]){const _0x548301=this[_0x5c8b7b(0x14c)]['errorOnNextAction'];this[_0x5c8b7b(0x14c)]['errorOnNextAction']=void 0x0;throw _0x548301;}}[_0x36c638(0x1a0)](){return this['currentUrl'];}async['title'](){const _0x4fef64={_0x5d7264:0x199},_0x521e1e=_0x36c638;return this[_0x521e1e(0x1ae)](_0x521e1e(_0x4fef64._0x5d7264),[]),'fake\x20title';}async['click'](_0x17bbb6,_0x1f37da){const _0x407dce=_0x36c638;this[_0x407dce(0x1ae)](_0x407dce(0x17a),[_0x17bbb6,_0x1f37da]),this['maybeThrow'](),this['onAfterClick']?.();}async[_0x36c638(0x14a)](_0x3e22c7,_0x5ee158){const _0x1c5cb9={_0x1da36f:0x1ae,_0xd03507:0x14a,_0xa80635:0x1a9},_0xfeae57=_0x36c638;this[_0xfeae57(_0x1c5cb9._0x1da36f)](_0xfeae57(_0x1c5cb9._0xd03507),[_0x3e22c7,_0x5ee158]),this[_0xfeae57(_0x1c5cb9._0xa80635)]();}async[_0x36c638(0x17f)](_0x11e365,_0x58354a,_0x148dfd){const _0x417f2e={_0xa5c179:0x17f},_0xa8b55a=_0x36c638;this[_0xa8b55a(0x1ae)](_0xa8b55a(_0x417f2e._0xa5c179),[_0x11e365,_0x58354a,_0x148dfd]),this[_0xa8b55a(0x1a9)]();}async['press'](_0x4cc1e1,_0x1292c9,_0xc54ad2){const _0x1fcbc7={_0x9cadf:0x1ae,_0x1ac15d:0x1a9},_0x2ad744=_0x36c638;this[_0x2ad744(_0x1fcbc7._0x9cadf)]('press',[_0x4cc1e1,_0x1292c9,_0xc54ad2]),this[_0x2ad744(_0x1fcbc7._0x1ac15d)]();}async[_0x36c638(0x172)](_0x5b5fdb,_0x232280){const _0x3e4a7d={_0xf00eae:0x1a9},_0xf3bf83=_0x36c638;this['record'](_0xf3bf83(0x172),[_0x5b5fdb,_0x232280]),this[_0xf3bf83(_0x3e4a7d._0xf00eae)]();}async[_0x36c638(0x16d)](_0x2dea48,_0x5e4c89){const _0x49d6b6=_0x36c638;this['record']('uncheck',[_0x2dea48,_0x5e4c89]),this[_0x49d6b6(0x1a9)]();}async['selectOption'](_0x4efc92,_0x195c56,_0x3ffcb6){const _0x330e70={_0x463000:0x1ae},_0x552724=_0x36c638;this[_0x552724(_0x330e70._0x463000)](_0x552724(0x14b),[_0x4efc92,_0x195c56,_0x3ffcb6]),this['maybeThrow']();}async['hover'](_0x32a414,_0x106dd4){const _0xf28ca9={_0x34b2ef:0x1a9},_0x58d18b=_0x36c638;this[_0x58d18b(0x1ae)](_0x58d18b(0x176),[_0x32a414,_0x106dd4]),this[_0x58d18b(_0xf28ca9._0x34b2ef)]();}async[_0x36c638(0x153)](_0x2f0cc1){const _0x387b91={_0x51275f:0x1ae,_0x164309:0x153},_0x10c12c=_0x36c638;this[_0x10c12c(_0x387b91._0x51275f)](_0x10c12c(_0x387b91._0x164309),[_0x2f0cc1]),this[_0x10c12c(0x1a9)]();}async[_0x36c638(0x19c)](_0x451340,_0x57e3d8,_0x1292b5){const _0x5f2cf2=_0x36c638;this[_0x5f2cf2(0x1ae)](_0x5f2cf2(0x19c),[_0x451340,_0x57e3d8,_0x1292b5]),this[_0x5f2cf2(0x1a9)]();}async['uploadFile'](_0x320407,_0x12336d){const _0x27d651={_0x7cd10c:0x155},_0x55fdda=_0x36c638;this['record'](_0x55fdda(_0x27d651._0x7cd10c),[_0x320407,_0x12336d]),this[_0x55fdda(0x1a9)]();}async[_0x36c638(0x145)](_0x474524,_0x13fef4){const _0x27a6e3={_0x1a115d:0x145},_0x3ac11d=_0x36c638;this[_0x3ac11d(0x1ae)](_0x3ac11d(_0x27a6e3._0x1a115d),[_0x474524,_0x13fef4]),this['maybeThrow']();}async['count'](_0xadd5a8){const _0x4bc562={_0x1a7308:0x14c},_0x110166=_0x36c638;return this[_0x110166(0x1ae)](_0x110166(0x156),[_0xadd5a8]),this[_0x110166(_0x4bc562._0x1a7308)]['countByDefault']??0x1;}async['textContent'](_0x5d9ac7){const _0x369d90={_0x428aa9:0x1ae,_0x575c1a:0x19a,_0x168aa9:0x16e},_0x4ab72=_0x36c638;return this[_0x4ab72(_0x369d90._0x428aa9)](_0x4ab72(_0x369d90._0x575c1a),[_0x5d9ac7]),this[_0x4ab72(0x14c)][_0x4ab72(_0x369d90._0x168aa9)]??'';}async[_0x36c638(0x18c)](_0x3483d0){const _0x209767={_0x49f49a:0x1ae,_0x2f725b:0x16e},_0x49edd0=_0x36c638;return this[_0x49edd0(_0x209767._0x49f49a)]('innerText',[_0x3483d0]),this[_0x49edd0(0x14c)]['innerTextByDefault']??this[_0x49edd0(0x14c)][_0x49edd0(_0x209767._0x2f725b)]??'';}async['inputValue'](_0xf7a228){const _0x18ed43={_0x3be16f:0x140,_0x58d206:0x14c,_0x3d26cf:0x1ac},_0x4f05d2=_0x36c638;return this['record'](_0x4f05d2(_0x18ed43._0x3be16f),[_0xf7a228]),this[_0x4f05d2(_0x18ed43._0x58d206)][_0x4f05d2(_0x18ed43._0x3d26cf)]??'';}async['checkedState'](_0x4a879d){const _0x5bfd7c={_0x4d5fda:0x1ae},_0xfdcbc5=_0x36c638;return this[_0xfdcbc5(_0x5bfd7c._0x4d5fda)](_0xfdcbc5(0x175),[_0x4a879d]),this[_0xfdcbc5(0x14c)][_0xfdcbc5(0x185)]??null;}async[_0x36c638(0x16b)](_0x2bd56c){const _0x4f1ea7=_0x36c638;return this[_0x4f1ea7(0x1ae)](_0x4f1ea7(0x16b),[_0x2bd56c]),this[_0x4f1ea7(0x14c)]['isVisibleByDefault']??!![];}async[_0x36c638(0x179)](_0x29052){const _0x2a8c2c=_0x36c638;return this['record'](_0x2a8c2c(0x179),[_0x29052]),this['behavior'][_0x2a8c2c(0x18d)]??![];}async[_0x36c638(0x166)](_0x19b5f6,_0x5810d4){const _0x213233={_0x1a61b8:0x1ae},_0x5b5f0a=_0x36c638;return this[_0x5b5f0a(_0x213233._0x1a61b8)]('getAttribute',[_0x19b5f6,_0x5810d4]),this['behavior'][_0x5b5f0a(0x190)]?.[_0x5810d4]??null;}async['waitFor'](_0x315c2a,_0x18a03f){const _0x5af48b={_0x49b27e:0x160},_0x1240a0=_0x36c638;this[_0x1240a0(0x1ae)](_0x1240a0(_0x5af48b._0x49b27e),[_0x315c2a,_0x18a03f]);}async[_0x36c638(0x1ab)](_0x50888d,_0x5cb3fb){const _0x429f55={_0x638c7f:0x1ae},_0x2b364e=_0x36c638;this[_0x2b364e(_0x429f55._0x638c7f)](_0x2b364e(0x1ab),[_0x50888d,_0x5cb3fb]);}async[_0x36c638(0x184)](_0x2845d6,_0x390e70){const _0x2aec20={_0x2dda8d:0x1ae,_0x415690:0x184},_0x157ace=_0x36c638;this[_0x157ace(_0x2aec20._0x2dda8d)](_0x157ace(_0x2aec20._0x415690),[_0x2845d6,_0x390e70]);}async['waitForNavigation'](_0x2f1cea){const _0x15715c={_0x468631:0x1ae},_0x5c9076=_0x36c638;this[_0x5c9076(_0x15715c._0x468631)]('waitForNavigation',[_0x2f1cea]);}async[_0x36c638(0x161)](_0x228b9b,_0x4c6174){const _0x1d8d16=_0x36c638;this[_0x1d8d16(0x1ae)]('waitForLoadState',[_0x228b9b,_0x4c6174]);}async[_0x36c638(0x169)](_0x588644,_0x270684){const _0x3c5d96={_0x5d46ed:0x163},_0x495004=_0x36c638;this[_0x495004(0x1ae)](_0x495004(0x169),[_0x588644,_0x270684]),this[_0x495004(_0x3c5d96._0x5d46ed)]=_0x588644;}async[_0x36c638(0x144)](_0x48d13a){const _0x46a63f={_0x27fa71:0x1ae,_0x17e0ea:0x144},_0x39c6fa=_0x36c638;this[_0x39c6fa(_0x46a63f._0x27fa71)](_0x39c6fa(_0x46a63f._0x17e0ea),[_0x48d13a]);}async[_0x36c638(0x186)](_0x3a82f1){const _0x15eaab={_0x4fbb94:0x186},_0x4e495c=_0x36c638;this['record'](_0x4e495c(_0x15eaab._0x4fbb94),[_0x3a82f1]);}async[_0x36c638(0x14d)](_0x3e7656){const _0xbc016=_0x36c638;this[_0xbc016(0x1ae)]('goForward',[_0x3e7656]);}async[_0x36c638(0x195)](_0x36cb3d){const _0x278003={_0x19b14e:0x195,_0x3a469b:0x1b1},_0x52d5a1=_0x36c638;return this['record'](_0x52d5a1(_0x278003._0x19b14e),[_0x36cb3d]),this[_0x52d5a1(0x14c)][_0x52d5a1(_0x278003._0x3a469b)];}async[_0x36c638(0x181)](_0x4341f6,_0x1d9c3c){const _0x440032={_0x3d8fc3:0x181},_0x4f4447=_0x36c638;return this[_0x4f4447(0x1ae)](_0x4f4447(_0x440032._0x3d8fc3),[_0x4341f6,_0x1d9c3c]),void 0x0;}async[_0x36c638(0x157)](_0x2e086b){const _0x284709={_0xd22fc1:0x1b4,_0x3e58f2:0x143,_0x1494b7:0x17c,_0x1911c7:0x143},_0x3af6f5=_0x36c638;this[_0x3af6f5(0x1ae)](_0x3af6f5(0x157),[_0x2e086b]);if(_0x2e086b[_0x3af6f5(0x17c)][_0x3af6f5(0x1a5)]!==0x1||_0x2e086b[_0x3af6f5(0x17c)][0x0][_0x3af6f5(_0x284709._0xd22fc1)]!==_0x3af6f5(_0x284709._0x3e58f2))return null;const _0x35b037=_0x2e086b[_0x3af6f5(_0x284709._0x1494b7)][0x0][_0x3af6f5(_0x284709._0x1911c7)],_0x29d9d8=this['behavior']['elementHintByRef']?.[_0x35b037];return _0x29d9d8??null;}async[_0x36c638(0x164)](_0x18cf38){const _0x1faba5={_0x4b21f3:0x1a4},_0x427556=_0x36c638;return this[_0x427556(0x1ae)]('screenshot',[_0x18cf38]),this[_0x427556(_0x1faba5._0x4b21f3)](_0x18cf38?.[_0x427556(0x1ad)]);}async['screenshotElement'](_0x595a0d,_0x374230){const _0xcd959f={_0x2a80d4:0x1ae,_0x4c1230:0x1a4},_0x3c1116=_0x36c638;return this[_0x3c1116(_0xcd959f._0x2a80d4)](_0x3c1116(0x16a),[_0x595a0d,_0x374230]),this[_0x3c1116(_0xcd959f._0x4c1230)](_0x374230?.[_0x3c1116(0x1ad)]);}[_0x36c638(0x1a4)](_0x2679c8){const _0x18665a={_0x2a93a7:0x14c,_0x4ed823:0x1a4,_0x2eba8d:0x142},_0xd724e=_0x36c638,_0x4de5e7=this[_0xd724e(_0x18665a._0x2a93a7)][_0xd724e(_0x18665a._0x4ed823)];if(_0x4de5e7===void 0x0)return Buffer['from'](_0xd724e(_0x18665a._0x2eba8d));return typeof _0x4de5e7===_0xd724e(0x150)?_0x4de5e7(_0x2679c8):_0x4de5e7;}async[_0x36c638(0x152)](_0x5b9db5){const _0x2d5668={_0x36f2fb:0x1ae,_0x58b02d:0x17c,_0x3d4567:0x143,_0x2efd68:0x19e},_0x3aff96=_0x36c638;this[_0x3aff96(_0x2d5668._0x36f2fb)]('outerHTML',[_0x5b9db5]);if(_0x5b9db5[_0x3aff96(0x17c)][_0x3aff96(0x1a5)]===0x1&&_0x5b9db5[_0x3aff96(0x17c)][0x0][_0x3aff96(0x1b4)]==='ref'){const _0x196609=_0x5b9db5[_0x3aff96(_0x2d5668._0x58b02d)][0x0][_0x3aff96(_0x2d5668._0x3d4567)];return this['behavior'][_0x3aff96(0x14f)]?.[_0x196609]??'<div\x20data-unotest-ref=\x22'+_0x196609+_0x3aff96(0x18a);}return _0x3aff96(_0x2d5668._0x2efd68);}},FakeContext=class{constructor(_0x1a9970,_0x57e946,_0x2d9524){const _0x1ab4eb={_0x49fab9:0x16f,_0x5f1fc8:0x197,_0x1a7b6a:0x148,_0x272475:0x149},_0x284691={_0x172287:0x191,_0xe93f6f:0x148},_0x5f26c=_0x36c638;this[_0x5f26c(_0x1ab4eb._0x49fab9)]=_0x1a9970,this[_0x5f26c(0x14c)]=_0x57e946,this[_0x5f26c(_0x1ab4eb._0x5f1fc8)]=_0x2d9524;const _0x146016=new FakePage(_0x1a9970,_0x57e946,_0x2d9524+_0x5f26c(0x177),_0x57e946['initialUrl']??'about:blank');_0x57e946[_0x5f26c(_0x1ab4eb._0x1a7b6a)]&&(_0x146016[_0x5f26c(0x151)]=()=>{const _0x42513d=_0x5f26c;this[_0x42513d(_0x284691._0x172287)](_0x57e946[_0x42513d(_0x284691._0xe93f6f)]);}),this[_0x5f26c(0x18b)]=[_0x146016],this[_0x5f26c(0x198)]={..._0x57e946['localStorage']??{}},this['cookieState']={..._0x57e946[_0x5f26c(_0x1ab4eb._0x272475)]??{}};}[_0x36c638(0x16f)];[_0x36c638(0x14c)];[_0x36c638(0x197)];static{__name(this,_0x36c638(0x19d));}[_0x36c638(0x18b)];[_0x36c638(0x19f)]=0x0;['frameStack']=[];[_0x36c638(0x198)];[_0x36c638(0x1aa)];[_0x36c638(0x159)]=new Set();[_0x36c638(0x1ae)](_0x1c5192,_0xc79ec3){const _0xdd3db4={_0x1befc4:0x158},_0xe9df8=_0x36c638;this[_0xe9df8(0x16f)][_0xe9df8(_0xdd3db4._0x1befc4)]({'scope':this['scope'],'method':_0x1c5192,'args':_0xc79ec3});}[_0x36c638(0x183)](){const _0x1da9e2=_0x36c638;return this[_0x1da9e2(0x18b)];}['activePage'](){const _0xf6d37e={_0x2fc1d9:0x19f,_0x574b47:0x19f},_0x92fdb7=_0x36c638,_0x2f9d17=this[_0x92fdb7(0x18b)][this[_0x92fdb7(_0xf6d37e._0x2fc1d9)]];if(!_0x2f9d17)throw new DriverError('no\x20active\x20page\x20in\x20context',{'activeIdx':this[_0x92fdb7(_0xf6d37e._0x574b47)]});return _0x2f9d17;}['consoleEntries'](){const _0x48b8d5={_0xebc485:0x14c},_0x32750e=_0x36c638;return this[_0x32750e(_0x48b8d5._0xebc485)][_0x32750e(0x1a3)]??[];}['networkEntries'](){const _0x840bcd={_0x9e562f:0x14c},_0x326875=_0x36c638;return this[_0x326875(_0x840bcd._0x9e562f)][_0x326875(0x1a2)]??[];}async['setActivePage'](_0x2c15e9){const _0x4b6086={_0x226e5d:0x192,_0xf1e6b8:0x18b,_0x5aa071:0x1a5,_0xf9a768:0x19f,_0x4e1485:0x1b0},_0x18f6dc=_0x36c638;this[_0x18f6dc(0x1ae)](_0x18f6dc(_0x4b6086._0x226e5d),[_0x2c15e9]);if(_0x2c15e9<0x0||_0x2c15e9>=this[_0x18f6dc(_0x4b6086._0xf1e6b8)][_0x18f6dc(_0x4b6086._0x5aa071)])throw new DriverError(_0x18f6dc(0x154),{'index':_0x2c15e9,'available':this['pageList'][_0x18f6dc(0x1a5)]});this[_0x18f6dc(_0x4b6086._0xf9a768)]=_0x2c15e9,this[_0x18f6dc(_0x4b6086._0x4e1485)][_0x18f6dc(0x1a5)]=0x0;}[_0x36c638(0x1af)](_0x2c06bf){const _0x2cd6d4={_0x217a3e:0x159},_0x1089e0=_0x36c638;return subscribe(this[_0x1089e0(_0x2cd6d4._0x217a3e)],_0x2c06bf);}[_0x36c638(0x191)](_0x19e4a2){const _0xf8695={_0x3ffb37:0x197,_0x293c25:0x1a1,_0x3ecd2d:0x18b,_0x5a2e26:0x1a5,_0x34733d:0x158},_0x125f4e=_0x36c638,_0x3e7005=this[_0x125f4e(_0xf8695._0x3ffb37)]+_0x125f4e(_0xf8695._0x293c25)+this[_0x125f4e(_0xf8695._0x3ecd2d)][_0x125f4e(_0xf8695._0x5a2e26)],_0xcd09f9=new FakePage(this[_0x125f4e(0x16f)],this[_0x125f4e(0x14c)],_0x3e7005,_0x19e4a2);this['pageList'][_0x125f4e(_0xf8695._0x34733d)](_0xcd09f9);const _0x17f92f=this[_0x125f4e(0x18b)][_0x125f4e(_0xf8695._0x5a2e26)]-0x1;for(const _0x185ef6 of this['newPageListeners']){try{_0x185ef6({'index':_0x17f92f,'url':_0x19e4a2});}catch{}}return _0x17f92f;}[_0x36c638(0x18f)](_0x4be16b){const _0x3dd4e3={_0x27f17c:0x1a5,_0x5e986a:0x154,_0x2660ef:0x18b},_0x270ea3=_0x36c638;if(_0x4be16b<0x0||_0x4be16b>=this['pageList'][_0x270ea3(_0x3dd4e3._0x27f17c)])throw new DriverError(_0x270ea3(_0x3dd4e3._0x5e986a),{'index':_0x4be16b,'available':this['pageList'][_0x270ea3(0x1a5)]});this[_0x270ea3(_0x3dd4e3._0x2660ef)][_0x270ea3(0x141)](_0x4be16b,0x1);}async[_0x36c638(0x15e)](_0x577c7d){const _0xfd4911={_0x34ce2b:0x1a5,_0x38d8a0:0x158},_0x2eb6f9=_0x36c638;this[_0x2eb6f9(0x1ae)]('enterFrame',[_0x577c7d]);if(!_0x577c7d[_0x2eb6f9(0x17c)][_0x2eb6f9(_0xfd4911._0x34ce2b)])throw new LocatorError('enterFrame\x20called\x20with\x20empty\x20locator',{'locator':_0x577c7d});this[_0x2eb6f9(0x1b0)][_0x2eb6f9(_0xfd4911._0x38d8a0)](_0x577c7d);}async['exitFrame'](){const _0x16c43d={_0x427376:0x1ae,_0x47c119:0x162,_0x21b448:0x1a8},_0x504f32=_0x36c638;this[_0x504f32(_0x16c43d._0x427376)](_0x504f32(_0x16c43d._0x47c119),[]);if(this[_0x504f32(0x1b0)]['length']===0x0)throw new DriverError('exitFrame\x20called\x20with\x20no\x20frame\x20on\x20the\x20stack',{});this[_0x504f32(0x1b0)][_0x504f32(_0x16c43d._0x21b448)]();}async[_0x36c638(0x1b2)](_0x1efa16,_0xf23c06){const _0x1a02d8={_0x398898:0x1ae},_0x5889a9=_0x36c638;this[_0x5889a9(_0x1a02d8._0x398898)](_0x5889a9(0x1b2),[_0x1efa16,_0xf23c06]),this[_0x5889a9(0x198)][_0x1efa16]=_0xf23c06;}async[_0x36c638(0x188)](_0x42c7da){const _0x29b5f7={_0x552855:0x188,_0x528983:0x198},_0x18f389=_0x36c638;return this[_0x18f389(0x1ae)](_0x18f389(_0x29b5f7._0x552855),[_0x42c7da]),this[_0x18f389(_0x29b5f7._0x528983)][_0x42c7da]??null;}async['setCookie'](_0x117ef0,_0x44010b,_0x30f9bf){const _0x3156a8={_0x40df95:0x1aa},_0x31b2a2=_0x36c638;this[_0x31b2a2(0x1ae)](_0x31b2a2(0x16c),[_0x117ef0,_0x44010b,_0x30f9bf]),this[_0x31b2a2(_0x3156a8._0x40df95)][_0x117ef0]=_0x44010b;}async[_0x36c638(0x170)](_0x575dfb){const _0x579d48={_0xf68eba:0x1ae,_0x30d947:0x170,_0x20310f:0x1aa},_0x201cab=_0x36c638;return this[_0x201cab(_0x579d48._0xf68eba)](_0x201cab(_0x579d48._0x30d947),[_0x575dfb]),this[_0x201cab(_0x579d48._0x20310f)][_0x575dfb]??null;}async['saveStorageState'](_0x32bd17){const _0x3365cc={_0x1fbc9a:0x1ae,_0x394682:0x187},_0xfee9c9=_0x36c638;this[_0xfee9c9(_0x3365cc._0x1fbc9a)](_0xfee9c9(_0x3365cc._0x394682),[_0x32bd17]);}async[_0x36c638(0x195)](_0x4d858d){const _0x505317=_0x36c638;return this[_0x505317(0x1ae)](_0x505317(0x195),[_0x4d858d]),void 0x0;}async[_0x36c638(0x15d)](){const _0xdf473a={_0x3401d2:0x1ae},_0x58011b=_0x36c638;this[_0x58011b(_0xdf473a._0x3401d2)]('close',[]);}[_0x36c638(0x171)](){const _0xa74616={_0x165e5b:0x1b0},_0x43e345=_0x36c638;return this[_0x43e345(_0xa74616._0x165e5b)][_0x43e345(0x1a5)];}},FakeWebDriver=class{constructor(_0xbedb01={}){const _0x5ef28e={_0x28e4b6:0x14c},_0x6d3de7=_0x36c638;this[_0x6d3de7(_0x5ef28e._0x28e4b6)]=_0xbedb01,this[_0x6d3de7(0x16f)]=createRecorder();}[_0x36c638(0x14c)];static{__name(this,'FakeWebDriver');}[_0x36c638(0x182)]=![];[_0x36c638(0x16f)];[_0x36c638(0x14e)]=[];async[_0x36c638(0x18e)](_0x3c419c){const _0x3d4634={_0xc08c23:0x15b},_0x697f0a=_0x36c638;this[_0x697f0a(0x16f)][_0x697f0a(0x158)]({'scope':_0x697f0a(_0x3d4634._0xc08c23),'method':_0x697f0a(0x18e),'args':[_0x3c419c]}),this[_0x697f0a(0x182)]=!![];}async[_0x36c638(0x1a6)](_0x35d4be){const _0x50ecb2={_0x4dfedf:0x1a6,_0x904437:0x194,_0x51a7ea:0x16f,_0x1375e4:0x1a5},_0x49fbc0=_0x36c638;this['recorder'][_0x49fbc0(0x158)]({'scope':_0x49fbc0(0x15b),'method':_0x49fbc0(_0x50ecb2._0x4dfedf),'args':[_0x35d4be]});if(!this['launched'])throw new DriverError(_0x49fbc0(_0x50ecb2._0x904437),{});const _0x4057db=new FakeContext(this[_0x49fbc0(_0x50ecb2._0x51a7ea)],this[_0x49fbc0(0x14c)],'ctx'+this['contexts'][_0x49fbc0(_0x50ecb2._0x1375e4)]);return this[_0x49fbc0(0x14e)]['push'](_0x4057db),_0x4057db;}async[_0x36c638(0x15d)](){const _0x4d8198={_0x51be77:0x182},_0x211d53=_0x36c638;this[_0x211d53(0x16f)][_0x211d53(0x158)]({'scope':_0x211d53(0x15b),'method':'close','args':[]}),this[_0x211d53(_0x4d8198._0x51be77)]=![];}[_0x36c638(0x1a7)](){return void 0x0;}async['connectShared'](){const _0x47320e={_0x46d810:0x17e},_0x1513f9=_0x36c638;throw new DriverError(_0x1513f9(_0x47320e._0x46d810),{});}[_0x36c638(0x193)](_0x370cad){const _0x3b1354=_0x36c638;throw new DriverError(_0x3b1354(0x189),{});}[_0x36c638(0x180)](){const _0x56b513={_0x3d6edb:0x180},_0xd7c8d1=_0x36c638;return this['recorder'][_0xd7c8d1(_0x56b513._0x3d6edb)]();}[_0x36c638(0x17b)](_0x335696){const _0x18351f=_0x36c638;return this[_0x18351f(0x16f)][_0x18351f(0x180)]()['filter'](_0x28ae5b=>_0x28ae5b['method']===_0x335696);}};export{FakeWebDriver};
|
package/dist/dsl/index.d.ts
CHANGED
|
@@ -4,8 +4,8 @@ import { Matcher, RegexLiteral, JudgeRequest, JudgeVerdict, SoftFailureRecord }
|
|
|
4
4
|
import { ExecutionWalker, ExecutionEvent, RunResult, RunOptions } from '@unotest/dsl/executor';
|
|
5
5
|
export { ExecutionError, ExecutionEvent, RunOptions, RunResult } from '@unotest/dsl/executor';
|
|
6
6
|
import { SandboxConfig } from '../config/schema.js';
|
|
7
|
-
import { RuntimeExecState } from '@unotest/core';
|
|
8
|
-
export { L as LintDiagnostic, b as LintOptions, a as LintSeverity, l as lintAst } from '../linter-
|
|
7
|
+
import { UnotestError, RuntimeExecState } from '@unotest/core';
|
|
8
|
+
export { L as LintDiagnostic, b as LintOptions, a as LintSeverity, l as lintAst } from '../linter-BWSAYBQy.js';
|
|
9
9
|
import 'zod';
|
|
10
10
|
import '@unotest/dsl';
|
|
11
11
|
|
|
@@ -69,6 +69,50 @@ declare function chainGetByTitle(loc: LocatorValue, text: Matcher, options?: {
|
|
|
69
69
|
exact?: boolean;
|
|
70
70
|
}): LocatorValue;
|
|
71
71
|
|
|
72
|
+
/** Configuration invalid or missing. Surfaces during config load / validation. */
|
|
73
|
+
declare class ConfigError extends UnotestError {
|
|
74
|
+
}
|
|
75
|
+
/** A host the run would reach came from the BASE `.env` while a named
|
|
76
|
+
* environment is active (#199). Silence here is the whole defect: the
|
|
77
|
+
* overlay says "dev", the request goes to the production host the base
|
|
78
|
+
* file names, and nothing in the output says which host was used. The
|
|
79
|
+
* message names the variable, BOTH files, and the two ways out. */
|
|
80
|
+
declare class EnvOverlayHostError extends ConfigError {
|
|
81
|
+
constructor(context: {
|
|
82
|
+
name: string;
|
|
83
|
+
/** Where the name becomes a host, quoted as the author wrote it —
|
|
84
|
+
* `apiCall {base: "API_BASE_CHAT"}`, `goto(APP_URL)`, `baseUrl`. */
|
|
85
|
+
usage: string;
|
|
86
|
+
envName: string;
|
|
87
|
+
/** Project-relative file the value actually came from. */
|
|
88
|
+
baseFile: string;
|
|
89
|
+
/** The overlay that does NOT set it — where it belongs. */
|
|
90
|
+
overlayFile: string;
|
|
91
|
+
});
|
|
92
|
+
}
|
|
93
|
+
|
|
94
|
+
/**
|
|
95
|
+
* What a host-using call site may ask. A narrow port (ISP) so the linter
|
|
96
|
+
* and the DSL runtime depend on the QUESTION, not on the config layer:
|
|
97
|
+
* `rejectAsHost` answers with the refusal message, or undefined when the
|
|
98
|
+
* name is fine to use as a host here.
|
|
99
|
+
*/
|
|
100
|
+
interface HostVariableCheck {
|
|
101
|
+
rejectAsHost(name: string, usage: string): EnvOverlayHostError | undefined;
|
|
102
|
+
}
|
|
103
|
+
/** The policy as the places that switch environments need it: the same
|
|
104
|
+
* question, plus "the same rule, for a different environment". `forEnv`
|
|
105
|
+
* carries the config-derived `shared` list ACROSS, which is why the MCP
|
|
106
|
+
* server and the child it spawns cannot end up with different lists. */
|
|
107
|
+
interface HostPolicy extends HostVariableCheck {
|
|
108
|
+
forEnv(envName?: string): HostPolicy;
|
|
109
|
+
/** The base-URL variable is a host by construction — `APP_BASE_URL`
|
|
110
|
+
* becomes `config.baseUrl`, which every relative `goto` resolves
|
|
111
|
+
* against. Asked without naming it, so no consumer keeps a second
|
|
112
|
+
* literal of the name. */
|
|
113
|
+
rejectBaseUrl(usage: string): EnvOverlayHostError | undefined;
|
|
114
|
+
}
|
|
115
|
+
|
|
72
116
|
interface Logger {
|
|
73
117
|
info(msg: string, ...rest: unknown[]): void;
|
|
74
118
|
warn(msg: string, ...rest: unknown[]): void;
|
|
@@ -82,6 +126,12 @@ interface Logger {
|
|
|
82
126
|
interface VariableStore {
|
|
83
127
|
has(name: string): boolean;
|
|
84
128
|
get(name: string): string | undefined;
|
|
129
|
+
/** Host policy for the environment this store resolves against (#199).
|
|
130
|
+
* Optional like `describeSources`: a store built without a project
|
|
131
|
+
* behind it (test fakes, ad-hoc runtimes) carries none and the rule is
|
|
132
|
+
* then off. `withHostPolicy` (config/env-host-guard.ts) is what puts
|
|
133
|
+
* one on a store. */
|
|
134
|
+
hostPolicy?: HostPolicy;
|
|
85
135
|
/** One-line, human/agent-readable summary of WHERE lookups searched
|
|
86
136
|
* (active environment + layer files, missing ones flagged). Optional so
|
|
87
137
|
* test fakes stay two-method; consumed by "variable not found" errors. */
|
|
@@ -197,6 +247,11 @@ declare class TestRuntime {
|
|
|
197
247
|
enterCall(maxCallDepth: number): void;
|
|
198
248
|
exitCall(): void;
|
|
199
249
|
get callDepth(): number;
|
|
250
|
+
/** Host policy of this run — read off the variable store, which is
|
|
251
|
+
* where the project's environment already lives (#199). Deliberately
|
|
252
|
+
* NOT a separate injected field: a field the two runtime-building
|
|
253
|
+
* sites could forget to pass is a rule that switches itself off. */
|
|
254
|
+
get hostPolicy(): HostPolicy | undefined;
|
|
200
255
|
setVar(name: string, value: DslValue): void;
|
|
201
256
|
getVar(name: string): DslValue;
|
|
202
257
|
hasVar(name: string): boolean;
|
|
@@ -289,6 +344,8 @@ interface ActiveRuntime {
|
|
|
289
344
|
createdAt: number;
|
|
290
345
|
/** Active TTL timer (only when state is paused-failure). */
|
|
291
346
|
ttlTimer: NodeJS.Timeout | null;
|
|
347
|
+
/** The runtime's own last-rites hook — see `register`. */
|
|
348
|
+
onAbort?: () => Promise<void>;
|
|
292
349
|
}
|
|
293
350
|
interface RuntimeSummary {
|
|
294
351
|
id: string;
|
|
@@ -336,6 +393,13 @@ declare class TestRuntimeManager {
|
|
|
336
393
|
testRuntime: TestRuntime;
|
|
337
394
|
generator: AsyncGenerator<ExecutionEvent, RunResult>;
|
|
338
395
|
runOptions: RunOptions;
|
|
396
|
+
/** Last thing this runtime gets to do when it is aborted, awaited
|
|
397
|
+
* inside `abort()`. It exists because an abort on a PAUSE never comes
|
|
398
|
+
* back through the orchestrator: the CLI kills the process right
|
|
399
|
+
* after `abort` resolves (a paused executor cannot unwind itself), so
|
|
400
|
+
* anything the run still owes the disk has to be settled here (#194
|
|
401
|
+
* tail). */
|
|
402
|
+
onAbort?: () => Promise<void>;
|
|
339
403
|
}): string;
|
|
340
404
|
pump(id: string): Promise<ExecutionEvent | RunResult>;
|
|
341
405
|
/** The run's verdict — the executor's own, corrected for the one thing
|