@mablhq/mabl-cli 1.53.4 → 1.54.3
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/README.md +4 -4
- package/browserLauncher/playwrightBrowserLauncher/chromium/chromiumFrameDelegate.js +5 -2
- package/browserLauncher/playwrightBrowserLauncher/firefox/firefoxFrameDelegate.js +7 -0
- package/browserLauncher/playwrightBrowserLauncher/nonChromium/nonChromiumAbstractFrameDelegate.js +3 -0
- package/browserLauncher/playwrightBrowserLauncher/playwrightDom.js +2 -2
- package/browserLauncher/playwrightBrowserLauncher/playwrightFrame.js +1 -1
- package/core/trainer/trainingSessions-types.js +5 -0
- package/domUtil/index.js +1 -1
- package/execution/index.js +1 -1
- package/execution/index.js.LICENSE.txt +1 -1
- package/mablApi/index.js +1 -1
- package/mablscriptFind/index.js +1 -1
- package/mablscriptFind/index.js.LICENSE.txt +2 -0
- package/package.json +3 -3
- package/proxy/index.js +1 -1
- package/proxy/index.js.LICENSE.txt +9 -2
- package/proxy/lib/xpath.js +1 -1
- package/resources/mablFind.js +1 -1
- package/resources/popupDismissal.js +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
(()=>{"use strict";var e={d:(t,n)=>{for(var i in n)e.o(n,i)&&!e.o(t,i)&&Object.defineProperty(t,i,{enumerable:!0,get:n[i]})},o:(e,t)=>Object.prototype.hasOwnProperty.call(e,t),r:e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})}},t={};e.r(t),e.d(t,{detectAndDismissPopupCandidates:()=>y,elementsByHigherZIndex:()=>a,elementsInFrontCount:()=>I,fireClickEvent:()=>h,fireDoubleClickEvent:()=>f,fireRightClickEvent:()=>g,getAllElementsAbove:()=>v,getOverlappingElements:()=>b});const n=750,i="auto",o=.95,r=["close","dismiss","exit","not at this time","no thanks","no, thanks","i, agree","i agree"],s=[{attributeName:"className",matchFunction:u},{attributeName:"name",matchFunction:u},{attributeName:"id",matchFunction:u},{attributeName:"href",matchFunction:u},{attributeName:"innerText",matchFunction:function(e,t){const n=new RegExp(`\\b${t}\\b`);return!!e.toLowerCase().match(n)}}];function a(e){return Array.from(document.querySelectorAll("body *")).reduce(((t,n)=>{const i=parseFloat(globalThis.getComputedStyle(n).zIndex);return!Number.isNaN(i)&&i>=e&&(t.has(i)?t.get(i).push(n):t.set(i,[n])),t}),new Map)}function c(e){const t=e=>void 0===e||"html"===e.tagName.toLowerCase();let n=e;for(;!t(n);){const e=globalThis.getComputedStyle(n).zIndex;if(e&&e!==i)return parseInt(e,10);n=(null==n?void 0:n.parentElement)?n.parentElement:void 0}return 0}function l(e){let t=[e];return Array.from(e.children).forEach((e=>{t=t.concat(l(e))})),t}function u(e,t){return e.toLowerCase().includes(t)}function d(e){const t=[];return e.forEach((e=>{const n=[],i=[];e.elements.forEach((e=>{var t;(null==e?void 0:e.offsetParent)&&(["BUTTON","A","DIV"].includes(null===(t=e.tagName)||void 0===t?void 0:t.toUpperCase())&&function(e){let t=0;return s.forEach((n=>{r.forEach((i=>{e.getAttribute(n.attributeName)&&n.matchFunction(e.getAttribute(n.attributeName),i)&&(t+=1)}))})),t}(e)&&!i.includes(e)?i.push(e):function(e){if(e.getBoundingClientRect){const t=e.getBoundingClientRect(),n=t.width/globalThis.innerWidth,i=t.height/globalThis.innerHeight;return n>o&&i>o}return!1}(e)&&n.push(e))})),t.push({zIndex:e.zIndex,actionableElements:i,domCovering:n,dismissedStatus:!1,elementsInFront:0})})),t}function m(e,t,n=!1){const i=e.getBoundingClientRect(),o=i.height/2,r=n?1:i.width/2,s="contextmenu"===t?2:0,a=new MouseEvent(t,{bubbles:!0,cancelable:!0,view:window,detail:0,screenX:i.left+r,screenY:i.top+o,clientX:e.clientLeft+r,clientY:e.clientTop+o,ctrlKey:!1,altKey:!1,shiftKey:!1,metaKey:!1,button:s,relatedTarget:void 0});e.dispatchEvent(a)}function f(e){h(e,!1),h(e,!1),m(e,"dblclick")}function h(e,t=!1){m(e,"click",t)}function g(e,t=!1){m(e,"contextmenu",t)}function b(e){const{x:t,y:n}={x:(i=e.getBoundingClientRect()).left+i.width/2,y:i.top+i.height/2};var i;const o=document.elementsFromPoint(t,n),r=o.findIndex((t=>t===e));return r?o.slice(0,r):[]}function p(e){return new Promise((t=>setTimeout(t,e)))}function v(e,t){if(0===t.length)return[];const n=c(e),i=Math.min(...null==t?void 0:t.map((e=>c(e))));if(i<=n)return[];const o=a(i),r=Array.from(o).map((([e,t])=>({zIndex:e,elements:t.flatMap(l).reverse()})));return r.sort(((e,t)=>t.zIndex-e.zIndex)),r}async function y(e){try{let t=b(e);const i=t.length;if(0===i)return{elementsInFront:0,dismissedStatus:!1};const o=async function(t,o){for(const r of t)if(h(r,o),await p(n),b(e).length<i)return!0;return!1};let r=v(e,t);const s=d(r);for(const e of s){let t=await o(e.domCovering,!0);if(t||(t=await o(e.actionableElements,!1)),t)return{dismissedStatus:!0,elementsInFront:0}}t=b(e),r=v(e,t);const a=d(r),c=a.length?a[0]:{zIndex:0,elementsInFront:0,dismissedStatus:!1,domCovering:[],actionableElements:[]};return c.elementsInFront=t.length,c.dismissedStatus=!1,{dismissedStatus:c.dismissedStatus,elementsInFront:c.elementsInFront}}catch(e){return{elementsInFront:0,dismissedStatus:!1,error:e.toString()}}}function I(e){return b(e).length}window.popupDismissal=t})();
|