@unotest/web 0.10.0 → 0.12.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/.claude/skills/write-e2e-test/SKILL.md +11 -7
- package/.claude/skills/write-e2e-test-ground/SKILL.md +11 -7
- package/CHANGELOG.md +198 -0
- package/dist/config/schema.d.ts +55 -21
- package/dist/config/schema.js +1 -1
- package/dist/driver/index.d.ts +4 -2
- package/dist/driver/index.js +1 -1
- package/dist/dsl/index.d.ts +13 -2
- package/dist/dsl/index.js +1 -1
- package/dist/dsl/web-dsl-language-service.js +1 -1
- package/dist/inspection/page-inject.d.ts +1 -1
- package/dist/{interfaces-BxviHxnr.d.ts → interfaces-XvuefHHC.d.ts} +13 -0
- package/dist/mcp/server.js +1 -1
- package/dist/runner/cli.d.ts +11 -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 +24 -0
- package/guides/dsl-reference.md +166 -20
- package/package.json +7 -44
- package/src/mcp/prompts/agent-test-author.md +12 -3
package/dist/driver/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const _0x442b96=_0x1ca0;function _0x1ca0(_0x4c67ac,_0xf4652e){_0x4c67ac=_0x4c67ac-0x9a;const _0x4293ca=_0x4293();let _0x1ca095=_0x4293ca[_0x4c67ac];if(_0x1ca0['oaAEoG']===undefined){var _0x2b836e=function(_0x15d77b){const _0x38ab5d='abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+/=';let _0x548e83='',_0x3c0340='';for(let _0x3950d8=0x0,_0xbbaf3c,_0x52dacf,_0x16f176=0x0;_0x52dacf=_0x15d77b['charAt'](_0x16f176++);~_0x52dacf&&(_0xbbaf3c=_0x3950d8%0x4?_0xbbaf3c*0x40+_0x52dacf:_0x52dacf,_0x3950d8++%0x4)?_0x548e83+=String['fromCharCode'](0xff&_0xbbaf3c>>(-0x2*_0x3950d8&0x6)):0x0){_0x52dacf=_0x38ab5d['indexOf'](_0x52dacf);}for(let _0x3d9fc2=0x0,_0x41df41=_0x548e83['length'];_0x3d9fc2<_0x41df41;_0x3d9fc2++){_0x3c0340+='%'+('00'+_0x548e83['charCodeAt'](_0x3d9fc2)['toString'](0x10))['slice'](-0x2);}return decodeURIComponent(_0x3c0340);};_0x1ca0['cUKaDl']=_0x2b836e,_0x1ca0['YJBGVf']={},_0x1ca0['oaAEoG']=!![];}const _0x572062=_0x4293ca[0x0],_0x5af799=_0x4c67ac+_0x572062,_0x49e0e2=_0x1ca0['YJBGVf'][_0x5af799];return!_0x49e0e2?(_0x1ca095=_0x1ca0['cUKaDl'](_0x1ca095),_0x1ca0['YJBGVf'][_0x5af799]=_0x1ca095):_0x1ca095=_0x49e0e2,_0x1ca095;}(function(_0x4cac83,_0x3a3398){const _0x1f8176={_0x276f79:0xb5,_0x35bb1b:0xe2,_0x2888b3:0xa7},_0x476a80=_0x1ca0,_0x136243=_0x4cac83();while(!![]){try{const _0x469d31=-parseInt(_0x476a80(0xab))/0x1*(-parseInt(_0x476a80(_0x1f8176._0x276f79))/0x2)+parseInt(_0x476a80(0x100))/0x3+parseInt(_0x476a80(0xe4))/0x4*(parseInt(_0x476a80(_0x1f8176._0x35bb1b))/0x5)+-parseInt(_0x476a80(_0x1f8176._0x2888b3))/0x6+parseInt(_0x476a80(0xe1))/0x7+parseInt(_0x476a80(0xcb))/0x8*(-parseInt(_0x476a80(0x9b))/0x9)+parseInt(_0x476a80(0xf9))/0xa;if(_0x469d31===_0x3a3398)break;else _0x136243['push'](_0x136243['shift']());}catch(_0x98c45){_0x136243['push'](_0x136243['shift']());}}}(_0x4293,0xbad03));var __defProp=Object[_0x442b96(0xff)],__name=(_0x548e83,_0x3c0340)=>__defProp(_0x548e83,'name',{'value':_0x3c0340,'configurable':!![]});function subscribe(_0x3950d8,_0xbbaf3c){return _0x3950d8['add'](_0xbbaf3c),()=>{_0x3950d8['delete'](_0xbbaf3c);};}__name(subscribe,_0x442b96(0xf5));var UnotestError=class extends Error{static{__name(this,'UnotestError');}[_0x442b96(0xb3)];constructor(_0x52dacf,_0x16f176={}){const _0x4ff5f4={_0x1fb49f:0xb3,_0x383792:0xb0},_0xc9b417=_0x442b96;super(_0x52dacf),this[_0xc9b417(0x10e)]=new.target.name,this[_0xc9b417(_0x4ff5f4._0x1fb49f)]=Object['freeze']({..._0x16f176}),typeof Error[_0xc9b417(_0x4ff5f4._0x383792)]===_0xc9b417(0xec)&&Error[_0xc9b417(_0x4ff5f4._0x383792)](this,new.target);}},DriverError=class extends UnotestError{static{__name(this,'DriverError');}},LocatorError=class extends UnotestError{static{__name(this,'LocatorError');}};function _0x4293(){const _0x193b16=['ywn0AxzLswr4','zw1PDezHA2vqB3b1Ca','zMLSDgvY','Cg9WDxbpBKnSAwnR','oteYnZq0meLbqKHpBW','C2nYzwvUC2HVDa','Bg9JywXtDg9YywDLu3rHDgu','zg91yMXLq2XPy2S','ntKWmdu2yLbyrxfA','BMv3q29UDgv4Da','CMvJB3jK','zxzHBhvHDgvpBKXVy2f0B3i','y3vYCMvUDfvYBa','y2fWDhvYzvn0ywnRvhjHy2u','y2fSBhm','zxjYB3jpBK5LEhrby3rPB24','y29UDgv4Da','Dgv4DenVBNrLBNrcEurLzMf1Bhq','nhjIu2zPsq','BgvUz3rO','C2v0qwn0AxzLugfNzq','y29UBMvJDfnOyxjLza','BM8Gywn0AxzLihbHz2uGAw4Gy29UDgv4Da','CMvM','Bgf1BMnOzwq','ywn0AxzLugfNzq','y29VA2LLCW','Aw5ZCgvJDevSzw1LBNq','y2XVC2u','zNjVBq','BMv3ugfNzuXPC3rLBMvYCW','z29cywnR','CgfNzxm','ChjLC3m','DgL0Bgu','CMvJB3jKzxi','D2fPDezVCG','ChvZAa','z29gB3j3yxjK','CgfNzsbPBMrLEcbVDxqGB2yGCMfUz2u','mtiWEgXVywXJ','Dgv4DenVBNrLBNq','zhjPDMvY','y291BNrcEurLzMf1Bhq','Bgf1BMnO','Aw5WDxrwywX1zq','zxHPDezYyw1LignHBgXLzcb3AxrOig5VigzYyw1Lig9UihrOzsbZDgfJAW','A2LUza','y3r4','pgrPDIbKyxrHlxvUB3rLC3qTCMvMpsi','DxjS','Cg9W','zw50zxjgCMfTzsbJywXSzwqGD2L0AcbLBxb0EsbSB2nHDg9Y','lNbHz2u','y2XPy2S','z290BW','y29UBMvJDfnOyxjLzcbUB3qGC3vWCg9YDgvKigj5iezHA2vxzwjeCML2zxi','Ag92zxi','z2v0tg9JywXtDg9YywDL','Dw5JAgvJAW','BMv3q29UDgv4DcbJywXSzwqGyMvMB3jLigXHDw5JAcGP','C2v0tg9JywXtDg9YywDL','mtC3mtiZogHsD01JBG','mtGZndCZnvL3wfLXAq','C2v0q29VA2LL','mtjUzvvtBe4','BMv0D29YA0vUDhjPzxm','Aw5PDgLHBfvYBa','B3v0zxjive1m','C2nYB2XSsw50B1zPzxC','zxHPDezYyw1L','DxbSB2fKrMLSzq','D2fPDezVCK5HDMLNyxrPB24','zNvUy3rPB24','rMfRzvDLyKrYAxzLCG','y2HLy2TLzfn0yxrL','yxr0ywnOrxHPC3rPBMCGBM90ihn1ChbVCNrLzcbIEsbgywTLv2vIrhjPDMvY','pgrPDJ48l2rPDJ4','C3rLChm','y29UC29SzuvUDhjPzxm','zwXLBwvUDeHPBNrcEvjLzG','y2fSBhngB3i','C3vIC2nYAwjL','C2vSzwn0t3b0Aw9U','z2v0q29VA2LL','rMfRzvbHz2u','mJu4mtGZmezQEKDMsa','C2nVCgu','D2fPDezVCLvYBa','Bwf5yMvuAhjVDW','CgfNzuXPC3q','zNjHBwvezxb0Aa','zgvMAw5LuhjVCgvYDhK','mJK5ntqXnKTNA1nvEq','y2HLy2TLzfn0yxrLqNLezwzHDwX0','zNjHBwvtDgfJAW','z2v0qxr0CMLIDxrL','y2HLy2S','y29UDgv4Dhm','zxzHBhvHDgu','B25ozxDqywDL','zw50zxjgCMfTzq','y291BNq','zMLSBa','AxnwAxnPyMXL','D2fPDezVCLrLEhq','CMvSB2fK','BMfTzq','B25bzNrLCKnSAwnR','otaYnti5venOuxvl','y2XPCgjVyxjKugfZDgu','C3bSAwnL','y29VA2LLu3rHDgu','Bwv0Ag9K','zhjHz0fUzerYB3a','yMvOyxzPB3i','ywjVDxq6yMXHBMS'];_0x4293=function(){return _0x193b16;};return _0x4293();}function createRecorder(){const _0x42bbbc={_0x157d95:0xc8,_0x58ae6d:0xb1},_0x4dfcc6=_0x442b96,_0x3d9fc2=[];let _0x41df41=0x0;return{'push':__name(_0x2b2ccf=>_0x3d9fc2[_0x4dfcc6(0xc8)]({..._0x2b2ccf,'seq':_0x41df41++}),_0x4dfcc6(_0x42bbbc._0x157d95)),'calls':__name(()=>_0x3d9fc2,_0x4dfcc6(_0x42bbbc._0x58ae6d))};}__name(createRecorder,'createRecorder');var FakePage=class{constructor(_0x337133,_0x5959ee,_0x11e08c,_0x6b17d8){const _0x4c0424=_0x442b96;this[_0x4c0424(0xc6)]=_0x337133,this['behavior']=_0x5959ee,this['scope']=_0x11e08c,this[_0x4c0424(0xaf)]=_0x6b17d8;}[_0x442b96(0xc6)];[_0x442b96(0xa1)];['scope'];static{__name(this,_0x442b96(0xf8));}['currentUrl'];[_0x442b96(0x9a)];[_0x442b96(0xad)](_0x2ccb05,_0x16fb64){this['recorder']['push']({'scope':this['scope'],'method':_0x2ccb05,'args':_0x16fb64});}[_0x442b96(0xfc)](){const _0x4757bf={_0x3a5537:0xa1,_0x1751ad:0xb2},_0x5636ac=_0x442b96;if(this['behavior'][_0x5636ac(0xb2)]){const _0x15606b=this[_0x5636ac(_0x4757bf._0x3a5537)]['errorOnNextAction'];this[_0x5636ac(0xa1)][_0x5636ac(_0x4757bf._0x1751ad)]=void 0x0;throw _0x15606b;}}[_0x442b96(0xd5)](){return this['currentUrl'];}async['title'](){const _0x2c6740={_0x4104e3:0xc5},_0x55ee46=_0x442b96;return this['record'](_0x55ee46(_0x2c6740._0x4104e3),[]),'fake\x20title';}async[_0x442b96(0xd9)](_0x982d91,_0x595535){const _0x223ca6={_0x12e34a:0xad},_0x12fcc2=_0x442b96;this[_0x12fcc2(_0x223ca6._0x12e34a)](_0x12fcc2(0xd9),[_0x982d91,_0x595535]),this[_0x12fcc2(0xfc)](),this['onAfterClick']?.();}async[_0x442b96(0xaa)](_0x3a7bc3,_0x11988c){const _0x137570=_0x442b96;this[_0x137570(0xad)]('doubleClick',[_0x3a7bc3,_0x11988c]),this['maybeThrow']();}async[_0x442b96(0x10a)](_0xd0dfef,_0x5733c1,_0x1adfce){const _0x127b6a=_0x442b96;this[_0x127b6a(0xad)](_0x127b6a(0x10a),[_0xd0dfef,_0x5733c1,_0x1adfce]),this[_0x127b6a(0xfc)]();}async[_0x442b96(0xc4)](_0x437bac,_0x455b8b,_0x37caf0){const _0x5d5cc6={_0x7597c8:0xc4,_0xd7413e:0xfc},_0x1f9a92=_0x442b96;this[_0x1f9a92(0xad)](_0x1f9a92(_0x5d5cc6._0x7597c8),[_0x437bac,_0x455b8b,_0x37caf0]),this[_0x1f9a92(_0x5d5cc6._0xd7413e)]();}async[_0x442b96(0x104)](_0x4cdd8c,_0x527f6c){const _0x2fd57f={_0x49635e:0x104},_0x63ad2c=_0x442b96;this[_0x63ad2c(0xad)](_0x63ad2c(_0x2fd57f._0x49635e),[_0x4cdd8c,_0x527f6c]),this['maybeThrow']();}async['uncheck'](_0x27b900,_0x3b3f73){const _0x1a416={_0x143eeb:0xde},_0x2f0bd0=_0x442b96;this['record'](_0x2f0bd0(_0x1a416._0x143eeb),[_0x27b900,_0x3b3f73]),this[_0x2f0bd0(0xfc)]();}async[_0x442b96(0xf6)](_0x1da901,_0x20b266,_0x5c322c){const _0x4dd22b=_0x442b96;this['record'](_0x4dd22b(0xf6),[_0x1da901,_0x20b266,_0x5c322c]),this['maybeThrow']();}async['hover'](_0x4982cc,_0x574e61){const _0x2513b3={_0x34c26a:0xdc},_0x450c8d=_0x442b96;this[_0x450c8d(0xad)](_0x450c8d(_0x2513b3._0x34c26a),[_0x4982cc,_0x574e61]),this[_0x450c8d(0xfc)]();}async[_0x442b96(0xe8)](_0x654da6){const _0x3ccca9={_0x10e92a:0xad},_0x5e69a8=_0x442b96;this[_0x5e69a8(_0x3ccca9._0x10e92a)](_0x5e69a8(0xe8),[_0x654da6]),this['maybeThrow']();}async['dragAndDrop'](_0x5a0b0d,_0x7f58c1,_0x24c545){const _0x1778d7={_0x4eef09:0xad},_0x41179a=_0x442b96;this[_0x41179a(_0x1778d7._0x4eef09)](_0x41179a(0xa0),[_0x5a0b0d,_0x7f58c1,_0x24c545]),this[_0x41179a(0xfc)]();}async['uploadFile'](_0x41da81,_0x32669d){const _0x441ce7={_0x4a7528:0xad,_0x45a8f7:0xea,_0x1441f1:0xfc},_0x5eb79c=_0x442b96;this[_0x5eb79c(_0x441ce7._0x4a7528)](_0x5eb79c(_0x441ce7._0x45a8f7),[_0x41da81,_0x32669d]),this[_0x5eb79c(_0x441ce7._0x1441f1)]();}async[_0x442b96(0x9c)](_0x275c4d,_0x35434e){const _0x36df49={_0x32fb5c:0xad},_0x47557e=_0x442b96;this[_0x47557e(_0x36df49._0x32fb5c)](_0x47557e(0x9c),[_0x275c4d,_0x35434e]),this[_0x47557e(0xfc)]();}async[_0x442b96(0x109)](_0x2f6a47){const _0x4103fd={_0x7a13e8:0xce},_0x38107f=_0x442b96;return this[_0x38107f(0xad)]('count',[_0x2f6a47]),this[_0x38107f(0xa1)][_0x38107f(_0x4103fd._0x7a13e8)]??0x1;}async[_0x442b96(0xcc)](_0x2ed2){const _0x5be3ce={_0x4c4551:0xad,_0x536b36:0xcc,_0x13cdae:0xa1,_0x1670d1:0xb4},_0x1f5fab=_0x442b96;return this[_0x1f5fab(_0x5be3ce._0x4c4551)](_0x1f5fab(_0x5be3ce._0x536b36),[_0x2ed2]),this[_0x1f5fab(_0x5be3ce._0x13cdae)][_0x1f5fab(_0x5be3ce._0x1670d1)]??'';}async[_0x442b96(0xd0)](_0x5669dd){const _0x4fd2d9={_0x1a1711:0xa1},_0x1b174a=_0x442b96;return this['record'](_0x1b174a(0xd0),[_0x5669dd]),this[_0x1b174a(_0x4fd2d9._0x1a1711)]['inputValueByDefault']??'';}async[_0x442b96(0xee)](_0x2fb0db){const _0x360cf2={_0x3c44cc:0xee},_0xf6e2db=_0x442b96;return this[_0xf6e2db(0xad)](_0xf6e2db(_0x360cf2._0x3c44cc),[_0x2fb0db]),this['behavior'][_0xf6e2db(0x101)]??null;}async['isVisible'](_0x27009d){const _0x25f355=_0x442b96;return this['record'](_0x25f355(0x10b),[_0x27009d]),this['behavior']['isVisibleByDefault']??!![];}async[_0x442b96(0x103)](_0x17fe83,_0x49e651){const _0x3fe916={_0x319aa9:0xa1},_0x426b34=_0x442b96;return this['record'](_0x426b34(0x103),[_0x17fe83,_0x49e651]),this[_0x426b34(_0x3fe916._0x319aa9)]['attributesByDefault']?.[_0x49e651]??null;}async[_0x442b96(0xc7)](_0x3cd8e2,_0x49a353){const _0x4676f7=_0x442b96;this[_0x4676f7(0xad)]('waitFor',[_0x3cd8e2,_0x49a353]);}async[_0x442b96(0xfb)](_0x4a5f77,_0x5a23bb){const _0x5ac838={_0x4d2117:0xfb},_0x3e6397=_0x442b96;this['record'](_0x3e6397(_0x5ac838._0x4d2117),[_0x4a5f77,_0x5a23bb]);}async[_0x442b96(0x10c)](_0x35b9f7,_0x4e2ba6){const _0x5dd6eb={_0x532f69:0x10c},_0x1173b9=_0x442b96;this[_0x1173b9(0xad)](_0x1173b9(_0x5dd6eb._0x532f69),[_0x35b9f7,_0x4e2ba6]);}async[_0x442b96(0xeb)](_0x224e30){const _0x5b0227=_0x442b96;this[_0x5b0227(0xad)](_0x5b0227(0xeb),[_0x224e30]);}async[_0x442b96(0xda)](_0x369079,_0x106896){this['record']('goto',[_0x369079,_0x106896]),this['currentUrl']=_0x369079;}async['reload'](_0x5488d4){const _0x4d94b6={_0x537847:0xad},_0x528d50=_0x442b96;this[_0x528d50(_0x4d94b6._0x537847)](_0x528d50(0x10d),[_0x5488d4]);}async[_0x442b96(0xc2)](_0x4f6dc1){const _0x3fb08b={_0x139dc6:0xc2},_0xc46f5f=_0x442b96;this[_0xc46f5f(0xad)](_0xc46f5f(_0x3fb08b._0x139dc6),[_0x4f6dc1]);}async['goForward'](_0x523861){const _0x495e43={_0x18fec4:0xc9},_0x313078=_0x442b96;this[_0x313078(0xad)](_0x313078(_0x495e43._0x18fec4),[_0x523861]);}async[_0x442b96(0x106)](_0x3daaf7){const _0x806ecb={_0x599e89:0xad},_0x253501=_0x442b96;return this[_0x253501(_0x806ecb._0x599e89)]('evaluate',[_0x3daaf7]),void 0x0;}async[_0x442b96(0xae)](_0x3d223e,_0x4eb7e9){const _0x52dcd2=_0x442b96;return this[_0x52dcd2(0xad)](_0x52dcd2(0xae),[_0x3d223e,_0x4eb7e9]),void 0x0;}async[_0x442b96(0xbe)](_0x3d8321){const _0x6f89f6={_0x29a8a3:0xbe,_0x2ac812:0xf1,_0x2f64fb:0xba,_0x3b76dd:0xf3},_0x3273ee=_0x442b96;this[_0x3273ee(0xad)](_0x3273ee(_0x6f89f6._0x29a8a3),[_0x3d8321]);if(_0x3d8321[_0x3273ee(0xf1)][_0x3273ee(0xb6)]!==0x1||_0x3d8321[_0x3273ee(_0x6f89f6._0x2ac812)][0x0][_0x3273ee(0xd2)]!==_0x3273ee(_0x6f89f6._0x2f64fb))return null;const _0x193d59=_0x3d8321[_0x3273ee(0xf1)][0x0][_0x3273ee(0xba)],_0x3ecf5f=this['behavior'][_0x3273ee(_0x6f89f6._0x3b76dd)]?.[_0x193d59];return _0x3ecf5f??null;}async[_0x442b96(0xa8)](_0x38d712){const _0x22b570={_0x490888:0xad,_0x509d43:0xc0},_0x57a71d=_0x442b96;return this[_0x57a71d(_0x22b570._0x490888)]('screenshot',[_0x38d712]),Buffer[_0x57a71d(_0x22b570._0x509d43)]('fake-png');}async['outerHTML'](_0x1d2a39){const _0x39abd8={_0x30353f:0xe7,_0x4a3196:0xf1,_0xf6647:0xb6,_0x454dd7:0xd2,_0x436af9:0xf1,_0x1d1f3c:0xd4,_0x4891f3:0xf0},_0x532fbd=_0x442b96;this[_0x532fbd(0xad)](_0x532fbd(_0x39abd8._0x30353f),[_0x1d2a39]);if(_0x1d2a39[_0x532fbd(_0x39abd8._0x4a3196)][_0x532fbd(_0x39abd8._0xf6647)]===0x1&&_0x1d2a39[_0x532fbd(_0x39abd8._0x4a3196)][0x0][_0x532fbd(_0x39abd8._0x454dd7)]==='ref'){const _0x18a26a=_0x1d2a39[_0x532fbd(_0x39abd8._0x436af9)][0x0][_0x532fbd(0xba)];return this['behavior']['outerHtmlByRef']?.[_0x18a26a]??_0x532fbd(_0x39abd8._0x1d1f3c)+_0x18a26a+'\x22></div>';}return _0x532fbd(_0x39abd8._0x4891f3);}},FakeContext=class{constructor(_0x2969b8,_0x199975,_0xb5316a){const _0x4d69e0={_0xb91334:0xfa,_0x2c0aa7:0x9e,_0x4a62a5:0xbd},_0x2377e2={_0xbb6b99:0xa4,_0x4f7a17:0xa6},_0x46717e=_0x442b96;this['recorder']=_0x2969b8,this['behavior']=_0x199975,this[_0x46717e(_0x4d69e0._0xb91334)]=_0xb5316a;const _0x3ba0a6=new FakePage(_0x2969b8,_0x199975,_0xb5316a+'.page0',_0x199975[_0x46717e(0xe6)]??_0x46717e(0xa2));_0x199975[_0x46717e(0xa6)]&&(_0x3ba0a6['onAfterClick']=()=>{const _0x3dda51=_0x46717e;this[_0x3dda51(_0x2377e2._0xbb6b99)](_0x199975[_0x3dda51(_0x2377e2._0x4f7a17)]);}),this['pageList']=[_0x3ba0a6],this[_0x46717e(0xa9)]={..._0x199975['localStorage']??{}},this[_0x46717e(_0x4d69e0._0x2c0aa7)]={..._0x199975[_0x46717e(_0x4d69e0._0x4a62a5)]??{}};}[_0x442b96(0xc6)];[_0x442b96(0xa1)];[_0x442b96(0xfa)];static{__name(this,'FakeContext');}[_0x442b96(0xfd)];[_0x442b96(0xa3)]=0x0;[_0x442b96(0x102)]=[];['localStorageState'];[_0x442b96(0x9e)];['newPageListeners']=new Set();[_0x442b96(0xad)](_0x289687,_0x30a23f){const _0xa6f363={_0x3e50c7:0xc8},_0x5a8303=_0x442b96;this[_0x5a8303(0xc6)][_0x5a8303(_0xa6f363._0x3e50c7)]({'scope':this[_0x5a8303(0xfa)],'method':_0x289687,'args':_0x30a23f});}[_0x442b96(0xc3)](){const _0x2adea5={_0x39a73c:0xfd},_0x4f9727=_0x442b96;return this[_0x4f9727(_0x2adea5._0x39a73c)];}[_0x442b96(0xbc)](){const _0x54df14={_0x25abd1:0xfd},_0x3bb225=_0x442b96,_0x2cdaae=this[_0x3bb225(_0x54df14._0x25abd1)][this['activeIdx']];if(!_0x2cdaae)throw new DriverError(_0x3bb225(0xb9),{'activeIdx':this[_0x3bb225(0xa3)]});return _0x2cdaae;}[_0x442b96(0xf2)](){return this['behavior']['consoleEntries']??[];}['networkEntries'](){const _0x4264aa={_0x2954e4:0xe5},_0x2fbe57=_0x442b96;return this[_0x2fbe57(0xa1)][_0x2fbe57(_0x4264aa._0x2954e4)]??[];}async['setActivePage'](_0x49d6bf){const _0x127f54={_0x4418e7:0xfd},_0x264e09=_0x442b96;this['record'](_0x264e09(0xb7),[_0x49d6bf]);if(_0x49d6bf<0x0||_0x49d6bf>=this[_0x264e09(_0x127f54._0x4418e7)][_0x264e09(0xb6)])throw new DriverError(_0x264e09(0xca),{'index':_0x49d6bf,'available':this['pageList']['length']});this[_0x264e09(0xa3)]=_0x49d6bf,this[_0x264e09(0x102)][_0x264e09(0xb6)]=0x0;}[_0x442b96(0x107)](_0x19e550){const _0x49dce1={_0x3c8dce:0xc1},_0x4d4e28=_0x442b96;return subscribe(this[_0x4d4e28(_0x49dce1._0x3c8dce)],_0x19e550);}[_0x442b96(0xa4)](_0x203f2a){const _0x5e5020={_0xe3e221:0xfa,_0x11662a:0xfd,_0x369247:0xc6,_0x206c88:0xa1},_0x1ce683=_0x442b96,_0x3be129=this[_0x1ce683(_0x5e5020._0xe3e221)]+_0x1ce683(0xd8)+this[_0x1ce683(_0x5e5020._0x11662a)]['length'],_0x3db6b6=new FakePage(this[_0x1ce683(_0x5e5020._0x369247)],this[_0x1ce683(_0x5e5020._0x206c88)],_0x3be129,_0x203f2a);this[_0x1ce683(0xfd)][_0x1ce683(0xc8)](_0x3db6b6);const _0x542868=this[_0x1ce683(0xfd)][_0x1ce683(0xb6)]-0x1;for(const _0x56dff4 of this['newPageListeners']){try{_0x56dff4({'index':_0x542868,'url':_0x203f2a});}catch{}}return _0x542868;}['closeFakePage'](_0x3f1eb0){const _0x4ea336={_0x4ea873:0xfd,_0x562ec3:0xfd},_0x7b73b9=_0x442b96;if(_0x3f1eb0<0x0||_0x3f1eb0>=this[_0x7b73b9(0xfd)][_0x7b73b9(0xb6)])throw new DriverError(_0x7b73b9(0xca),{'index':_0x3f1eb0,'available':this[_0x7b73b9(_0x4ea336._0x4ea873)][_0x7b73b9(0xb6)]});this[_0x7b73b9(_0x4ea336._0x562ec3)][_0x7b73b9(0x9d)](_0x3f1eb0,0x1);}async[_0x442b96(0x108)](_0xf5c29a){const _0x5eefcd={_0x444db4:0xad,_0x39c238:0x108,_0x53aa06:0xf1,_0x2e8f1c:0xb6,_0x3cbaec:0x102},_0x67f5fe=_0x442b96;this[_0x67f5fe(_0x5eefcd._0x444db4)](_0x67f5fe(_0x5eefcd._0x39c238),[_0xf5c29a]);if(!_0xf5c29a[_0x67f5fe(_0x5eefcd._0x53aa06)][_0x67f5fe(_0x5eefcd._0x2e8f1c)])throw new LocatorError(_0x67f5fe(0xd7),{'locator':_0xf5c29a});this[_0x67f5fe(_0x5eefcd._0x3cbaec)]['push'](_0xf5c29a);}async['exitFrame'](){const _0x420652={_0x3e0903:0xe9,_0x19f2a8:0x102},_0xa047c8=_0x442b96;this[_0xa047c8(0xad)](_0xa047c8(_0x420652._0x3e0903),[]);if(this[_0xa047c8(_0x420652._0x19f2a8)]['length']===0x0)throw new DriverError(_0xa047c8(0xd1),{});this['frameStack'][_0xa047c8(0xd6)]();}async['setLocalStorage'](_0x327218,_0x6c2f51){const _0xd1e745={_0x4466b5:0xa9},_0x1b7c19=_0x442b96;this[_0x1b7c19(0xad)](_0x1b7c19(0xe0),[_0x327218,_0x6c2f51]),this[_0x1b7c19(_0xd1e745._0x4466b5)][_0x327218]=_0x6c2f51;}async[_0x442b96(0xdd)](_0x2bd207){const _0x3e468a={_0xb652ac:0xdd},_0x380c30=_0x442b96;return this[_0x380c30(0xad)](_0x380c30(_0x3e468a._0xb652ac),[_0x2bd207]),this[_0x380c30(0xa9)][_0x2bd207]??null;}async[_0x442b96(0xe3)](_0x167f70,_0x310cba,_0x554419){const _0x3bde5f=_0x442b96;this[_0x3bde5f(0xad)](_0x3bde5f(0xe3),[_0x167f70,_0x310cba,_0x554419]),this[_0x3bde5f(0x9e)][_0x167f70]=_0x310cba;}async[_0x442b96(0xf7)](_0x317f53){const _0x3fb3c9=_0x442b96;return this[_0x3fb3c9(0xad)]('getCookie',[_0x317f53]),this[_0x3fb3c9(0x9e)][_0x317f53]??null;}async['saveStorageState'](_0x384034){this['record']('saveStorageState',[_0x384034]);}async[_0x442b96(0x106)](_0x52e2fa){const _0x6bb0c5={_0x36e143:0xad},_0x42e5cf=_0x442b96;return this[_0x42e5cf(_0x6bb0c5._0x36e143)](_0x42e5cf(0x106),[_0x52e2fa]),void 0x0;}async[_0x442b96(0xbf)](){const _0x1ae1ca=_0x442b96;this[_0x1ae1ca(0xad)]('close',[]);}[_0x442b96(0xfe)](){const _0x48c408={_0x5a0338:0x102,_0x1059f0:0xb6},_0x1eaaf8=_0x442b96;return this[_0x1eaaf8(_0x48c408._0x5a0338)][_0x1eaaf8(_0x48c408._0x1059f0)];}},FakeWebDriver=class{constructor(_0x3ec4ed={}){const _0x2a83e4={_0x242ce2:0xc6},_0x342a77=_0x442b96;this['behavior']=_0x3ec4ed,this[_0x342a77(_0x2a83e4._0x242ce2)]=createRecorder();}['behavior'];static{__name(this,_0x442b96(0xed));}['launched']=![];['recorder'];[_0x442b96(0x105)]=[];async['launch'](_0x3a3af9){const _0x27e4cb={_0x33877c:0xc6,_0x2bb819:0xcf},_0x3ca96a=_0x442b96;this[_0x3ca96a(_0x27e4cb._0x33877c)][_0x3ca96a(0xc8)]({'scope':_0x3ca96a(0xcd),'method':_0x3ca96a(_0x27e4cb._0x2bb819),'args':[_0x3a3af9]}),this['launched']=!![];}async[_0x442b96(0xac)](_0x56a71a){const _0x33e6fb={_0x27a9bb:0xc8,_0x5543b8:0xc6,_0x300189:0xa1,_0x24d1a4:0xd3,_0x5c5b69:0x105,_0x448ad9:0xb6},_0x338192=_0x442b96;this[_0x338192(0xc6)][_0x338192(_0x33e6fb._0x27a9bb)]({'scope':'driver','method':'newContext','args':[_0x56a71a]});if(!this[_0x338192(0xbb)])throw new DriverError(_0x338192(0xdf),{});const _0x40f3a9=new FakeContext(this[_0x338192(_0x33e6fb._0x5543b8)],this[_0x338192(_0x33e6fb._0x300189)],_0x338192(_0x33e6fb._0x24d1a4)+this[_0x338192(_0x33e6fb._0x5c5b69)][_0x338192(_0x33e6fb._0x448ad9)]);return this['contexts']['push'](_0x40f3a9),_0x40f3a9;}async[_0x442b96(0xbf)](){const _0x12deb7={_0x29a58d:0xbb},_0x5cac2e=_0x442b96;this[_0x5cac2e(0xc6)]['push']({'scope':'driver','method':_0x5cac2e(0xbf),'args':[]}),this[_0x5cac2e(_0x12deb7._0x29a58d)]=![];}['wsEndpoint'](){return void 0x0;}async[_0x442b96(0xb8)](){const _0x114b6f=_0x442b96;throw new DriverError(_0x114b6f(0xdb),{});}['attachExisting'](){const _0x1fe38d=_0x442b96;throw new DriverError(_0x1fe38d(0xef),{});}[_0x442b96(0xb1)](){const _0x1b7742=_0x442b96;return this[_0x1b7742(0xc6)]['calls']();}[_0x442b96(0xf4)](_0x1474bf){const _0x2a3a2d={_0x12a23d:0xa5},_0x2bce50=_0x442b96;return this[_0x2bce50(0xc6)]['calls']()[_0x2bce50(_0x2a3a2d._0x12a23d)](_0x4f65b7=>_0x4f65b7[_0x2bce50(0x9f)]===_0x1474bf);}};export{FakeWebDriver};
|
|
1
|
+
const _0x5cfb26=_0x3c5a;(function(_0x51fc95,_0x1da58f){const _0x4dfb60={_0x780dbf:0x16e,_0x4de962:0x163,_0xc74b32:0x13a,_0x30e7ad:0x118},_0x24fa42=_0x3c5a,_0x4772a4=_0x51fc95();while(!![]){try{const _0x3df6d=-parseInt(_0x24fa42(0x138))/0x1+parseInt(_0x24fa42(0x168))/0x2+parseInt(_0x24fa42(_0x4dfb60._0x780dbf))/0x3+parseInt(_0x24fa42(_0x4dfb60._0x4de962))/0x4+parseInt(_0x24fa42(0x140))/0x5*(-parseInt(_0x24fa42(_0x4dfb60._0xc74b32))/0x6)+-parseInt(_0x24fa42(_0x4dfb60._0x30e7ad))/0x7*(-parseInt(_0x24fa42(0x12a))/0x8)+-parseInt(_0x24fa42(0x166))/0x9;if(_0x3df6d===_0x1da58f)break;else _0x4772a4['push'](_0x4772a4['shift']());}catch(_0x1104ef){_0x4772a4['push'](_0x4772a4['shift']());}}}(_0x56d0,0x649da));var __defProp=Object[_0x5cfb26(0x131)],__name=(_0x5688af,_0x5e9f0f)=>__defProp(_0x5688af,_0x5cfb26(0x150),{'value':_0x5e9f0f,'configurable':!![]});function subscribe(_0x36020a,_0x34d435){const _0x319a2b={_0x2123c4:0x125},_0x3efaac=_0x5cfb26;return _0x36020a[_0x3efaac(_0x319a2b._0x2123c4)](_0x34d435),()=>{_0x36020a['delete'](_0x34d435);};}function _0x56d0(){const _0x3170b9=['zxHPDezYyw1L','mJC1otuYuePQyKfL','zNjHBwvezxb0Aa','AxneAxnHyMXLzej5rgvMyxvSDa','nZG0mZi0ogfPv2jYqW','y29UDgv4Dhm','nJG3mJKWtuX2AhHb','zMfRzs1WBMC','zNjHBwvtDgfJAW','Aw5WDxrwywX1zuj5rgvMyxvSDa','C3vIC2nYAwjL','y2fSBhngB3i','mteWntKZoffgqxPrwa','Dgv4DenVBNrLBNq','DxjS','y2fWDhvYzvn0ywnRvhjHy2u','CMvM','y2HLy2S','C2nYzwvUC2HVDa','y3jLyxrLuMvJB3jKzxi','Bgf1BMnO','BM8Gywn0AxzLihbHz2uGAw4Gy29UDgv4Da','zNjVBq','D3nfBMrWB2LUDa','Aw5ZCgvJDevSzw1LBNq','zhjPDMvY','ywn0AxzLugfNzq','y29UC29SzuvUDhjPzxm','zg91yMXLq2XPy2S','zxjYB3jpBK5LEhrby3rPB24','ChvZAa','rMfRzunVBNrLEhq','zxzHBhvHDgvpBKXVy2f0B3i','CMvJB3jKzxi','C2v0tg9JywXtDg9YywDL','Bg9JywXtDg9YywDLu3rHDgu','D2fPDezVCKXVywrtDgf0zq','z2v0q29VA2LL','zMLSBa','BMv3ugfNzuXPC3rLBMvYCW','z29gB3j3yxjK','D2fPDezVCK5HDMLNyxrPB24','y29VA2LLCW','C2f2zvn0B3jHz2vtDgf0zq','CMvJB3jK','y2XVC2u','B3v0zxjiDg1SqNLszwy','mtrxBM9KDxG','y29UDgv4Da','D2fPDezVCG','AxneAxnHyMXLza','Aw5PDgLHBfvYBa','zMLSDgvY','AxnwAxnPyMXL','zxHPDezYyw1LignHBgXLzcb3AxrOig5VigzYyw1Lig9UihrOzsbZDgfJAW','y29UBMvJDfnOyxjLzcbUB3qGC3vWCg9YDgvKigj5iezHA2vxzwjeCML2zxi','y2XPy2S','B3v0zxjive1m','Bwv0Ag9K','z29cywnR','ywrK','CgfNzsbPBMrLEcbVDxqGB2yGCMfUz2u','y2XPCgjVyxjKugfZDgu','y2XVC2vgywTLugfNzq','ywn0AxzLswr4','mJK0mJmXmM92re5KEq','y29VA2LLu3rHDgu','Dw5JAgvJAW','zNvUy3rPB24','z2v0qxr0CMLIDxrL','zwXLBwvUDeHPBNrcEvjLzG','C2nVCgu','zgvMAw5LuhjVCgvYDhK','y3vYCMvUDfvYBa','y2fSBhm','BMv3q29UDgv4Da','CMvSB2fK','CgfNzuXPC3q','BMv0D29YA0vUDhjPzxm','mtq2nta1A3bxr0j0','rMfRzvbHz2u','ntiWntq4D1jlu2Hy','D2fPDezVCLvYBa','y291BNrcEurLzMf1Bhq','zw1PDezHA2vqB3b1Ca','y29UBMvJDfnOyxjLza','C2v0qwn0AxzLugfNzq','nvH5sNjuwa','CgfNzxm','yMvOyxzPB3i','C2vSzwn0t3b0Aw9U','vw5VDgvZDevYCM9Y','DgL0Bgu','pgrPDJ48l2rPDJ4','zw50zxjgCMfTzq','yxr0CMLIDxrLC0j5rgvMyxvSDa','C2nYB2XSsw50B1zPzxC','Dgv4DenVBNrLBNrcEurLzMf1Bhq','zxzHBhvHDgu','z290BW','Bgf1BMnOzwq','B25bzNrLCKnSAwnR','Ag92zxi','BMfTzq','DxbSB2fKrMLSzq','Cg9WDxbpBKnSAwnR','ChjLC3m','yxr0ywnOrxHPC3rPBMCGBM90ihn1ChbVCNrLzcbIEsbgywTLv2vIrhjPDMvY','Aw5WDxrwywX1zq','iJ48l2rPDJ4','Bwf5yMvuAhjVDW','A2LUza','D2fPDezVCLrLEhq','C2v0q29VA2LL','zhjHz0fUzerYB3a','BgvUz3rO','C3rLChm','y291BNq','y2HLy2TLzfn0yxrL','z2v0tg9JywXtDg9YywDL','rMfRzvDLyKrYAxzLCG'];_0x56d0=function(){return _0x3170b9;};return _0x56d0();}__name(subscribe,_0x5cfb26(0x16c));var UnotestError=class extends Error{static{__name(this,_0x5cfb26(0x144));}[_0x5cfb26(0x119)];constructor(_0x5c6d25,_0x1ed3f={}){const _0x23547e={_0x2ced66:0x12d,_0x341dea:0x171},_0xf0cfec=_0x5cfb26;super(_0x5c6d25),this[_0xf0cfec(0x150)]=new.target.name,this[_0xf0cfec(0x119)]=Object['freeze']({..._0x1ed3f}),typeof Error[_0xf0cfec(0x171)]===_0xf0cfec(_0x23547e._0x2ced66)&&Error[_0xf0cfec(_0x23547e._0x341dea)](this,new.target);}},DriverError=class extends UnotestError{static{__name(this,'DriverError');}},LocatorError=class extends UnotestError{static{__name(this,'LocatorError');}};function createRecorder(){const _0x159893=_0x5cfb26,_0x1e2eb1=[];let _0x48be32=0x0;return{'push':__name(_0x473d77=>_0x1e2eb1[_0x159893(0x180)]({..._0x473d77,'seq':_0x48be32++}),_0x159893(0x180)),'calls':__name(()=>_0x1e2eb1,'calls')};}__name(createRecorder,_0x5cfb26(0x175));var FakePage=class{constructor(_0x34b7d6,_0x11dc72,_0x2be135,_0x16723c){const _0x34db3f={_0xbe6ee7:0x142,_0x5ef387:0x130},_0x276e5a=_0x5cfb26;this['recorder']=_0x34b7d6,this[_0x276e5a(_0x34db3f._0xbe6ee7)]=_0x11dc72,this[_0x276e5a(_0x34db3f._0x5ef387)]=_0x2be135,this['currentUrl']=_0x16723c;}[_0x5cfb26(0x10a)];[_0x5cfb26(0x142)];[_0x5cfb26(0x130)];static{__name(this,_0x5cfb26(0x139));}['currentUrl'];['onAfterClick'];[_0x5cfb26(0x115)](_0x1678b0,_0x43a250){const _0x1c30a1=_0x5cfb26;this[_0x1c30a1(0x10a)][_0x1c30a1(0x180)]({'scope':this[_0x1c30a1(0x130)],'method':_0x1678b0,'args':_0x43a250});}[_0x5cfb26(0x157)](){const _0x5e5cc7={_0x34ff15:0x142,_0x22f91c:0x142,_0x52c406:0x17f},_0x3d2b66=_0x5cfb26;if(this[_0x3d2b66(_0x5e5cc7._0x34ff15)][_0x3d2b66(0x17f)]){const _0x5468e5=this[_0x3d2b66(_0x5e5cc7._0x22f91c)][_0x3d2b66(_0x5e5cc7._0x52c406)];this[_0x3d2b66(_0x5e5cc7._0x34ff15)]['errorOnNextAction']=void 0x0;throw _0x5468e5;}}[_0x5cfb26(0x170)](){const _0x2c6bf3=_0x5cfb26;return this[_0x2c6bf3(0x132)];}async['title'](){const _0x476903=_0x5cfb26;return this['record'](_0x476903(0x145),[]),'fake\x20title';}async[_0x5cfb26(0x121)](_0x5689ae,_0x50d961){const _0x5984f1={_0x1b3b11:0x157},_0x394bb5=_0x5cfb26;this[_0x394bb5(0x115)](_0x394bb5(0x121),[_0x5689ae,_0x50d961]),this[_0x394bb5(_0x5984f1._0x1b3b11)](),this[_0x394bb5(0x14e)]?.();}async[_0x5cfb26(0x17e)](_0x26edcb,_0x3ea071){const _0x5af4b4={_0x3a1ff0:0x115},_0x485e0a=_0x5cfb26;this[_0x485e0a(_0x5af4b4._0x3a1ff0)](_0x485e0a(0x17e),[_0x26edcb,_0x3ea071]),this[_0x485e0a(0x157)]();}async[_0x5cfb26(0x10f)](_0x59bb16,_0x4cda2c,_0x33fe53){const _0x39ad26=_0x5cfb26;this[_0x39ad26(0x115)](_0x39ad26(0x10f),[_0x59bb16,_0x4cda2c,_0x33fe53]),this[_0x39ad26(0x157)]();}async[_0x5cfb26(0x153)](_0x958d0b,_0x5dadc5,_0xe1d820){const _0x32000f={_0x741121:0x157},_0x13f8d0=_0x5cfb26;this[_0x13f8d0(0x115)]('press',[_0x958d0b,_0x5dadc5,_0xe1d820]),this[_0x13f8d0(_0x32000f._0x741121)]();}async[_0x5cfb26(0x173)](_0x218ecf,_0x52db21){const _0x423213=_0x5cfb26;this[_0x423213(0x115)](_0x423213(0x173),[_0x218ecf,_0x52db21]),this['maybeThrow']();}async[_0x5cfb26(0x12c)](_0x22c9ea,_0x4c68d6){const _0x5da986={_0x59da88:0x115,_0xa8924a:0x157},_0x432810=_0x5cfb26;this[_0x432810(_0x5da986._0x59da88)]('uncheck',[_0x22c9ea,_0x4c68d6]),this[_0x432810(_0x5da986._0xa8924a)]();}async[_0x5cfb26(0x143)](_0x54cb61,_0x81f60c,_0x3bfe09){const _0x592f9d=_0x5cfb26;this['record'](_0x592f9d(0x143),[_0x54cb61,_0x81f60c,_0x3bfe09]),this[_0x592f9d(0x157)]();}async[_0x5cfb26(0x14f)](_0x5de9f7,_0x3dc7ce){const _0x582d2a={_0x10a658:0x14f,_0x5e28ff:0x157},_0x3b2ac1=_0x5cfb26;this['record'](_0x3b2ac1(_0x582d2a._0x10a658),[_0x5de9f7,_0x3dc7ce]),this[_0x3b2ac1(_0x582d2a._0x5e28ff)]();}async[_0x5cfb26(0x149)](_0x255ced){const _0x6a69c7={_0xed566d:0x149},_0x56ff0c=_0x5cfb26;this[_0x56ff0c(0x115)](_0x56ff0c(_0x6a69c7._0xed566d),[_0x255ced]),this['maybeThrow']();}async[_0x5cfb26(0x15b)](_0x688760,_0x1bfc82,_0x39101b){const _0x3deda4={_0x52a34c:0x157},_0x8f28d5=_0x5cfb26;this[_0x8f28d5(0x115)]('dragAndDrop',[_0x688760,_0x1bfc82,_0x39101b]),this[_0x8f28d5(_0x3deda4._0x52a34c)]();}async['uploadFile'](_0x2949da,_0x423677){const _0x4db566=_0x5cfb26;this[_0x4db566(0x115)](_0x4db566(0x151),[_0x2949da,_0x423677]),this['maybeThrow']();}async[_0x5cfb26(0x127)](_0x17a596,_0x1ccbe0){const _0x20736f=_0x5cfb26;this[_0x20736f(0x115)](_0x20736f(0x127),[_0x17a596,_0x1ccbe0]),this[_0x20736f(0x157)]();}async[_0x5cfb26(0x15e)](_0x33471d){const _0x1acc78={_0x56c56d:0x13c},_0x3a00a3=_0x5cfb26;return this['record'](_0x3a00a3(0x15e),[_0x33471d]),this['behavior'][_0x3a00a3(_0x1acc78._0x56c56d)]??0x1;}async[_0x5cfb26(0x16f)](_0x351183){const _0x188201={_0x183f72:0x142,_0x3522a4:0x14a},_0x2e14dc=_0x5cfb26;return this['record']('textContent',[_0x351183]),this[_0x2e14dc(_0x188201._0x183f72)][_0x2e14dc(_0x188201._0x3522a4)]??'';}async['inputValue'](_0x2a5229){const _0x36da64={_0x3f7b64:0x142,_0xcdff6c:0x16b},_0x477816=_0x5cfb26;return this[_0x477816(0x115)](_0x477816(0x155),[_0x2a5229]),this[_0x477816(_0x36da64._0x3f7b64)][_0x477816(_0x36da64._0xcdff6c)]??'';}async[_0x5cfb26(0x15f)](_0x32a856){const _0x3e2a01={_0x14efdb:0x15f},_0x48a4f3=_0x5cfb26;return this[_0x48a4f3(0x115)](_0x48a4f3(_0x3e2a01._0x14efdb),[_0x32a856]),this['behavior']['checkedStateByDefault']??null;}async[_0x5cfb26(0x11e)](_0x373772){const _0x481a94={_0x522383:0x11e,_0x3fbe15:0x142},_0x5b5b18=_0x5cfb26;return this[_0x5b5b18(0x115)](_0x5b5b18(_0x481a94._0x522383),[_0x373772]),this[_0x5b5b18(_0x481a94._0x3fbe15)]['isVisibleByDefault']??!![];}async[_0x5cfb26(0x11b)](_0x145c89){const _0x3f92e9={_0x56a487:0x115,_0x1354ed:0x142,_0x4e9e4c:0x165},_0x54bd81=_0x5cfb26;return this[_0x54bd81(_0x3f92e9._0x56a487)](_0x54bd81(0x11b),[_0x145c89]),this[_0x54bd81(_0x3f92e9._0x1354ed)][_0x54bd81(_0x3f92e9._0x4e9e4c)]??![];}async[_0x5cfb26(0x12e)](_0x528541,_0x28e5d5){const _0x5b2beb={_0x6075:0x142},_0x34b8d3=_0x5cfb26;return this[_0x34b8d3(0x115)](_0x34b8d3(0x12e),[_0x528541,_0x28e5d5]),this[_0x34b8d3(_0x5b2beb._0x6075)][_0x34b8d3(0x148)]?.[_0x28e5d5]??null;}async[_0x5cfb26(0x11a)](_0x41e028,_0x2bfb95){const _0x4310fb={_0x3786a9:0x115,_0x577921:0x11a},_0x1d2c7a=_0x5cfb26;this[_0x1d2c7a(_0x4310fb._0x3786a9)](_0x1d2c7a(_0x4310fb._0x577921),[_0x41e028,_0x2bfb95]);}async[_0x5cfb26(0x13b)](_0x5a86b7,_0x41fd67){const _0x43229e={_0x2955a3:0x115},_0x85f457=_0x5cfb26;this[_0x85f457(_0x43229e._0x2955a3)]('waitForUrl',[_0x5a86b7,_0x41fd67]);}async[_0x5cfb26(0x159)](_0x21f78c,_0x58a913){const _0x6b03c2=_0x5cfb26;this['record'](_0x6b03c2(0x159),[_0x21f78c,_0x58a913]);}async[_0x5cfb26(0x112)](_0x352863){const _0x386ac5=_0x5cfb26;this[_0x386ac5(0x115)]('waitForNavigation',[_0x352863]);}async[_0x5cfb26(0x10d)](_0x3dd6a8,_0x18d591){const _0x1c0a49={_0x59d30c:0x115},_0x39ab41=_0x5cfb26;this[_0x39ab41(_0x1c0a49._0x59d30c)]('waitForLoadState',[_0x3dd6a8,_0x18d591]);}async[_0x5cfb26(0x14c)](_0x38c535,_0x38ff0d){const _0x24a955={_0x436177:0x115,_0x27c82f:0x132},_0x2084c4=_0x5cfb26;this[_0x2084c4(_0x24a955._0x436177)](_0x2084c4(0x14c),[_0x38c535,_0x38ff0d]),this[_0x2084c4(_0x24a955._0x27c82f)]=_0x38c535;}async['reload'](_0x5783df){const _0x2c6813=_0x5cfb26;this[_0x2c6813(0x115)](_0x2c6813(0x135),[_0x5783df]);}async['goBack'](_0x2ab8f3){const _0x166e97={_0x1fc93d:0x124},_0x55b0a5=_0x5cfb26;this['record'](_0x55b0a5(_0x166e97._0x1fc93d),[_0x2ab8f3]);}async[_0x5cfb26(0x111)](_0x6694fc){const _0x4cf8a8={_0x4aaf25:0x115,_0x455b9f:0x111},_0x2781de=_0x5cfb26;this[_0x2781de(_0x4cf8a8._0x4aaf25)](_0x2781de(_0x4cf8a8._0x455b9f),[_0x6694fc]);}async[_0x5cfb26(0x14b)](_0x44a1d6){const _0x94de0a=_0x5cfb26;return this['record'](_0x94de0a(0x14b),[_0x44a1d6]),void 0x0;}async[_0x5cfb26(0x182)](_0x4bc628,_0x4856b3){const _0x2a576f=_0x5cfb26;return this['record'](_0x2a576f(0x182),[_0x4bc628,_0x4856b3]),void 0x0;}async['inspectElement'](_0xd63746){const _0x4f622b={_0x35b213:0x17a,_0x4f5507:0x172,_0x1ce21e:0x15d},_0x5303f9=_0x5cfb26;this['record'](_0x5303f9(_0x4f622b._0x35b213),[_0xd63746]);if(_0xd63746['steps'][_0x5303f9(0x15c)]!==0x1||_0xd63746[_0x5303f9(0x15d)][0x0][_0x5303f9(0x158)]!==_0x5303f9(_0x4f622b._0x4f5507))return null;const _0x4fe4b3=_0xd63746[_0x5303f9(_0x4f622b._0x1ce21e)][0x0][_0x5303f9(_0x4f622b._0x4f5507)],_0x4da019=this['behavior'][_0x5303f9(0x12f)]?.[_0x4fe4b3];return _0x4da019??null;}async[_0x5cfb26(0x174)](_0x183482){const _0x177147={_0xb2748f:0x178,_0x4c6f16:0x169},_0x51527a=_0x5cfb26;return this[_0x51527a(0x115)](_0x51527a(0x174),[_0x183482]),Buffer[_0x51527a(_0x177147._0xb2748f)](_0x51527a(_0x177147._0x4c6f16));}async[_0x5cfb26(0x122)](_0xdff201){const _0x409389={_0x3a6d56:0x172,_0x2312ed:0x156,_0xc9ca1a:0x146},_0x5cd995=_0x5cfb26;this['record'](_0x5cd995(0x122),[_0xdff201]);if(_0xdff201['steps']['length']===0x1&&_0xdff201[_0x5cd995(0x15d)][0x0]['kind']===_0x5cd995(_0x409389._0x3a6d56)){const _0x7019b=_0xdff201[_0x5cd995(0x15d)][0x0][_0x5cd995(0x172)];return this[_0x5cd995(0x142)][_0x5cd995(0x117)]?.[_0x7019b]??'<div\x20data-unotest-ref=\x22'+_0x7019b+_0x5cd995(_0x409389._0x2312ed);}return _0x5cd995(_0x409389._0xc9ca1a);}},FakeContext=class{constructor(_0x26da35,_0x15a427,_0x41b195){const _0x2bc458={_0x1c21ae:0x142,_0x422694:0x130,_0x139886:0x152,_0x17c755:0x14e,_0x18bbbe:0x136,_0x2ea2c2:0x113},_0xfc6731=_0x5cfb26;this[_0xfc6731(0x10a)]=_0x26da35,this[_0xfc6731(_0x2bc458._0x1c21ae)]=_0x15a427,this[_0xfc6731(_0x2bc458._0x422694)]=_0x41b195;const _0x538e5b=new FakePage(_0x26da35,_0x15a427,_0x41b195+'.page0',_0x15a427[_0xfc6731(0x11c)]??'about:blank');_0x15a427[_0xfc6731(_0x2bc458._0x139886)]&&(_0x538e5b[_0xfc6731(_0x2bc458._0x17c755)]=()=>{const _0x3fe0ab=_0xfc6731;this[_0x3fe0ab(0x13d)](_0x15a427['popupOnClick']);}),this[_0xfc6731(_0x2bc458._0x18bbbe)]=[_0x538e5b],this[_0xfc6731(0x10c)]={..._0x15a427['localStorage']??{}},this['cookieState']={..._0x15a427[_0xfc6731(_0x2bc458._0x2ea2c2)]??{}};}[_0x5cfb26(0x10a)];[_0x5cfb26(0x142)];[_0x5cfb26(0x130)];static{__name(this,_0x5cfb26(0x181));}[_0x5cfb26(0x136)];[_0x5cfb26(0x129)]=0x0;[_0x5cfb26(0x16a)]=[];[_0x5cfb26(0x10c)];[_0x5cfb26(0x12b)];[_0x5cfb26(0x110)]=new Set();['record'](_0x4a6d7b,_0x2e337c){const _0x570d8d=_0x5cfb26;this[_0x570d8d(0x10a)][_0x570d8d(0x180)]({'scope':this[_0x570d8d(0x130)],'method':_0x4a6d7b,'args':_0x2e337c});}[_0x5cfb26(0x141)](){return this['pageList'];}[_0x5cfb26(0x17c)](){const _0x386904={_0x2a0cc7:0x136,_0x45cd99:0x129,_0x3838ba:0x177},_0x2c5030=_0x5cfb26,_0x25f98a=this[_0x2c5030(_0x386904._0x2a0cc7)][this[_0x2c5030(_0x386904._0x45cd99)]];if(!_0x25f98a)throw new DriverError(_0x2c5030(_0x386904._0x3838ba),{'activeIdx':this[_0x2c5030(_0x386904._0x45cd99)]});return _0x25f98a;}['consoleEntries'](){const _0x16062a={_0x494486:0x17d},_0x160e23=_0x5cfb26;return this[_0x160e23(0x142)][_0x160e23(_0x16062a._0x494486)]??[];}[_0x5cfb26(0x137)](){const _0x12e655=_0x5cfb26;return this[_0x12e655(0x142)][_0x12e655(0x137)]??[];}async[_0x5cfb26(0x13f)](_0x4c7302){const _0x47ebd7={_0x41eb90:0x15c,_0x391937:0x126,_0xc04f04:0x136},_0x4ba043=_0x5cfb26;this[_0x4ba043(0x115)]('setActivePage',[_0x4c7302]);if(_0x4c7302<0x0||_0x4c7302>=this[_0x4ba043(0x136)][_0x4ba043(_0x47ebd7._0x41eb90)])throw new DriverError(_0x4ba043(_0x47ebd7._0x391937),{'index':_0x4c7302,'available':this[_0x4ba043(_0x47ebd7._0xc04f04)][_0x4ba043(0x15c)]});this[_0x4ba043(0x129)]=_0x4c7302,this['frameStack']['length']=0x0;}['onNewPage'](_0x45bd51){const _0x4b3db0={_0x181f6f:0x110},_0x20258f=_0x5cfb26;return subscribe(this[_0x20258f(_0x4b3db0._0x181f6f)],_0x45bd51);}[_0x5cfb26(0x13d)](_0x3d3630){const _0x2f2740={_0xfdd8db:0x130,_0x220d3a:0x10a,_0x266b2d:0x136},_0x533576=_0x5cfb26,_0x382af7=this[_0x533576(_0x2f2740._0xfdd8db)]+'.page'+this['pageList'][_0x533576(0x15c)],_0x58debd=new FakePage(this[_0x533576(_0x2f2740._0x220d3a)],this[_0x533576(0x142)],_0x382af7,_0x3d3630);this['pageList']['push'](_0x58debd);const _0x8fc3b1=this[_0x533576(_0x2f2740._0x266b2d)][_0x533576(0x15c)]-0x1;for(const _0xe17fd9 of this[_0x533576(0x110)]){try{_0xe17fd9({'index':_0x8fc3b1,'url':_0x3d3630});}catch{}}return _0x8fc3b1;}[_0x5cfb26(0x128)](_0x4370a8){const _0x36b274={_0x3ec48d:0x136,_0x37c54b:0x15c},_0x5ab317=_0x5cfb26;if(_0x4370a8<0x0||_0x4370a8>=this[_0x5ab317(_0x36b274._0x3ec48d)][_0x5ab317(0x15c)])throw new DriverError(_0x5ab317(0x126),{'index':_0x4370a8,'available':this[_0x5ab317(0x136)][_0x5ab317(_0x36b274._0x37c54b)]});this[_0x5ab317(0x136)]['splice'](_0x4370a8,0x1);}async[_0x5cfb26(0x147)](_0xcc7501){const _0x54ee8a={_0x1cc586:0x115},_0x1b0823=_0x5cfb26;this[_0x1b0823(_0x54ee8a._0x1cc586)](_0x1b0823(0x147),[_0xcc7501]);if(!_0xcc7501[_0x1b0823(0x15d)][_0x1b0823(0x15c)])throw new LocatorError('enterFrame\x20called\x20with\x20empty\x20locator',{'locator':_0xcc7501});this[_0x1b0823(0x16a)][_0x1b0823(0x180)](_0xcc7501);}async[_0x5cfb26(0x162)](){const _0x589afc={_0x1b57ba:0x162},_0x57722c=_0x5cfb26;this['record'](_0x57722c(_0x589afc._0x1b57ba),[]);if(this[_0x57722c(0x16a)][_0x57722c(0x15c)]===0x0)throw new DriverError(_0x57722c(0x11f),{});this[_0x57722c(0x16a)]['pop']();}async[_0x5cfb26(0x10b)](_0x32e0b1,_0x5318c2){const _0x1441ad={_0x30c702:0x10b},_0x4b05a0=_0x5cfb26;this['record'](_0x4b05a0(_0x1441ad._0x30c702),[_0x32e0b1,_0x5318c2]),this[_0x4b05a0(0x10c)][_0x32e0b1]=_0x5318c2;}async[_0x5cfb26(0x160)](_0x53b078){const _0x1d07f0={_0x471f33:0x115},_0x1a678a=_0x5cfb26;return this[_0x1a678a(_0x1d07f0._0x471f33)]('getLocalStorage',[_0x53b078]),this[_0x1a678a(0x10c)][_0x53b078]??null;}async[_0x5cfb26(0x15a)](_0x1c02b9,_0xb06551,_0x5cc221){const _0x16d933={_0x19ecdc:0x12b},_0x3e1cd3=_0x5cfb26;this[_0x3e1cd3(0x115)]('setCookie',[_0x1c02b9,_0xb06551,_0x5cc221]),this[_0x3e1cd3(_0x16d933._0x19ecdc)][_0x1c02b9]=_0xb06551;}async['getCookie'](_0x1f1c94){const _0x50efe3={_0xc145e3:0x12b},_0x85652b=_0x5cfb26;return this['record'](_0x85652b(0x10e),[_0x1f1c94]),this[_0x85652b(_0x50efe3._0xc145e3)][_0x1f1c94]??null;}async[_0x5cfb26(0x114)](_0x5af63f){const _0x32fd25={_0x897cba:0x115},_0x4522c9=_0x5cfb26;this[_0x4522c9(_0x32fd25._0x897cba)](_0x4522c9(0x114),[_0x5af63f]);}async[_0x5cfb26(0x14b)](_0x3aa6c2){const _0x8b6ab6={_0x247f10:0x115},_0x278701=_0x5cfb26;return this[_0x278701(_0x8b6ab6._0x247f10)]('evaluate',[_0x3aa6c2]),void 0x0;}async[_0x5cfb26(0x116)](){const _0x16d698={_0x5b892f:0x115,_0x20b395:0x116},_0x11766e=_0x5cfb26;this[_0x11766e(_0x16d698._0x5b892f)](_0x11766e(_0x16d698._0x20b395),[]);}[_0x5cfb26(0x164)](){const _0x2e2fc4={_0x5f6b73:0x16a,_0x37469f:0x15c},_0x3910f6=_0x5cfb26;return this[_0x3910f6(_0x2e2fc4._0x5f6b73)][_0x3910f6(_0x2e2fc4._0x37469f)];}},FakeWebDriver=class{constructor(_0x51f512={}){const _0x2c03cf={_0x43840b:0x142},_0x4daf60=_0x5cfb26;this[_0x4daf60(_0x2c03cf._0x43840b)]=_0x51f512,this['recorder']=createRecorder();}[_0x5cfb26(0x142)];static{__name(this,_0x5cfb26(0x161));}[_0x5cfb26(0x14d)]=![];[_0x5cfb26(0x10a)];['contexts']=[];async[_0x5cfb26(0x176)](_0x392cf1){const _0x191d2c=_0x5cfb26;this[_0x191d2c(0x10a)][_0x191d2c(0x180)]({'scope':_0x191d2c(0x17b),'method':_0x191d2c(0x176),'args':[_0x392cf1]}),this['launched']=!![];}async['newContext'](_0x4de9d2){const _0x4a6e83={_0x16b496:0x10a,_0x47bf88:0x134,_0x34a34e:0x167,_0x53d507:0x15c,_0x10520b:0x180},_0x9c668b=_0x5cfb26;this[_0x9c668b(_0x4a6e83._0x16b496)][_0x9c668b(0x180)]({'scope':_0x9c668b(0x17b),'method':_0x9c668b(_0x4a6e83._0x47bf88),'args':[_0x4de9d2]});if(!this['launched'])throw new DriverError('newContext\x20called\x20before\x20launch()',{});const _0x86bbab=new FakeContext(this['recorder'],this[_0x9c668b(0x142)],'ctx'+this[_0x9c668b(_0x4a6e83._0x34a34e)][_0x9c668b(_0x4a6e83._0x53d507)]);return this[_0x9c668b(_0x4a6e83._0x34a34e)][_0x9c668b(_0x4a6e83._0x10520b)](_0x86bbab),_0x86bbab;}async[_0x5cfb26(0x116)](){const _0x1c192b={_0x2d7412:0x116},_0x54b301=_0x5cfb26;this[_0x54b301(0x10a)][_0x54b301(0x180)]({'scope':'driver','method':_0x54b301(_0x1c192b._0x2d7412),'args':[]}),this[_0x54b301(0x14d)]=![];}[_0x5cfb26(0x179)](){return void 0x0;}async[_0x5cfb26(0x13e)](){const _0x5505a9=_0x5cfb26;throw new DriverError(_0x5505a9(0x120),{});}['attachExisting'](){const _0x5304a3={_0x17c3b8:0x154},_0x4ccd49=_0x5cfb26;throw new DriverError(_0x4ccd49(_0x5304a3._0x17c3b8),{});}[_0x5cfb26(0x133)](){const _0xf55f93=_0x5cfb26;return this['recorder'][_0xf55f93(0x133)]();}[_0x5cfb26(0x16d)](_0x3a9993){const _0x222c6d={_0x180c5e:0x10a},_0x4e7b77=_0x5cfb26;return this[_0x4e7b77(_0x222c6d._0x180c5e)]['calls']()[_0x4e7b77(0x11d)](_0x475230=>_0x475230[_0x4e7b77(0x123)]===_0x3a9993);}};function _0x3c5a(_0x1faa9b,_0x45761b){_0x1faa9b=_0x1faa9b-0x10a;const _0x56d048=_0x56d0();let _0x3c5a0f=_0x56d048[_0x1faa9b];if(_0x3c5a['rffPZZ']===undefined){var _0xf807e=function(_0x23fdb2){const _0x546a34='abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+/=';let _0x5688af='',_0x5e9f0f='';for(let _0x36020a=0x0,_0x34d435,_0x5c6d25,_0x1ed3f=0x0;_0x5c6d25=_0x23fdb2['charAt'](_0x1ed3f++);~_0x5c6d25&&(_0x34d435=_0x36020a%0x4?_0x34d435*0x40+_0x5c6d25:_0x5c6d25,_0x36020a++%0x4)?_0x5688af+=String['fromCharCode'](0xff&_0x34d435>>(-0x2*_0x36020a&0x6)):0x0){_0x5c6d25=_0x546a34['indexOf'](_0x5c6d25);}for(let _0x1e2eb1=0x0,_0x48be32=_0x5688af['length'];_0x1e2eb1<_0x48be32;_0x1e2eb1++){_0x5e9f0f+='%'+('00'+_0x5688af['charCodeAt'](_0x1e2eb1)['toString'](0x10))['slice'](-0x2);}return decodeURIComponent(_0x5e9f0f);};_0x3c5a['KYWstg']=_0xf807e,_0x3c5a['SsjVAW']={},_0x3c5a['rffPZZ']=!![];}const _0x54af70=_0x56d048[0x0],_0x5e0e08=_0x1faa9b+_0x54af70,_0x2efce1=_0x3c5a['SsjVAW'][_0x5e0e08];return!_0x2efce1?(_0x3c5a0f=_0x3c5a['KYWstg'](_0x3c5a0f),_0x3c5a['SsjVAW'][_0x5e0e08]=_0x3c5a0f):_0x3c5a0f=_0x2efce1,_0x3c5a0f;}export{FakeWebDriver};
|
package/dist/dsl/index.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { i as LocatorValue, W as WebDriver, D as DriverContext, d as DriverPage } from '../interfaces-
|
|
2
|
-
export { j as LocatorStep, k as appendStep, l as describeLocator, m as isLocatorValue, r as rootedAt } from '../interfaces-
|
|
1
|
+
import { i as LocatorValue, W as WebDriver, D as DriverContext, d as DriverPage } from '../interfaces-XvuefHHC.js';
|
|
2
|
+
export { j as LocatorStep, k as appendStep, l as describeLocator, m as isLocatorValue, r as rootedAt } from '../interfaces-XvuefHHC.js';
|
|
3
3
|
import { Matcher, RegexLiteral } from '@unotest/protocol';
|
|
4
4
|
import { ExecutionWalker, ExecutionEvent, RunResult, RunOptions } from '@unotest/dsl/executor';
|
|
5
5
|
export { ExecutionError, ExecutionEvent, RunOptions, RunResult } from '@unotest/dsl/executor';
|
|
@@ -73,6 +73,10 @@ declare function chainGetByTitle(loc: LocatorValue, text: Matcher, options?: {
|
|
|
73
73
|
interface VariableStore {
|
|
74
74
|
has(name: string): boolean;
|
|
75
75
|
get(name: string): string | undefined;
|
|
76
|
+
/** One-line, human/agent-readable summary of WHERE lookups searched
|
|
77
|
+
* (active environment + layer files, missing ones flagged). Optional so
|
|
78
|
+
* test fakes stay two-method; consumed by "variable not found" errors. */
|
|
79
|
+
describeSources?(): string;
|
|
76
80
|
}
|
|
77
81
|
|
|
78
82
|
interface Logger {
|
|
@@ -147,6 +151,10 @@ declare class TestRuntime {
|
|
|
147
151
|
setVar(name: string, value: DslValue): void;
|
|
148
152
|
getVar(name: string): DslValue;
|
|
149
153
|
hasVar(name: string): boolean;
|
|
154
|
+
/** Direct external-variable lookup (`unotest/.env` / `.secrets`), no
|
|
155
|
+
* scope fallback, no throw. Used by shell() to resolve the
|
|
156
|
+
* `sandbox.exportSecrets` allowlist into subprocess env. */
|
|
157
|
+
externalVar(name: string): string | undefined;
|
|
150
158
|
/** Snapshot for `inspect_runtime` MCP tool. */
|
|
151
159
|
snapshotVars(): Record<string, DslValue>;
|
|
152
160
|
}
|
|
@@ -197,6 +205,9 @@ interface ActiveRuntime {
|
|
|
197
205
|
node: unknown;
|
|
198
206
|
line: number;
|
|
199
207
|
col: number;
|
|
208
|
+
/** Label of the enclosing `step("…")` block, when the failing
|
|
209
|
+
* statement ran inside one — the human-readable intent for reports. */
|
|
210
|
+
stepLabel?: string;
|
|
200
211
|
error: {
|
|
201
212
|
message: string;
|
|
202
213
|
stack?: string;
|