@unotest/web 0.30.0 → 0.31.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 +12 -0
- package/.claude/skills/write-e2e-test-ground/SKILL.md +12 -0
- package/CHANGELOG.md +266 -0
- package/bin/unotest-web.js +3 -1
- package/dist/config/schema.d.ts +9 -9
- package/dist/config/schema.js +1 -1
- package/dist/driver/index.d.ts +11 -3
- package/dist/driver/index.js +1 -1
- package/dist/dsl/index.d.ts +34 -4
- package/dist/dsl/index.js +1 -1
- package/dist/dsl/web-dsl-language-service.d.ts +22 -2
- package/dist/dsl/web-dsl-language-service.js +1 -1
- package/dist/inspection/page-inject.d.ts +1 -1
- package/dist/{interfaces-BluheUKs.d.ts → interfaces-B34N4rfI.d.ts} +8 -0
- package/dist/legacy-layout-By62PkbP.d.ts +8 -0
- package/dist/linter-Yf4gPe5J.d.ts +36 -0
- package/dist/mcp/server.js +1 -1
- package/dist/runner/cli.d.ts +13 -2
- 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 +43 -2
- package/guides/dsl-reference.md +156 -9
- package/package.json +8 -8
- package/src/mcp/prompts/agent-test-author.md +11 -1
- package/types/unotest-dsl.d.ts +29 -5
- package/dist/linter-CM2CpIyW.d.ts +0 -21
package/dist/driver/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const _0x1594e8=_0x2299;(function(_0x261b99,_0x4775e7){const _0x5ebcf2={_0x35492c:0x81,_0x2a0251:0xc9,_0x501fe6:0xa8},_0x28e84b=_0x2299,_0xdd0d1a=_0x261b99();while(!![]){try{const _0x5d4289=-parseInt(_0x28e84b(0xc5))/0x1+parseInt(_0x28e84b(_0x5ebcf2._0x35492c))/0x2+parseInt(_0x28e84b(0x95))/0x3*(-parseInt(_0x28e84b(0x6f))/0x4)+-parseInt(_0x28e84b(_0x5ebcf2._0x2a0251))/0x5+-parseInt(_0x28e84b(_0x5ebcf2._0x501fe6))/0x6+-parseInt(_0x28e84b(0xc1))/0x7+-parseInt(_0x28e84b(0xc8))/0x8*(-parseInt(_0x28e84b(0x8c))/0x9);if(_0x5d4289===_0x4775e7)break;else _0xdd0d1a['push'](_0xdd0d1a['shift']());}catch(_0xbf8dd0){_0xdd0d1a['push'](_0xdd0d1a['shift']());}}}(_0x22c7,0x83ac1));var __defProp=Object['defineProperty'],__name=(_0xa3f720,_0x29dda9)=>__defProp(_0xa3f720,_0x1594e8(0xca),{'value':_0x29dda9,'configurable':!![]});function subscribe(_0x3557f9,_0x42808e){const _0x335497={_0x25d005:0x89},_0x419ee8={_0x12a5e6:0x7b},_0x3b73bc=_0x1594e8;return _0x3557f9[_0x3b73bc(_0x335497._0x25d005)](_0x42808e),()=>{const _0x300771=_0x3b73bc;_0x3557f9[_0x300771(_0x419ee8._0x12a5e6)](_0x42808e);};}__name(subscribe,_0x1594e8(0x71));function _0x22c7(){const _0x26e458=['otqYmtmXBfPbB3vt','AxneAxnHyMXLzej5rgvMyxvSDa','yxr0ywnOrxHPC3rPBMC','mJq4qKL6twrQ','ndi3mJC0mefitg1qyG','BMfTzq','C2v0q29VA2LL','AxneAxnHyMXLza','CgfNzsbPBMrLEcbVDxqGB2yGCMfUz2u','BMv3q29UDgv4Da','y2fSBhm','BgvUz3rO','zxHPDezYyw1LignHBgXLzcb3AxrOig5VigzYyw1Lig9UihrOzsbZDgfJAW','y29VA2LLCW','Dgv4DenVBNrLBNrcEurLzMf1Bhq','Bwf5yMvuAhjVDW','BM8Gywn0AxzLihbHz2uGAw4Gy29UDgv4Da','C2nVCgu','C2v0tg9JywXtDg9YywDL','zg91yMXLq2XPy2S','C3bSAwnL','y2HLy2TLzfn0yxrL','zMfRzs1WBMC','ChvZAa','y2HLy2TLzfn0yxrLqNLezwzHDwX0','CMvJB3jKzxi','iJ48l2rPDJ4','AxnwAxnPyMXL','zw50zxjgCMfTzq','zxzHBhvHDgu','A2LUza','D3nfBMrWB2LUDa','lNbHz2u','CMvM','Dw5JAgvJAW','BMv3q29UDgv4DcbJywXSzwqGyMvMB3jLigXHDw5JAcGP','y2HLy2S','nZeXmtz5AeXXExO','y29VA2LLu3rHDgu','C3vIC2nYAwjL','C3rLChm','D2fPDezVCLvYBa','pgrPDIbKyxrHlxvUB3rLC3qTCMvMpsi','zNjVBq','y291BNq','Cg9W','zxjYB3jpBK5LEhrby3rPB24','CgfNzxm','Bg9JywXtDg9YywDL','zgvSzxrL','zhjHz0fUzerYB3a','y2XVC2u','D2fPDezVCKXVywrtDgf0zq','zMfRzsb0AxrSzq','BMv0D29YA0vUDhjPzxm','mta5ndG0mNLYve9uvq','z2v0q29VA2LL','C2nYzwvUC2HVDa','rMfRzunVBNrLEhq','D2fPDezVCG','C2v0qwn0AxzLugfNzq','B25ozxDqywDL','zxHPDezYyw1L','ywrK','zxzHBhvHDgvpBKXVy2f0B3i','BMv3ugfNzuXPC3rLBMvYCW','ody1ndeZzxnyrfjl','yxr0ywnOrxHPC3rPBMCGBM90ihn1ChbVCNrLzcbIEsbgywTLv2vIrhjPDMvY','lNbHz2uW','Dgv4DenVBNrLBNq','zwXLBwvUDeHPBNrcEvjLzG','yxr0CMLIDxrLC0j5rgvMyxvSDa','y2fSBhngB3i','AxnwAxnPyMXLqNLezwzHDwX0','zMLSDgvY','mte3Be9nAKvn','ywn0AxzLswr4','y29UDgv4Dhm','DgL0Bgu','D2fPDezVCLrLEhq','Aw5WDxrwywX1zq','Bwv0Ag9K','y2XPy2S','rhjPDMvYrxjYB3i','z29cywnR','CMvJB3jK','pgrPDJ48l2rPDJ4','B25bzNrLCKnSAwnR','Bg9JywXtDg9YywDLu3rHDgu','ChjLC3m','y2XPCgjVyxjKugfZDgu','CgfNzuXPC3q','DxbSB2fKrMLSzq','zw1PDezHA2vqB3b1Ca','mJi4otu0mhvjr0fKwa','y29UBMvJDfnOyxjLza','Aw5PDgLHBfvYBa','zNjHBwvezxb0Aa','CMvSB2fK','tg9JyxrVCKvYCM9Y','B3v0zxjive1m','yMvOyxzPB3i','y29UC29SzuvUDhjPzxm','C2f2zvn0B3jHz2vtDgf0zq','C2nYB2XSsw50B1zPzxC','y3r4','Aw5UzxjuzxH0qNLezwzHDwX0','y29UBMvJDfnOyxjLzcbUB3qGC3vWCg9YDgvKigj5iezHA2vxzwjeCML2zxi','D2fPDezVCK5HDMLNyxrPB24','zMLSBa','y3vYCMvUDfvYBa','Bgf1BMnO','C2vSzwn0t3b0Aw9U','Cg9WDxbpBKnSAwnR','z2v0qxr0CMLIDxrL','zhjPDMvY','Aw5UzxjuzxH0','zNjHBwvtDgfJAW','z2v0tg9JywXtDg9YywDL','odiXmtyZBKXWEg9K','Aw5ZCgvJDevSzw1LBNq','rMfRzvDLyKrYAxzLCG','Bgf1BMnOzwq'];_0x22c7=function(){return _0x26e458;};return _0x22c7();}import{UnotestError}from'@unotest/core';var DriverError=class extends UnotestError{static{__name(this,_0x1594e8(0x9d));}},LocatorError=class extends UnotestError{static{__name(this,_0x1594e8(0xad));}};function createRecorder(){const _0x3f0000={_0x40e2cd:0xdc,_0x3fb5c8:0xcf},_0x3131f9=_0x1594e8,_0x927fd5=[];let _0x247acc=0x0;return{'push':__name(_0xae7156=>_0x927fd5['push']({..._0xae7156,'seq':_0x247acc++}),_0x3131f9(_0x3f0000._0x40e2cd)),'calls':__name(()=>_0x927fd5,_0x3131f9(_0x3f0000._0x3fb5c8))};}function _0x2299(_0x308467,_0x227cf4){_0x308467=_0x308467-0x6c;const _0x22c7ee=_0x22c7();let _0x229981=_0x22c7ee[_0x308467];if(_0x2299['dzlKDD']===undefined){var _0x44673e=function(_0x5883e0){const _0x3ebe64='abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+/=';let _0xa3f720='',_0x29dda9='';for(let _0x3557f9=0x0,_0x42808e,_0x927fd5,_0x247acc=0x0;_0x927fd5=_0x5883e0['charAt'](_0x247acc++);~_0x927fd5&&(_0x42808e=_0x3557f9%0x4?_0x42808e*0x40+_0x927fd5:_0x927fd5,_0x3557f9++%0x4)?_0xa3f720+=String['fromCharCode'](0xff&_0x42808e>>(-0x2*_0x3557f9&0x6)):0x0){_0x927fd5=_0x3ebe64['indexOf'](_0x927fd5);}for(let _0xae7156=0x0,_0xe701b6=_0xa3f720['length'];_0xae7156<_0xe701b6;_0xae7156++){_0x29dda9+='%'+('00'+_0xa3f720['charCodeAt'](_0xae7156)['toString'](0x10))['slice'](-0x2);}return decodeURIComponent(_0x29dda9);};_0x2299['JGpHZV']=_0x44673e,_0x2299['anbVxy']={},_0x2299['dzlKDD']=!![];}const _0x3aa1f3=_0x22c7ee[0x0],_0x411f54=_0x308467+_0x3aa1f3,_0x46f432=_0x2299['anbVxy'][_0x411f54];return!_0x46f432?(_0x229981=_0x2299['JGpHZV'](_0x229981),_0x2299['anbVxy'][_0x411f54]=_0x229981):_0x229981=_0x46f432,_0x229981;}__name(createRecorder,'createRecorder');var FakePage=class{constructor(_0xe701b6,_0x2f74bd,_0x41f3c4,_0x632dd){const _0xa794c7={_0x276abe:0xb8},_0x4b77ac=_0x1594e8;this[_0x4b77ac(0xde)]=_0xe701b6,this[_0x4b77ac(0xaf)]=_0x2f74bd,this[_0x4b77ac(0xd6)]=_0x41f3c4,this[_0x4b77ac(_0xa794c7._0x276abe)]=_0x632dd;}[_0x1594e8(0xde)];[_0x1594e8(0xaf)];[_0x1594e8(0xd6)];static{__name(this,'FakePage');}['currentUrl'];['onAfterClick'];['record'](_0x33ba35,_0x4a53d1){this['recorder']['push']({'scope':this['scope'],'method':_0x33ba35,'args':_0x4a53d1});}[_0x1594e8(0xd4)](){const _0x4e3ab2={_0x13f079:0xaf,_0x344c6c:0x78},_0x5c11c5=_0x1594e8;if(this['behavior']['errorOnNextAction']){const _0x3b710b=this[_0x5c11c5(0xaf)]['errorOnNextAction'];this[_0x5c11c5(_0x4e3ab2._0x13f079)][_0x5c11c5(_0x4e3ab2._0x344c6c)]=void 0x0;throw _0x3b710b;}}['url'](){return this['currentUrl'];}async[_0x1594e8(0x98)](){const _0x4afe76={_0x3623ca:0x9f,_0x312141:0x98},_0x52bd2a=_0x1594e8;return this[_0x52bd2a(_0x4afe76._0x3623ca)](_0x52bd2a(_0x4afe76._0x312141),[]),_0x52bd2a(0x7f);}async[_0x1594e8(0x9c)](_0x182a93,_0x15f164){const _0xbbd6e0={_0x46eafe:0x9f,_0x5c5837:0xd4},_0x129a89=_0x1594e8;this[_0x129a89(_0xbbd6e0._0x46eafe)](_0x129a89(0x9c),[_0x182a93,_0x15f164]),this[_0x129a89(_0xbbd6e0._0x5c5837)](),this['onAfterClick']?.();}async[_0x1594e8(0xd8)](_0x29a43e,_0x19bb2e){const _0x382b70={_0x3a03bf:0x9f,_0x158873:0xd8,_0x2d4a88:0xd4},_0x536ac3=_0x1594e8;this[_0x536ac3(_0x382b70._0x3a03bf)](_0x536ac3(_0x382b70._0x158873),[_0x29a43e,_0x19bb2e]),this[_0x536ac3(_0x382b70._0x2d4a88)]();}async[_0x1594e8(0xb7)](_0x10d03a,_0x49f6bc,_0x28e20b){const _0x34607f={_0x4f27f3:0x9f},_0x13c509=_0x1594e8;this[_0x13c509(_0x34607f._0x4f27f3)](_0x13c509(0xb7),[_0x10d03a,_0x49f6bc,_0x28e20b]),this[_0x13c509(0xd4)]();}async[_0x1594e8(0xa3)](_0x2fd525,_0x5300e1,_0x3ae113){const _0x4d4461={_0x7cbd77:0x9f},_0x45af72=_0x1594e8;this[_0x45af72(_0x4d4461._0x7cbd77)]('press',[_0x2fd525,_0x5300e1,_0x3ae113]),this[_0x45af72(0xd4)]();}async[_0x1594e8(0x6e)](_0x3e59de,_0x2c53d2){const _0x58c1fc={_0x35251b:0x9f,_0x4334a4:0x6e},_0x336907=_0x1594e8;this[_0x336907(_0x58c1fc._0x35251b)](_0x336907(_0x58c1fc._0x4334a4),[_0x3e59de,_0x2c53d2]),this['maybeThrow']();}async[_0x1594e8(0x6c)](_0xfb3350,_0x264ff9){const _0xe087f3={_0x27e53d:0x9f,_0xa29a81:0xd4},_0x418f4d=_0x1594e8;this[_0x418f4d(_0xe087f3._0x27e53d)](_0x418f4d(0x6c),[_0xfb3350,_0x264ff9]),this[_0x418f4d(_0xe087f3._0xa29a81)]();}async[_0x1594e8(0xba)](_0x25964e,_0x54271b,_0xd49806){const _0x2b0e0d={_0x313487:0x9f,_0x3442bb:0xd4},_0x4cf973=_0x1594e8;this[_0x4cf973(_0x2b0e0d._0x313487)](_0x4cf973(0xba),[_0x25964e,_0x54271b,_0xd49806]),this[_0x4cf973(_0x2b0e0d._0x3442bb)]();}async['hover'](_0x1d4c53,_0x54bed7){const _0x140c69={_0x185926:0x9f},_0x46b81e=_0x1594e8;this[_0x46b81e(_0x140c69._0x185926)]('hover',[_0x1d4c53,_0x54bed7]),this['maybeThrow']();}async['scrollIntoView'](_0x2cca66){const _0x14caa3={_0x26e84b:0x9f,_0x3e476f:0xb2},_0x52d523=_0x1594e8;this[_0x52d523(_0x14caa3._0x26e84b)](_0x52d523(_0x14caa3._0x3e476f),[_0x2cca66]),this['maybeThrow']();}async[_0x1594e8(0x7c)](_0x4215cb,_0x548019,_0x30b369){this['record']('dragAndDrop',[_0x4215cb,_0x548019,_0x30b369]),this['maybeThrow']();}async[_0x1594e8(0xa6)](_0x1d7e52,_0x36a55b){const _0x29ee4a={_0x178a93:0x9f,_0xfd57c:0xa6},_0x59b9d8=_0x1594e8;this[_0x59b9d8(_0x29ee4a._0x178a93)](_0x59b9d8(_0x29ee4a._0xfd57c),[_0x1d7e52,_0x36a55b]),this[_0x59b9d8(0xd4)]();}async['clipboardPaste'](_0x44af92,_0x493164){const _0xa3551e={_0x416137:0xa4},_0xe038ba=_0x1594e8;this[_0xe038ba(0x9f)](_0xe038ba(_0xa3551e._0x416137),[_0x44af92,_0x493164]),this[_0xe038ba(0xd4)]();}async[_0x1594e8(0x76)](_0x17f4d6){const _0x59c773={_0x5f50bc:0xaf},_0x1605c3=_0x1594e8;return this[_0x1605c3(0x9f)](_0x1605c3(0x76),[_0x17f4d6]),this[_0x1605c3(_0x59c773._0x5f50bc)]['countByDefault']??0x1;}async['textContent'](_0x252cdc){const _0xc7f494={_0x298350:0xaf},_0x10fb0d=_0x1594e8;return this['record'](_0x10fb0d(0x8f),[_0x252cdc]),this[_0x10fb0d(_0xc7f494._0x298350)]['textContentByDefault']??'';}async[_0x1594e8(0xbe)](_0x2470d4){const _0x861804={_0x5e9e3a:0x9f,_0x2df937:0xbe},_0x224656=_0x1594e8;return this[_0x224656(_0x861804._0x5e9e3a)](_0x224656(_0x861804._0x2df937),[_0x2470d4]),this[_0x224656(0xaf)][_0x224656(0xb4)]??this[_0x224656(0xaf)][_0x224656(0xd3)]??'';}async[_0x1594e8(0x9a)](_0x592e5a){const _0x303d61=_0x1594e8;return this['record'](_0x303d61(0x9a),[_0x592e5a]),this['behavior']['inputValueByDefault']??'';}async[_0x1594e8(0xda)](_0x5050d3){const _0x10b0d1={_0x573d5d:0xda,_0xc6471c:0xdd},_0x2be095=_0x1594e8;return this[_0x2be095(0x9f)](_0x2be095(_0x10b0d1._0x573d5d),[_0x5050d3]),this[_0x2be095(0xaf)][_0x2be095(_0x10b0d1._0xc6471c)]??null;}async[_0x1594e8(0xe0)](_0x2212e0){const _0x1f6dd7={_0x481ad4:0x9f},_0x3facf1=_0x1594e8;return this[_0x3facf1(_0x1f6dd7._0x481ad4)]('isVisible',[_0x2212e0]),this['behavior'][_0x3facf1(0x93)]??!![];}async[_0x1594e8(0xcc)](_0xc0d4c3){const _0x328102={_0x5b43df:0x9f,_0x230358:0xaf,_0x4d16d2:0xc6},_0xe2cdd1=_0x1594e8;return this[_0xe2cdd1(_0x328102._0x5b43df)]('isDisabled',[_0xc0d4c3]),this[_0xe2cdd1(_0x328102._0x230358)][_0xe2cdd1(_0x328102._0x4d16d2)]??![];}async[_0x1594e8(0xbc)](_0x3d6a4d,_0xecfb5d){const _0x59f3ce={_0xfd2c1:0x9f,_0x1377e9:0x91},_0x2cbe95=_0x1594e8;return this[_0x2cbe95(_0x59f3ce._0xfd2c1)](_0x2cbe95(0xbc),[_0x3d6a4d,_0xecfb5d]),this[_0x2cbe95(0xaf)][_0x2cbe95(_0x59f3ce._0x1377e9)]?.[_0xecfb5d]??null;}async[_0x1594e8(0x85)](_0x3986a9,_0x2643d5){const _0x20cadd=_0x1594e8;this['record'](_0x20cadd(0x85),[_0x3986a9,_0x2643d5]);}async[_0x1594e8(0x73)](_0x395c24,_0x20c4e9){const _0x41a37c={_0x31b739:0x73},_0x4c4acc=_0x1594e8;this[_0x4c4acc(0x9f)](_0x4c4acc(_0x41a37c._0x31b739),[_0x395c24,_0x20c4e9]);}async['waitForText'](_0x712661,_0x21d911){const _0x290995={_0x2d7f00:0x99},_0x1d078c=_0x1594e8;this['record'](_0x1d078c(_0x290995._0x2d7f00),[_0x712661,_0x21d911]);}async['waitForNavigation'](_0x32df92){const _0x2636b3=_0x1594e8;this['record'](_0x2636b3(0xb6),[_0x32df92]);}async['waitForLoadState'](_0x2da8c5,_0x2df635){const _0x462e84={_0x26d615:0x9f},_0x2b9412=_0x1594e8;this[_0x2b9412(_0x462e84._0x26d615)](_0x2b9412(0x7e),[_0x2da8c5,_0x2df635]);}async['goto'](_0x5f1933,_0x4c6be3){const _0x353156={_0x5b321d:0xb8},_0x2dce4d=_0x1594e8;this['record']('goto',[_0x5f1933,_0x4c6be3]),this[_0x2dce4d(_0x353156._0x5b321d)]=_0x5f1933;}async[_0x1594e8(0xac)](_0x981a36){const _0x4fdf1b={_0x319605:0x9f},_0x3132e8=_0x1594e8;this[_0x3132e8(_0x4fdf1b._0x319605)](_0x3132e8(0xac),[_0x981a36]);}async[_0x1594e8(0x9e)](_0x4be559){const _0x39d5af={_0x2fc3a8:0x9f},_0x129c90=_0x1594e8;this[_0x129c90(_0x39d5af._0x2fc3a8)](_0x129c90(0x9e),[_0x4be559]);}async['goForward'](_0x16f81c){this['record']('goForward',[_0x16f81c]);}async[_0x1594e8(0xe2)](_0x11e82d){const _0x423a6b={_0x159b2a:0x9f,_0x4ec5b4:0xe2},_0x3b02e4=_0x1594e8;return this[_0x3b02e4(_0x423a6b._0x159b2a)](_0x3b02e4(_0x423a6b._0x4ec5b4),[_0x11e82d]),void 0x0;}async[_0x1594e8(0x8a)](_0x4ceff0,_0x18380f){const _0xb9bad0=_0x1594e8;return this[_0xb9bad0(0x9f)](_0xb9bad0(0x8a),[_0x4ceff0,_0x18380f]),void 0x0;}async[_0x1594e8(0xc2)](_0x1e1369){const _0x4adb31={_0x4ca97c:0xd0,_0x7f3b23:0xe3,_0x3d83f3:0xe6,_0x5db160:0x72},_0x421946=_0x1594e8;this['record']('inspectElement',[_0x1e1369]);if(_0x1e1369['steps'][_0x421946(_0x4adb31._0x4ca97c)]!==0x1||_0x1e1369[_0x421946(0x72)][0x0][_0x421946(_0x4adb31._0x7f3b23)]!==_0x421946(_0x4adb31._0x3d83f3))return null;const _0x5635de=_0x1e1369[_0x421946(_0x4adb31._0x5db160)][0x0][_0x421946(_0x4adb31._0x3d83f3)],_0x5cf3a3=this[_0x421946(0xaf)][_0x421946(0x90)]?.[_0x5635de];return _0x5cf3a3??null;}async[_0x1594e8(0x83)](_0x47c742){const _0x403101={_0x4bcfef:0x9f,_0x2629dd:0x83,_0x54141e:0x75,_0x13a96d:0xdb},_0x1520c8=_0x1594e8;return this[_0x1520c8(_0x403101._0x4bcfef)](_0x1520c8(_0x403101._0x2629dd),[_0x47c742]),Buffer[_0x1520c8(_0x403101._0x54141e)](_0x1520c8(_0x403101._0x13a96d));}async[_0x1594e8(0xae)](_0x223516){const _0x161474={_0x1ef539:0xae,_0xe9f8ad:0xe3,_0x47a01e:0xe6,_0x547959:0xaf,_0x4bf8ec:0x74,_0x3875c9:0xdf},_0x17d6a1=_0x1594e8;this[_0x17d6a1(0x9f)](_0x17d6a1(_0x161474._0x1ef539),[_0x223516]);if(_0x223516[_0x17d6a1(0x72)][_0x17d6a1(0xd0)]===0x1&&_0x223516['steps'][0x0][_0x17d6a1(_0x161474._0xe9f8ad)]===_0x17d6a1(_0x161474._0x47a01e)){const _0x495af9=_0x223516['steps'][0x0][_0x17d6a1(0xe6)];return this[_0x17d6a1(_0x161474._0x547959)]['outerHtmlByRef']?.[_0x495af9]??_0x17d6a1(_0x161474._0x4bf8ec)+_0x495af9+_0x17d6a1(_0x161474._0x3875c9);}return _0x17d6a1(0xa0);}},FakeContext=class{constructor(_0xf09001,_0x36e82d,_0x58d9a2){const _0x39055f={_0x34cee9:0xd6,_0x1dc039:0x8e,_0xf9bf0b:0xbb,_0x11b189:0xd2},_0x4cd90b={_0x4cbbe5:0xbb},_0x45febb=_0x1594e8;this[_0x45febb(0xde)]=_0xf09001,this[_0x45febb(0xaf)]=_0x36e82d,this[_0x45febb(_0x39055f._0x34cee9)]=_0x58d9a2;const _0xd4020d=new FakePage(_0xf09001,_0x36e82d,_0x58d9a2+_0x45febb(_0x39055f._0x1dc039),_0x36e82d[_0x45febb(0xaa)]??'about:blank');_0x36e82d[_0x45febb(_0x39055f._0xf9bf0b)]&&(_0xd4020d[_0x45febb(0xa1)]=()=>{const _0x3fd1c3=_0x45febb;this[_0x3fd1c3(0xa7)](_0x36e82d[_0x3fd1c3(_0x4cd90b._0x4cbbe5)]);}),this['pageList']=[_0xd4020d],this['localStorageState']={..._0x36e82d[_0x45febb(0x7a)]??{}},this[_0x45febb(0x70)]={..._0x36e82d[_0x45febb(_0x39055f._0x11b189)]??{}};}['recorder'];[_0x1594e8(0xaf)];[_0x1594e8(0xd6)];static{__name(this,_0x1594e8(0x84));}['pageList'];['activeIdx']=0x0;[_0x1594e8(0xbf)]=[];[_0x1594e8(0xa2)];[_0x1594e8(0x70)];[_0x1594e8(0x8b)]=new Set();[_0x1594e8(0x9f)](_0x5b0a78,_0x48ec85){const _0x2d0819={_0x3ad1ba:0xde,_0x4c9679:0xdc,_0x91e4fd:0xd6},_0x1ce8d2=_0x1594e8;this[_0x1ce8d2(_0x2d0819._0x3ad1ba)][_0x1ce8d2(_0x2d0819._0x4c9679)]({'scope':this[_0x1ce8d2(_0x2d0819._0x91e4fd)],'method':_0x5b0a78,'args':_0x48ec85});}[_0x1594e8(0x79)](){return this['pageList'];}['activePage'](){const _0x3284d2={_0x359627:0xd5},_0x466f96=_0x1594e8,_0x4f6031=this['pageList'][this[_0x466f96(0x96)]];if(!_0x4f6031)throw new DriverError(_0x466f96(_0x3284d2._0x359627),{'activeIdx':this[_0x466f96(0x96)]});return _0x4f6031;}[_0x1594e8(0xb0)](){const _0x324a7f=_0x1594e8;return this[_0x324a7f(0xaf)][_0x324a7f(0xb0)]??[];}[_0x1594e8(0x80)](){const _0x26725a=_0x1594e8;return this[_0x26725a(0xaf)]['networkEntries']??[];}async[_0x1594e8(0x86)](_0x4a6e9f){const _0x1497ab={_0x339d61:0x96},_0x970824=_0x1594e8;this['record'](_0x970824(0x86),[_0x4a6e9f]);if(_0x4a6e9f<0x0||_0x4a6e9f>=this[_0x970824(0xa5)][_0x970824(0xd0)])throw new DriverError(_0x970824(0xcd),{'index':_0x4a6e9f,'available':this[_0x970824(0xa5)]['length']});this[_0x970824(_0x1497ab._0x339d61)]=_0x4a6e9f,this['frameStack'][_0x970824(0xd0)]=0x0;}[_0x1594e8(0x87)](_0x38c820){return subscribe(this['newPageListeners'],_0x38c820);}[_0x1594e8(0xa7)](_0x11905a){const _0x579ff0={_0x2fe257:0xe5,_0x3ccbf4:0xd0,_0x52b565:0xde,_0x13c99c:0xdc,_0x11871a:0xd0},_0x4ee599=_0x1594e8,_0x2bfbe2=this[_0x4ee599(0xd6)]+_0x4ee599(_0x579ff0._0x2fe257)+this[_0x4ee599(0xa5)][_0x4ee599(_0x579ff0._0x3ccbf4)],_0x5439f7=new FakePage(this[_0x4ee599(_0x579ff0._0x52b565)],this[_0x4ee599(0xaf)],_0x2bfbe2,_0x11905a);this[_0x4ee599(0xa5)][_0x4ee599(_0x579ff0._0x13c99c)](_0x5439f7);const _0x4675c5=this['pageList'][_0x4ee599(_0x579ff0._0x11871a)]-0x1;for(const _0x42e5bf of this[_0x4ee599(0x8b)]){try{_0x42e5bf({'index':_0x4675c5,'url':_0x11905a});}catch{}}return _0x4675c5;}['closeFakePage'](_0x197389){const _0x75daee={_0x3936b1:0xa5,_0x2fc1c2:0xd0,_0x47e5a3:0xa5,_0x1618a8:0xd9},_0x3a41a7=_0x1594e8;if(_0x197389<0x0||_0x197389>=this[_0x3a41a7(0xa5)][_0x3a41a7(0xd0)])throw new DriverError(_0x3a41a7(0xcd),{'index':_0x197389,'available':this[_0x3a41a7(_0x75daee._0x3936b1)][_0x3a41a7(_0x75daee._0x2fc1c2)]});this[_0x3a41a7(_0x75daee._0x47e5a3)][_0x3a41a7(_0x75daee._0x1618a8)](_0x197389,0x1);}async[_0x1594e8(0xe1)](_0x19bf7d){const _0x515368={_0x4c929c:0x9f,_0x3e1bcc:0xe1,_0x2dd4b6:0xd0},_0x451ed4=_0x1594e8;this[_0x451ed4(_0x515368._0x4c929c)](_0x451ed4(_0x515368._0x3e1bcc),[_0x19bf7d]);if(!_0x19bf7d['steps'][_0x451ed4(_0x515368._0x2dd4b6)])throw new LocatorError('enterFrame\x20called\x20with\x20empty\x20locator',{'locator':_0x19bf7d});this['frameStack']['push'](_0x19bf7d);}async[_0x1594e8(0x88)](){const _0x19e789={_0x4e3d09:0x9f,_0x304712:0xbf,_0x25f265:0xd1},_0x29145a=_0x1594e8;this[_0x29145a(_0x19e789._0x4e3d09)](_0x29145a(0x88),[]);if(this[_0x29145a(_0x19e789._0x304712)]['length']===0x0)throw new DriverError(_0x29145a(_0x19e789._0x25f265),{});this[_0x29145a(0xbf)][_0x29145a(0x77)]();}async['setLocalStorage'](_0x376d88,_0x39e1f8){const _0x17d20b={_0x5507ee:0x9f,_0x281177:0xa2},_0x874f1a=_0x1594e8;this[_0x874f1a(_0x17d20b._0x5507ee)](_0x874f1a(0xd7),[_0x376d88,_0x39e1f8]),this[_0x874f1a(_0x17d20b._0x281177)][_0x376d88]=_0x39e1f8;}async[_0x1594e8(0xc0)](_0x50bae0){const _0x1e66bd={_0x1a360e:0xa2},_0x12e470=_0x1594e8;return this[_0x12e470(0x9f)]('getLocalStorage',[_0x50bae0]),this[_0x12e470(_0x1e66bd._0x1a360e)][_0x50bae0]??null;}async[_0x1594e8(0xcb)](_0x4d10d7,_0x1bcf38,_0x42437e){const _0x1906cb={_0x36a054:0x9f,_0x32e7ef:0xcb},_0x22e714=_0x1594e8;this[_0x22e714(_0x1906cb._0x36a054)](_0x22e714(_0x1906cb._0x32e7ef),[_0x4d10d7,_0x1bcf38,_0x42437e]),this[_0x22e714(0x70)][_0x4d10d7]=_0x1bcf38;}async[_0x1594e8(0x82)](_0x13a556){const _0x5bcd2d={_0x63c25e:0x82},_0x2e4c31=_0x1594e8;return this[_0x2e4c31(0x9f)](_0x2e4c31(_0x5bcd2d._0x63c25e),[_0x13a556]),this[_0x2e4c31(0x70)][_0x13a556]??null;}async[_0x1594e8(0xb1)](_0x76a791){const _0xc3bfbf=_0x1594e8;this[_0xc3bfbf(0x9f)](_0xc3bfbf(0xb1),[_0x76a791]);}async[_0x1594e8(0xe2)](_0x58a0dc){const _0x1af225=_0x1594e8;return this[_0x1af225(0x9f)](_0x1af225(0xe2),[_0x58a0dc]),void 0x0;}async['close'](){const _0x3483f9=_0x1594e8;this[_0x3483f9(0x9f)](_0x3483f9(0x7d),[]);}[_0x1594e8(0xab)](){const _0x592821=_0x1594e8;return this[_0x592821(0xbf)][_0x592821(0xd0)];}},FakeWebDriver=class{constructor(_0x3142ab={}){this['behavior']=_0x3142ab,this['recorder']=createRecorder();}['behavior'];static{__name(this,_0x1594e8(0xc3));}[_0x1594e8(0xc4)]=![];[_0x1594e8(0xde)];[_0x1594e8(0x97)]=[];async[_0x1594e8(0xb9)](_0x370837){const _0x3529ef={_0x564512:0xdc,_0x38c31a:0xbd,_0x56aac7:0xc4},_0x3f7204=_0x1594e8;this[_0x3f7204(0xde)][_0x3f7204(_0x3529ef._0x564512)]({'scope':_0x3f7204(_0x3529ef._0x38c31a),'method':_0x3f7204(0xb9),'args':[_0x370837]}),this[_0x3f7204(_0x3529ef._0x56aac7)]=!![];}async['newContext'](_0x542dd8){const _0x425c50={_0x41fd73:0xdc,_0x19784b:0xc4,_0x22265a:0x97},_0x52634a=_0x1594e8;this[_0x52634a(0xde)][_0x52634a(_0x425c50._0x41fd73)]({'scope':_0x52634a(0xbd),'method':_0x52634a(0xce),'args':[_0x542dd8]});if(!this[_0x52634a(_0x425c50._0x19784b)])throw new DriverError(_0x52634a(0x6d),{});const _0x414643=new FakeContext(this[_0x52634a(0xde)],this['behavior'],_0x52634a(0xb3)+this[_0x52634a(_0x425c50._0x22265a)]['length']);return this[_0x52634a(_0x425c50._0x22265a)][_0x52634a(_0x425c50._0x41fd73)](_0x414643),_0x414643;}async[_0x1594e8(0x7d)](){const _0x37df3f={_0x4606f6:0xde,_0x1bca71:0xdc,_0x300271:0x7d},_0x160540=_0x1594e8;this[_0x160540(_0x37df3f._0x4606f6)][_0x160540(_0x37df3f._0x1bca71)]({'scope':'driver','method':_0x160540(_0x37df3f._0x300271),'args':[]}),this['launched']=![];}[_0x1594e8(0xe4)](){return void 0x0;}async[_0x1594e8(0xa9)](){const _0x3a950f=_0x1594e8;throw new DriverError(_0x3a950f(0xb5),{});}[_0x1594e8(0xc7)](_0x3d0556){const _0x537ddb={_0x963da0:0x8d},_0x558d30=_0x1594e8;throw new DriverError(_0x558d30(_0x537ddb._0x963da0),{});}[_0x1594e8(0xcf)](){const _0x46dffe={_0x4be73c:0xde,_0x47e8e9:0xcf},_0x16f540=_0x1594e8;return this[_0x16f540(_0x46dffe._0x4be73c)][_0x16f540(_0x46dffe._0x47e8e9)]();}[_0x1594e8(0x92)](_0x3ce757){const _0xff05b0=_0x1594e8;return this['recorder']['calls']()[_0xff05b0(0x94)](_0x18507b=>_0x18507b[_0xff05b0(0x9b)]===_0x3ce757);}};export{FakeWebDriver};
|
|
1
|
+
const _0xeb371e=_0xb3c4;(function(_0x391074,_0x3b2f50){const _0x297e7b={_0x20e96c:0xc6,_0xed9668:0xd9,_0xa00b34:0xe4},_0x33b337=_0xb3c4,_0x4116e6=_0x391074();while(!![]){try{const _0x378cda=parseInt(_0x33b337(_0x297e7b._0x20e96c))/0x1*(-parseInt(_0x33b337(0xc1))/0x2)+parseInt(_0x33b337(_0x297e7b._0xed9668))/0x3+parseInt(_0x33b337(0x82))/0x4*(parseInt(_0x33b337(0xa2))/0x5)+-parseInt(_0x33b337(0x92))/0x6*(parseInt(_0x33b337(0x95))/0x7)+-parseInt(_0x33b337(0xa9))/0x8+-parseInt(_0x33b337(_0x297e7b._0xa00b34))/0x9+-parseInt(_0x33b337(0x8d))/0xa*(-parseInt(_0x33b337(0xc0))/0xb);if(_0x378cda===_0x3b2f50)break;else _0x4116e6['push'](_0x4116e6['shift']());}catch(_0x9a0051){_0x4116e6['push'](_0x4116e6['shift']());}}}(_0x291e,0x91a28));var __defProp=Object['defineProperty'],__name=(_0x33690d,_0x5212f9)=>__defProp(_0x33690d,'name',{'value':_0x5212f9,'configurable':!![]});function _0xb3c4(_0x172257,_0x34afe6){_0x172257=_0x172257-0x6f;const _0x291e59=_0x291e();let _0xb3c46c=_0x291e59[_0x172257];if(_0xb3c4['Lggrra']===undefined){var _0x4c22a9=function(_0x3c0f79){const _0x3759f3='abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+/=';let _0x33690d='',_0x5212f9='';for(let _0x18dd39=0x0,_0x48bc86,_0x3fee35,_0x482524=0x0;_0x3fee35=_0x3c0f79['charAt'](_0x482524++);~_0x3fee35&&(_0x48bc86=_0x18dd39%0x4?_0x48bc86*0x40+_0x3fee35:_0x3fee35,_0x18dd39++%0x4)?_0x33690d+=String['fromCharCode'](0xff&_0x48bc86>>(-0x2*_0x18dd39&0x6)):0x0){_0x3fee35=_0x3759f3['indexOf'](_0x3fee35);}for(let _0x5a5786=0x0,_0x48f7a2=_0x33690d['length'];_0x5a5786<_0x48f7a2;_0x5a5786++){_0x5212f9+='%'+('00'+_0x33690d['charCodeAt'](_0x5a5786)['toString'](0x10))['slice'](-0x2);}return decodeURIComponent(_0x5212f9);};_0xb3c4['CQLqGn']=_0x4c22a9,_0xb3c4['HewBEB']={},_0xb3c4['Lggrra']=!![];}const _0x8f7ef6=_0x291e59[0x0],_0x4d5b7c=_0x172257+_0x8f7ef6,_0x1d12a1=_0xb3c4['HewBEB'][_0x4d5b7c];return!_0x1d12a1?(_0xb3c46c=_0xb3c4['CQLqGn'](_0xb3c46c),_0xb3c4['HewBEB'][_0x4d5b7c]=_0xb3c46c):_0xb3c46c=_0x1d12a1,_0xb3c46c;}function subscribe(_0x18dd39,_0x48bc86){const _0x1c6392={_0xa501bb:0x93},_0x35b88d=_0xb3c4;return _0x18dd39[_0x35b88d(0x83)](_0x48bc86),()=>{const _0x19a220=_0x35b88d;_0x18dd39[_0x19a220(_0x1c6392._0xa501bb)](_0x48bc86);};}__name(subscribe,'subscribe');function _0x291e(){const _0x38c7c4=['y29VA2LLCW','D2fPDezVCK5HDMLNyxrPB24','Cg9WDxbpBKnSAwnR','C3rLChm','rMfRzvDLyKrYAxzLCG','BM8Gywn0AxzLihbHz2uGAw4Gy29UDgv4Da','z29cywnR','D3nfBMrWB2LUDa','ChjLC3m','mJr0BuHMDwS','ywrK','D2fPDezVCKXVywrtDgf0zq','Aw5WDxrwywX1zuj5rgvMyxvSDa','AxnwAxnPyMXL','y2fSBhngB3i','y3r4','C2nVCgu','zwXLBwvUDeHPBNrcEvjLzG','ywn0AxzLugfNzq','zNjVBq','ndK3mZbvtuvHzvK','y29UBMvJDfnOyxjLza','yMvOyxzPB3i','rMfRzunVBNrLEhq','ywn0AxzLswr4','ntq2y1bhtvvK','zgvSzxrL','BMv3q29UDgv4DcbJywXSzwqGyMvMB3jLigXHDw5JAcGP','mZqYnZLuqKDLDuS','pgrPDJ48l2rPDJ4','y2XVC2u','y29VA2LLu3rHDgu','C2vSzwn0t3b0Aw9U','rhjPDMvYrxjYB3i','A2LUza','Aw5PDgLHBfvYBa','yxr0CMLIDxrLC0j5rgvMyxvSDa','y29UC29SzuvUDhjPzxm','yxr0ywnOrxHPC3rPBMCGBM90ihn1ChbVCNrLzcbIEsbgywTLv2vIrhjPDMvY','Bg9JywXtDg9YywDL','CMvM','mJeWmtG1BuHpBuTn','y29UBMvJDfnOyxjLzcbUB3qGC3vWCg9YDgvKigj5iezHA2vxzwjeCML2zxi','y2fSBhm','y3vYCMvUDfvYBa','iJ48l2rPDJ4','DxbSB2fKrMLSzq','D2fPDezVCG','mJu4oda4sgrHzKLc','CMvJB3jK','y3jLyxrLuMvJB3jKzxi','C2nYzwvUC2HVDa','BMv3ugfNzuXPC3rLBMvYCW','zw50zxjgCMfTzsbJywXSzwqGD2L0AcbLBxb0EsbSB2nHDg9Y','ChvZAa','Bwv0Ag9K','y2HLy2S','C2nYzwvUC2HVDevSzw1LBNq','zxzHBhvHDgvpBKXVy2f0B3i','C2v0qwn0AxzLugfNzq','z2v0q29VA2LL','Bgf1BMnO','B3v0zxjive1m','zxzHBhvHDgu','zMfRzs1WBMC','z2v0qxr0CMLIDxrL','B25bzNrLCKnSAwnR','Aw5WDxrwywX1zq','Aw5UzxjuzxH0qNLezwzHDwX0','CMvJB3jKzxi','Dgv4DenVBNrLBNq','ndGYowX1s0zXqq','mZaWmJjzC1v4wLu','zw50zxjgCMfTzq','zxHPDezYyw1LignHBgXLzcb3AxrOig5VigzYyw1Lig9UihrOzsbZDgfJAW','zMfRzsb0AxrSzq','y2XPy2S','nJb3uKLRyvq','zhjHz0fUzerYB3a','DhLWzq','Bg9JywXtDg9YywDLu3rHDgu','BMv3q29UDgv4Da','zg91yMXLq2XPy2S','Ag92zxi','CMvSB2fK','BMv0D29YA0vUDhjPzxm','CgfNzuXPC3q','zxHPDezYyw1L','y2XVC2vgywTLugfNzq','Bwf5yMvuAhjVDW','Aw5ZCgvJDevSzw1LBNq','zhjPDMvY','CgfNzsbPBMrLEcbVDxqGB2yGCMfUz2u','lNbHz2u','Dgv4DenVBNrLBNrcEurLzMf1Bhq','C2nYB2XSsw50B1zPzxC','nJq5nZu1sffbrNbj','zNjHBwvtDgfJAW','C2v0tg9JywXtDg9YywDL','C3bSAwnL','AxneAxnHyMXLza','y291BNq','C2nYzwvUC2HVDej5DgvZ','ywjVDxq6yMXHBMS','Cg9W','BgvUz3rO','zMLSDgvY','nJa5mte2nhrWuNrSzG','C2f2zvn0B3jHz2vtDgf0zq','rMfRzvbHz2u','pgrPDIbKyxrHlxvUB3rLC3qTCMvMpsi','yxr0ywnOrxHPC3rPBMC','zw1PDezHA2vqB3b1Ca','AxneAxnHyMXLzej5rgvMyxvSDa','y2XPCgjVyxjKugfZDgu','Bgf1BMnOzwq','D2fPDezVCLrLEhq','zxjYB3jpBK5LEhrby3rPB24','Dw5JAgvJAW','Aw5UzxjuzxH0','z2v0tg9JywXtDg9YywDL','y2HLy2TLzfn0yxrLqNLezwzHDwX0','y29UDgv4Dhm','z29gB3j3yxjK'];_0x291e=function(){return _0x38c7c4;};return _0x291e();}import{UnotestError}from'@unotest/core';var DriverError=class extends UnotestError{static{__name(this,_0xeb371e(0x9a));}},LocatorError=class extends UnotestError{static{__name(this,'LocatorError');}};function createRecorder(){const _0x5a5b7c={_0x1241bf:0xaf},_0x9a35c2=_0xeb371e,_0x3fee35=[];let _0x482524=0x0;return{'push':__name(_0x5a5786=>_0x3fee35[_0x9a35c2(0xaf)]({..._0x5a5786,'seq':_0x482524++}),_0x9a35c2(_0x5a5b7c._0x1241bf)),'calls':__name(()=>_0x3fee35,_0x9a35c2(0xa4))};}__name(createRecorder,_0xeb371e(0xab));var FakePage=class{constructor(_0x48f7a2,_0x5d0fe5,_0xa4e6e5,_0x1a5a37){const _0x35d47c={_0x92e137:0xbe},_0x263e56=_0xeb371e;this[_0x263e56(_0x35d47c._0x92e137)]=_0x48f7a2,this[_0x263e56(0x8f)]=_0x5d0fe5,this[_0x263e56(0x89)]=_0xa4e6e5,this['currentUrl']=_0x1a5a37;}['recorder'];[_0xeb371e(0x8f)];['scope'];static{__name(this,_0xeb371e(0xe6));}['currentUrl'];[_0xeb371e(0xbb)];[_0xeb371e(0xaa)](_0x18f44c,_0x1505ea){const _0x2a59fc={_0x3cf297:0x89},_0x1e3458=_0xeb371e;this[_0x1e3458(0xbe)][_0x1e3458(0xaf)]({'scope':this[_0x1e3458(_0x2a59fc._0x3cf297)],'method':_0x18f44c,'args':_0x1505ea});}[_0xeb371e(0xd2)](){const _0x4cab15={_0x565260:0x8f,_0x8c58d5:0x72,_0x3f8a59:0x8f},_0x449e9c=_0xeb371e;if(this[_0x449e9c(_0x4cab15._0x565260)][_0x449e9c(_0x4cab15._0x8c58d5)]){const _0x3ba61d=this[_0x449e9c(_0x4cab15._0x3f8a59)]['errorOnNextAction'];this['behavior'][_0x449e9c(_0x4cab15._0x8c58d5)]=void 0x0;throw _0x3ba61d;}}['url'](){const _0x455a58={_0x3f2d48:0xa5},_0x47572a=_0xeb371e;return this[_0x47572a(_0x455a58._0x3f2d48)];}async['title'](){const _0x7bd92b=_0xeb371e;return this['record']('title',[]),_0x7bd92b(0xc4);}async[_0xeb371e(0xc5)](_0x3cb7e9,_0x37e85d){const _0x19527d={_0x46d339:0xaa},_0x14e271=_0xeb371e;this[_0x14e271(_0x19527d._0x46d339)](_0x14e271(0xc5),[_0x3cb7e9,_0x37e85d]),this[_0x14e271(0xd2)](),this['onAfterClick']?.();}async[_0xeb371e(0xcb)](_0x5ba6c4,_0x21a901){const _0x1f059d={_0x6ff9d6:0xcb},_0x246c0e=_0xeb371e;this['record'](_0x246c0e(_0x1f059d._0x6ff9d6),[_0x5ba6c4,_0x21a901]),this['maybeThrow']();}async['fill'](_0x94970,_0x14ef52,_0x1b05f2){const _0xce030f=_0xeb371e;this['record']('fill',[_0x94970,_0x14ef52,_0x1b05f2]),this[_0xce030f(0xd2)]();}async[_0xeb371e(0x81)](_0x45484c,_0xaba670,_0x5cc686){const _0x1f1c55={_0x40ef5c:0xaa,_0x2b65ea:0x81},_0x311d44=_0xeb371e;this[_0x311d44(_0x1f1c55._0x40ef5c)](_0x311d44(_0x1f1c55._0x2b65ea),[_0x45484c,_0xaba670,_0x5cc686]),this[_0x311d44(0xd2)]();}async[_0xeb371e(0xb1)](_0x5916b4,_0x34f874){const _0x39c3d3={_0x549dae:0xaa,_0x3d9581:0xb1},_0xc60765=_0xeb371e;this[_0xc60765(_0x39c3d3._0x549dae)](_0xc60765(_0x39c3d3._0x3d9581),[_0x5916b4,_0x34f874]),this['maybeThrow']();}async[_0xeb371e(0x73)](_0x22c30b,_0x5f43cf){const _0x49401c={_0x4fb9db:0x73},_0x5abb75=_0xeb371e;this['record'](_0x5abb75(_0x49401c._0x4fb9db),[_0x22c30b,_0x5f43cf]),this[_0x5abb75(0xd2)]();}async['selectOption'](_0x3fd549,_0x1dd747,_0x357d41){const _0x5c9c06={_0x36b268:0xd2},_0x2e17fc=_0xeb371e;this['record'](_0x2e17fc(0x99),[_0x3fd549,_0x1dd747,_0x357d41]),this[_0x2e17fc(_0x5c9c06._0x36b268)]();}async['hover'](_0x531ee8,_0x24bc30){const _0x1d2de8={_0x315c46:0xaa},_0x57ffa1=_0xeb371e;this[_0x57ffa1(_0x1d2de8._0x315c46)](_0x57ffa1(0xcc),[_0x531ee8,_0x24bc30]),this['maybeThrow']();}async['scrollIntoView'](_0x33d06e){const _0x48f507={_0x33acca:0xaa,_0x4275bb:0xd2},_0x3f1159=_0xeb371e;this[_0x3f1159(_0x48f507._0x33acca)](_0x3f1159(0xd8),[_0x33d06e]),this[_0x3f1159(_0x48f507._0x4275bb)]();}async[_0xeb371e(0xc7)](_0x17f1ea,_0x27ceb0,_0xc31a8b){const _0x55f913={_0x115d1f:0xaa,_0x5a7a7c:0xc7},_0x2471ab=_0xeb371e;this[_0x2471ab(_0x55f913._0x115d1f)](_0x2471ab(_0x55f913._0x5a7a7c),[_0x17f1ea,_0x27ceb0,_0xc31a8b]),this[_0x2471ab(0xd2)]();}async['uploadFile'](_0x3c8f55,_0x14bad0){const _0x3f9dbd={_0x268d8e:0xd2},_0x32208b=_0xeb371e;this[_0x32208b(0xaa)](_0x32208b(0xa7),[_0x3c8f55,_0x14bad0]),this[_0x32208b(_0x3f9dbd._0x268d8e)]();}async[_0xeb371e(0x6f)](_0x1e886e,_0x3860c2){const _0x70374f={_0x10e7e1:0x6f},_0x9ffcac=_0xeb371e;this['record'](_0x9ffcac(_0x70374f._0x10e7e1),[_0x1e886e,_0x3860c2]),this[_0x9ffcac(0xd2)]();}async[_0xeb371e(0xde)](_0x39c1e5){const _0x1f09c0={_0x5a50db:0xaa,_0x4889b1:0x8f},_0x79d00c=_0xeb371e;return this[_0x79d00c(_0x1f09c0._0x5a50db)](_0x79d00c(0xde),[_0x39c1e5]),this[_0x79d00c(_0x1f09c0._0x4889b1)]['countByDefault']??0x1;}async[_0xeb371e(0xbf)](_0x1cb7f7){const _0x16b2f1={_0x1fd120:0xbf,_0x27f15e:0x8f},_0x5e3f84=_0xeb371e;return this[_0x5e3f84(0xaa)](_0x5e3f84(_0x16b2f1._0x1fd120),[_0x1cb7f7]),this[_0x5e3f84(_0x16b2f1._0x27f15e)]['textContentByDefault']??'';}async[_0xeb371e(0x74)](_0x2db3e0){const _0x1402cf={_0x223a3f:0x74},_0x546184=_0xeb371e;return this['record'](_0x546184(_0x1402cf._0x223a3f),[_0x2db3e0]),this['behavior'][_0x546184(0xbd)]??this[_0x546184(0x8f)][_0x546184(0xd7)]??'';}async[_0xeb371e(0xbc)](_0x8195b3){const _0x5c2fed={_0x237c62:0xbc},_0x579598=_0xeb371e;return this[_0x579598(0xaa)](_0x579598(_0x5c2fed._0x237c62),[_0x8195b3]),this[_0x579598(0x8f)][_0x579598(0x85)]??'';}async['checkedState'](_0x178921){const _0x3f16fe={_0x467fef:0x8f,_0x181460:0x76},_0x566cbe=_0xeb371e;return this['record']('checkedState',[_0x178921]),this[_0x566cbe(_0x3f16fe._0x467fef)][_0x566cbe(_0x3f16fe._0x181460)]??null;}async[_0xeb371e(0x86)](_0x2b3c06){const _0x49a894={_0x588ac3:0x86},_0x3bd8cc=_0xeb371e;return this[_0x3bd8cc(0xaa)](_0x3bd8cc(_0x49a894._0x588ac3),[_0x2b3c06]),this[_0x3bd8cc(0x8f)]['isVisibleByDefault']??!![];}async[_0xeb371e(0xdd)](_0x5d3c86){const _0x21fca2={_0x18a236:0xaa},_0x2f6379=_0xeb371e;return this[_0x2f6379(_0x21fca2._0x18a236)](_0x2f6379(0xdd),[_0x5d3c86]),this['behavior'][_0x2f6379(0xea)]??![];}async['getAttribute'](_0x289b8f,_0x4a7253){const _0x552550={_0x3c3aad:0xaa},_0x401b6=_0xeb371e;return this[_0x401b6(_0x552550._0x3c3aad)](_0x401b6(0xba),[_0x289b8f,_0x4a7253]),this['behavior'][_0x401b6(0x9d)]?.[_0x4a7253]??null;}async['waitFor'](_0x3a3658,_0x1ca9aa){const _0x4584cf={_0x1ffc3b:0xa8},_0x4e034c=_0xeb371e;this[_0x4e034c(0xaa)](_0x4e034c(_0x4584cf._0x1ffc3b),[_0x3a3658,_0x1ca9aa]);}async['waitForUrl'](_0x3e4613,_0x12e43b){this['record']('waitForUrl',[_0x3e4613,_0x12e43b]);}async[_0xeb371e(0x71)](_0x5b39fe,_0x1731a7){const _0x27c885=_0xeb371e;this[_0x27c885(0xaa)]('waitForText',[_0x5b39fe,_0x1731a7]);}async[_0xeb371e(0x7a)](_0x548be4){const _0xf8e2b0={_0x1453d8:0x7a},_0x2f6fc3=_0xeb371e;this['record'](_0x2f6fc3(_0xf8e2b0._0x1453d8),[_0x548be4]);}async[_0xeb371e(0x84)](_0x11a43b,_0x1f9246){const _0x46f419=_0xeb371e;this['record'](_0x46f419(0x84),[_0x11a43b,_0x1f9246]);}async['goto'](_0x5442b4,_0x2c0ab8){const _0x17c272={_0x1600e9:0xaa,_0x15a117:0xa5},_0x50a2f5=_0xeb371e;this[_0x50a2f5(_0x17c272._0x1600e9)]('goto',[_0x5442b4,_0x2c0ab8]),this[_0x50a2f5(_0x17c272._0x15a117)]=_0x5442b4;}async[_0xeb371e(0xcd)](_0x474bc2){const _0x4f6d75=_0xeb371e;this['record'](_0x4f6d75(0xcd),[_0x474bc2]);}async[_0xeb371e(0x7f)](_0x416866){this['record']('goBack',[_0x416866]);}async[_0xeb371e(0x78)](_0x513bec){const _0x566ffe=_0xeb371e;this[_0x566ffe(0xaa)](_0x566ffe(0x78),[_0x513bec]);}async[_0xeb371e(0xb8)](_0x7452ca){const _0x56935b={_0x505c3d:0x8f},_0x1387a5=_0xeb371e;return this[_0x1387a5(0xaa)](_0x1387a5(0xb8),[_0x7452ca]),this[_0x1387a5(_0x56935b._0x505c3d)]['evaluateResult'];}async[_0xeb371e(0xb3)](_0x35d2bc,_0x52a8b3){const _0x141068={_0x12eab7:0xb3},_0x159d67=_0xeb371e;return this['record'](_0x159d67(_0x141068._0x12eab7),[_0x35d2bc,_0x52a8b3]),void 0x0;}async[_0xeb371e(0xd3)](_0x18b4a0){const _0x5ae42f={_0x252690:0x9b,_0x4f1d35:0xa1},_0x10ffca=_0xeb371e;this[_0x10ffca(0xaa)](_0x10ffca(0xd3),[_0x18b4a0]);if(_0x18b4a0['steps'][_0x10ffca(0xe2)]!==0x1||_0x18b4a0['steps'][0x0][_0x10ffca(_0x5ae42f._0x252690)]!==_0x10ffca(0xa1))return null;const _0x164cb3=_0x18b4a0['steps'][0x0][_0x10ffca(_0x5ae42f._0x4f1d35)],_0x14287c=this['behavior'][_0x10ffca(0x8a)]?.[_0x164cb3];return _0x14287c??null;}async[_0xeb371e(0xac)](_0x65b93f){const _0x127da2={_0x2c3b4a:0xac,_0x299656:0xc8},_0xbf5836=_0xeb371e;return this['record'](_0xbf5836(_0x127da2._0x2c3b4a),[_0x65b93f]),this[_0xbf5836(0xdf)](_0x65b93f?.[_0xbf5836(_0x127da2._0x299656)]);}async[_0xeb371e(0xb2)](_0xa976cd,_0xa1dbc8){const _0x1faedd={_0x58a84d:0xaa,_0x443549:0xb2,_0x4360a5:0xc8},_0x273dcd=_0xeb371e;return this[_0x273dcd(_0x1faedd._0x58a84d)](_0x273dcd(_0x1faedd._0x443549),[_0xa976cd,_0xa1dbc8]),this[_0x273dcd(0xdf)](_0xa1dbc8?.[_0x273dcd(_0x1faedd._0x4360a5)]);}['screenshotBytes'](_0x3ae619){const _0xcb565e=_0xeb371e,_0x48ae4f=this[_0xcb565e(0x8f)][_0xcb565e(0xdf)];if(_0x48ae4f===void 0x0)return Buffer[_0xcb565e(0x8c)](_0xcb565e(0xb9));return typeof _0x48ae4f==='function'?_0x48ae4f(_0x3ae619):_0x48ae4f;}async[_0xeb371e(0xb7)](_0x3e4c47){const _0x48ad9c={_0x47b939:0xaa,_0x514620:0xb7,_0x21eac7:0x7c,_0x25586b:0x8f,_0x2cde9a:0xe7,_0x1a4531:0xa6},_0x422b30=_0xeb371e;this[_0x422b30(_0x48ad9c._0x47b939)](_0x422b30(_0x48ad9c._0x514620),[_0x3e4c47]);if(_0x3e4c47[_0x422b30(_0x48ad9c._0x21eac7)]['length']===0x1&&_0x3e4c47[_0x422b30(_0x48ad9c._0x21eac7)][0x0][_0x422b30(0x9b)]===_0x422b30(0xa1)){const _0x4d7260=_0x3e4c47['steps'][0x0][_0x422b30(0xa1)];return this[_0x422b30(_0x48ad9c._0x25586b)]['outerHtmlByRef']?.[_0x4d7260]??_0x422b30(_0x48ad9c._0x2cde9a)+_0x4d7260+_0x422b30(_0x48ad9c._0x1a4531);}return _0x422b30(0x96);}},FakeContext=class{constructor(_0x7b993a,_0x17f830,_0xab0a0c){const _0x439afb={_0x37ed4d:0x9c,_0x157837:0x7b,_0x106f75:0xa0},_0x2927b6={_0x28db08:0xe9,_0x1668f4:0x7b},_0x4c0b35=_0xeb371e;this['recorder']=_0x7b993a,this[_0x4c0b35(0x8f)]=_0x17f830,this[_0x4c0b35(0x89)]=_0xab0a0c;const _0x12ff9e=new FakePage(_0x7b993a,_0x17f830,_0xab0a0c+'.page0',_0x17f830[_0x4c0b35(_0x439afb._0x37ed4d)]??_0x4c0b35(0xe0));_0x17f830[_0x4c0b35(_0x439afb._0x157837)]&&(_0x12ff9e['onAfterClick']=()=>{const _0x5c9815=_0x4c0b35;this[_0x5c9815(_0x2927b6._0x28db08)](_0x17f830[_0x5c9815(_0x2927b6._0x1668f4)]);}),this[_0x4c0b35(0xcf)]=[_0x12ff9e],this[_0x4c0b35(0xc9)]={..._0x17f830[_0x4c0b35(_0x439afb._0x106f75)]??{}},this[_0x4c0b35(0x98)]={..._0x17f830[_0x4c0b35(0x79)]??{}};}['recorder'];[_0xeb371e(0x8f)];[_0xeb371e(0x89)];static{__name(this,_0xeb371e(0x90));}[_0xeb371e(0xcf)];[_0xeb371e(0x91)]=0x0;[_0xeb371e(0xda)]=[];[_0xeb371e(0xc9)];[_0xeb371e(0x98)];['newPageListeners']=new Set();['record'](_0x2b6643,_0x6af09f){const _0x5a2d93={_0x37b648:0x89},_0x53f2d5=_0xeb371e;this[_0x53f2d5(0xbe)][_0x53f2d5(0xaf)]({'scope':this[_0x53f2d5(_0x5a2d93._0x37b648)],'method':_0x2b6643,'args':_0x6af09f});}['pages'](){const _0x4f3839={_0xfe5ea9:0xcf},_0x33c795=_0xeb371e;return this[_0x33c795(_0x4f3839._0xfe5ea9)];}[_0xeb371e(0x8b)](){const _0x3c4633={_0x19e020:0x7e,_0x1e93f8:0x91},_0x1d1a33=_0xeb371e,_0x21a41f=this['pageList'][this['activeIdx']];if(!_0x21a41f)throw new DriverError(_0x1d1a33(_0x3c4633._0x19e020),{'activeIdx':this[_0x1d1a33(_0x3c4633._0x1e93f8)]});return _0x21a41f;}['consoleEntries'](){const _0x3d8221={_0x29fd01:0x8f,_0x1289f9:0x9e},_0x5168a5=_0xeb371e;return this[_0x5168a5(_0x3d8221._0x29fd01)][_0x5168a5(_0x3d8221._0x1289f9)]??[];}[_0xeb371e(0xce)](){const _0x435858={_0xaa8716:0xce},_0x1ba94e=_0xeb371e;return this['behavior'][_0x1ba94e(_0x435858._0xaa8716)]??[];}async[_0xeb371e(0xb4)](_0x31a406){const _0x16c1d8={_0x49edec:0xda},_0x2c0091=_0xeb371e;this[_0x2c0091(0xaa)](_0x2c0091(0xb4),[_0x31a406]);if(_0x31a406<0x0||_0x31a406>=this['pageList'][_0x2c0091(0xe2)])throw new DriverError('page\x20index\x20out\x20of\x20range',{'index':_0x31a406,'available':this[_0x2c0091(0xcf)]['length']});this[_0x2c0091(0x91)]=_0x31a406,this[_0x2c0091(_0x16c1d8._0x49edec)]['length']=0x0;}['onNewPage'](_0x36e159){const _0x3d615a=_0xeb371e;return subscribe(this[_0x3d615a(0xad)],_0x36e159);}['emitFakePopup'](_0x38495b){const _0x2124a3={_0x407c7c:0xe2,_0x494744:0xaf,_0x350269:0xcf},_0x5d7f75=_0xeb371e,_0x29e286=this['scope']+_0x5d7f75(0xd6)+this['pageList'][_0x5d7f75(_0x2124a3._0x407c7c)],_0x2cadab=new FakePage(this[_0x5d7f75(0xbe)],this['behavior'],_0x29e286,_0x38495b);this['pageList'][_0x5d7f75(_0x2124a3._0x494744)](_0x2cadab);const _0x499aa7=this[_0x5d7f75(_0x2124a3._0x350269)]['length']-0x1;for(const _0x16808a of this['newPageListeners']){try{_0x16808a({'index':_0x499aa7,'url':_0x38495b});}catch{}}return _0x499aa7;}[_0xeb371e(0xd1)](_0x56a2e1){const _0x10d26d={_0x2c71bc:0xcf,_0xfcde9c:0xd5,_0x2de1f4:0xe2,_0x505462:0xcf,_0x20fe9d:0xdc},_0x5202e5=_0xeb371e;if(_0x56a2e1<0x0||_0x56a2e1>=this[_0x5202e5(_0x10d26d._0x2c71bc)][_0x5202e5(0xe2)])throw new DriverError(_0x5202e5(_0x10d26d._0xfcde9c),{'index':_0x56a2e1,'available':this['pageList'][_0x5202e5(_0x10d26d._0x2de1f4)]});this[_0x5202e5(_0x10d26d._0x505462)][_0x5202e5(_0x10d26d._0x20fe9d)](_0x56a2e1,0x1);}async[_0xeb371e(0xc2)](_0x71cff0){const _0x572c49={_0x391e9a:0xaa,_0x23d572:0xc2,_0x160f26:0xae,_0x564484:0xaf},_0x2fd9c2=_0xeb371e;this[_0x2fd9c2(_0x572c49._0x391e9a)](_0x2fd9c2(_0x572c49._0x23d572),[_0x71cff0]);if(!_0x71cff0['steps'][_0x2fd9c2(0xe2)])throw new LocatorError(_0x2fd9c2(_0x572c49._0x160f26),{'locator':_0x71cff0});this['frameStack'][_0x2fd9c2(_0x572c49._0x564484)](_0x71cff0);}async[_0xeb371e(0xd0)](){const _0x25866a={_0x5e3e68:0xaa,_0x26ab32:0xd0,_0x4678ad:0xda,_0x190697:0xe2,_0x31df7c:0xc3},_0x2dc0f7=_0xeb371e;this[_0x2dc0f7(_0x25866a._0x5e3e68)](_0x2dc0f7(_0x25866a._0x26ab32),[]);if(this[_0x2dc0f7(_0x25866a._0x4678ad)][_0x2dc0f7(_0x25866a._0x190697)]===0x0)throw new DriverError(_0x2dc0f7(_0x25866a._0x31df7c),{});this[_0x2dc0f7(0xda)][_0x2dc0f7(0xe1)]();}async[_0xeb371e(0xdb)](_0x11279e,_0x321d59){const _0x409a46={_0xdd481b:0xaa,_0x20189b:0xdb},_0x4d9e96=_0xeb371e;this[_0x4d9e96(_0x409a46._0xdd481b)](_0x4d9e96(_0x409a46._0x20189b),[_0x11279e,_0x321d59]),this['localStorageState'][_0x11279e]=_0x321d59;}async[_0xeb371e(0x75)](_0x5ce2d0){const _0x32a810={_0x491a7d:0xc9},_0x3cd0d9=_0xeb371e;return this['record']('getLocalStorage',[_0x5ce2d0]),this[_0x3cd0d9(_0x32a810._0x491a7d)][_0x5ce2d0]??null;}async['setCookie'](_0x26b21d,_0x1df803,_0x22d70a){const _0xad8337={_0x27b97d:0xaa,_0x436ce7:0x98},_0x55f30f=_0xeb371e;this[_0x55f30f(_0xad8337._0x27b97d)]('setCookie',[_0x26b21d,_0x1df803,_0x22d70a]),this[_0x55f30f(_0xad8337._0x436ce7)][_0x26b21d]=_0x1df803;}async['getCookie'](_0x10d291){const _0x5af258={_0x407e6c:0xaa,_0x3f4013:0x98},_0x4f3cd3=_0xeb371e;return this[_0x4f3cd3(_0x5af258._0x407e6c)](_0x4f3cd3(0xb5),[_0x10d291]),this[_0x4f3cd3(_0x5af258._0x3f4013)][_0x10d291]??null;}async[_0xeb371e(0xe5)](_0xcd59c){const _0x4eab6c=_0xeb371e;this[_0x4eab6c(0xaa)](_0x4eab6c(0xe5),[_0xcd59c]);}async[_0xeb371e(0xb8)](_0x50f86c){const _0x12e487=_0xeb371e;return this[_0x12e487(0xaa)]('evaluate',[_0x50f86c]),void 0x0;}async[_0xeb371e(0x97)](){const _0x1e34f2=_0xeb371e;this[_0x1e34f2(0xaa)]('close',[]);}['frameDepth'](){const _0x888fa5={_0x1a9e60:0xe2},_0x44dfcf=_0xeb371e;return this[_0x44dfcf(0xda)][_0x44dfcf(_0x888fa5._0x1a9e60)];}},FakeWebDriver=class{constructor(_0xa4c90a={}){const _0x1180bd=_0xeb371e;this[_0x1180bd(0x8f)]=_0xa4c90a,this[_0x1180bd(0xbe)]=createRecorder();}[_0xeb371e(0x8f)];static{__name(this,_0xeb371e(0x7d));}[_0xeb371e(0x70)]=![];[_0xeb371e(0xbe)];['contexts']=[];async[_0xeb371e(0xb6)](_0x4d8019){const _0x214f68={_0x2b8911:0xb6,_0x192258:0x70},_0x220fab=_0xeb371e;this[_0x220fab(0xbe)][_0x220fab(0xaf)]({'scope':'driver','method':_0x220fab(_0x214f68._0x2b8911),'args':[_0x4d8019]}),this[_0x220fab(_0x214f68._0x192258)]=!![];}async[_0xeb371e(0xca)](_0x4810da){const _0x14164c={_0x26a739:0xbe,_0x5eadfc:0xd4,_0xfc1459:0xbe,_0x53ea15:0x88,_0x371b08:0x77,_0x1f039f:0xe2,_0xc32d57:0x77},_0x4f750a=_0xeb371e;this[_0x4f750a(_0x14164c._0x26a739)][_0x4f750a(0xaf)]({'scope':_0x4f750a(_0x14164c._0x5eadfc),'method':_0x4f750a(0xca),'args':[_0x4810da]});if(!this['launched'])throw new DriverError(_0x4f750a(0x94),{});const _0x4255a2=new FakeContext(this[_0x4f750a(_0x14164c._0xfc1459)],this[_0x4f750a(0x8f)],_0x4f750a(_0x14164c._0x53ea15)+this[_0x4f750a(_0x14164c._0x371b08)][_0x4f750a(_0x14164c._0x1f039f)]);return this[_0x4f750a(_0x14164c._0xc32d57)]['push'](_0x4255a2),_0x4255a2;}async[_0xeb371e(0x97)](){const _0x26c100={_0x5caeb9:0xd4},_0x52e274=_0xeb371e;this[_0x52e274(0xbe)]['push']({'scope':_0x52e274(_0x26c100._0x5caeb9),'method':'close','args':[]}),this['launched']=![];}[_0xeb371e(0x80)](){return void 0x0;}async[_0xeb371e(0x8e)](){const _0x1d6178=_0xeb371e;throw new DriverError(_0x1d6178(0xa3),{});}[_0xeb371e(0xe8)](_0x1ed45f){const _0x1ccc28=_0xeb371e;throw new DriverError(_0x1ccc28(0x9f),{});}[_0xeb371e(0xa4)](){const _0x146a5a=_0xeb371e;return this['recorder'][_0x146a5a(0xa4)]();}[_0xeb371e(0x87)](_0x1a7f57){const _0x55ccfa={_0x2de913:0xe3},_0x1f5609=_0xeb371e;return this['recorder']['calls']()[_0x1f5609(_0x55ccfa._0x2de913)](_0x2b40fd=>_0x2b40fd[_0x1f5609(0xb0)]===_0x1a7f57);}};export{FakeWebDriver};
|
package/dist/dsl/index.d.ts
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import { j as LocatorValue, W as WebDriver, D as DriverContext, e as DriverPage } from '../interfaces-
|
|
2
|
-
export { k as LocatorStep, l as appendStep, m as describeLocator, n as isLocatorValue, r as rootedAt } from '../interfaces-
|
|
3
|
-
import { Matcher, RegexLiteral, JudgeRequest, JudgeVerdict } from '@unotest/protocol';
|
|
1
|
+
import { j as LocatorValue, W as WebDriver, D as DriverContext, e as DriverPage } from '../interfaces-B34N4rfI.js';
|
|
2
|
+
export { k as LocatorStep, l as appendStep, m as describeLocator, n as isLocatorValue, r as rootedAt } from '../interfaces-B34N4rfI.js';
|
|
3
|
+
import { Matcher, RegexLiteral, JudgeRequest, JudgeVerdict, SoftFailureRecord } 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';
|
|
6
6
|
import { SandboxConfig } from '../config/schema.js';
|
|
7
7
|
import { RuntimeExecState } from '@unotest/core';
|
|
8
|
-
export { L as LintDiagnostic, b as LintOptions, a as LintSeverity, l as lintAst } from '../linter-
|
|
8
|
+
export { L as LintDiagnostic, b as LintOptions, a as LintSeverity, l as lintAst } from '../linter-Yf4gPe5J.js';
|
|
9
9
|
import 'zod';
|
|
10
10
|
import '@unotest/dsl';
|
|
11
11
|
|
|
@@ -106,6 +106,18 @@ interface JudgeVerdictSink {
|
|
|
106
106
|
record(record: JudgeVerdictRecord): Promise<void>;
|
|
107
107
|
}
|
|
108
108
|
|
|
109
|
+
interface NoteRecord {
|
|
110
|
+
label: string;
|
|
111
|
+
/** The value as text: strings as-is, everything else JSON. The sink
|
|
112
|
+
* applies the journal cap; the DSL layer does not know the limit. */
|
|
113
|
+
text: string;
|
|
114
|
+
}
|
|
115
|
+
interface AnnotationSink {
|
|
116
|
+
/** Must not throw on sink faults — a note must never fail the step. */
|
|
117
|
+
note(record: NoteRecord): Promise<void>;
|
|
118
|
+
log(text: string): Promise<void>;
|
|
119
|
+
}
|
|
120
|
+
|
|
109
121
|
type FrameFormat = "png" | "webp";
|
|
110
122
|
|
|
111
123
|
interface ScreenshotSink {
|
|
@@ -152,6 +164,10 @@ interface TestRuntimeDeps {
|
|
|
152
164
|
* wires it to the run's steps.jsonl; absent in ad-hoc / explore
|
|
153
165
|
* runtimes (the verdict then lives only in the assertion error). */
|
|
154
166
|
readonly judgeVerdicts?: JudgeVerdictSink;
|
|
167
|
+
/** Sink for `note(label, value)` and `log(...)` — the CLI runner wires
|
|
168
|
+
* it to the run's steps.jsonl; absent in ad-hoc / explore runtimes
|
|
169
|
+
* (`log` still reaches the logger, `note` is logged in its place). */
|
|
170
|
+
readonly annotations?: AnnotationSink;
|
|
155
171
|
}
|
|
156
172
|
declare class TestRuntime {
|
|
157
173
|
readonly runId: string;
|
|
@@ -163,6 +179,7 @@ declare class TestRuntime {
|
|
|
163
179
|
readonly screenshots?: ScreenshotSink;
|
|
164
180
|
readonly judge?: Judge;
|
|
165
181
|
readonly judgeVerdicts?: JudgeVerdictSink;
|
|
182
|
+
readonly annotations?: AnnotationSink;
|
|
166
183
|
private readonly variables;
|
|
167
184
|
private readonly nowFn;
|
|
168
185
|
private readonly scope;
|
|
@@ -240,12 +257,24 @@ interface ActiveRuntime {
|
|
|
240
257
|
/** Label of the enclosing `step("…")` block, when the failing
|
|
241
258
|
* statement ran inside one — the human-readable intent for reports. */
|
|
242
259
|
stepLabel?: string;
|
|
260
|
+
/** Evaluated `{tag}` of that block — the case a data-driven step was on. */
|
|
261
|
+
stepTag?: string;
|
|
262
|
+
/** Set once the enclosing `step.soft(...)` closed over this failure:
|
|
263
|
+
* the run went on, this is not where it stopped. */
|
|
264
|
+
soft?: boolean;
|
|
243
265
|
error: {
|
|
244
266
|
message: string;
|
|
245
267
|
stack?: string;
|
|
246
268
|
details?: unknown;
|
|
247
269
|
};
|
|
248
270
|
} | null;
|
|
271
|
+
/** Every `step.soft(...)` block that failed so far, in run order. The
|
|
272
|
+
* first one is the moment the failure bundle shows. */
|
|
273
|
+
softFailures: SoftFailureRecord[];
|
|
274
|
+
/** True between the innermost step-end failure and the next step-start:
|
|
275
|
+
* the same error is closing enclosing statements, `lastFailure` stays
|
|
276
|
+
* on the statement that raised it. */
|
|
277
|
+
unwinding: boolean;
|
|
249
278
|
lastResult: RunResult | null;
|
|
250
279
|
createdAt: number;
|
|
251
280
|
/** Active TTL timer (only when state is paused-failure). */
|
|
@@ -268,6 +297,7 @@ interface RuntimeSnapshot {
|
|
|
268
297
|
activePageIndex: number | null;
|
|
269
298
|
lastEvent: ExecutionEvent | null;
|
|
270
299
|
lastFailure: ActiveRuntime['lastFailure'];
|
|
300
|
+
softFailures: readonly SoftFailureRecord[];
|
|
271
301
|
lastResult: RunResult | null;
|
|
272
302
|
}
|
|
273
303
|
interface TestRuntimeManagerDeps {
|