Web Automation Tools - Issues with hidden pages and LavaMoat/XPath #2615
Unanswered
CyranoRostand
asked this question in
Q&A
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Hello Everyone,
I am doing some web automation using a tool similar to Selenium. I've been using the MetaMask E2E page for testing. The flow will "press" a transaction button and then (hopefully) Confirm the transaction via the MM extension pop-up.
This tool has the ability to Switch windows using the tab title as a target. I could not figure out why it would always "find" a MetaMask page even if the pop-up was not displayed. It appears that it's actually finding the non-visible page MM uses for Snaps, etc. It took a while to figure this out as that hidden page is not well documented. I was motivated to look further when I executed a simple JavaScript line "return document.title" and got "MetaMask Offscreen Page" as the title. In researching what little I could find pointed to that non-visible page being used by the Snaps.
On a related challenge I have not been able to execute any Xpath to locate buttons, etc. on the MetaMask pop-up. I get a LavaMoat scuttling error. I'm assuming that the security measures are blocking tools like Selenium from using these Xpath locators directly on the pop-up window.
It's been a time consuming challenge because you can locate with Xpath using the browser's dev tools. It works just fine. But the vendor automation tools cause an error. The vendor insists that if you can find it from the console you can find it with their tool but I don't think that's 100% true. Unfortunately I don't know enough about the architecture of MetaMask to dispute their claim.
So I'm really here to see if I can get a bit of background on these esoteric parts of the MM environment.
Thanks!
All reactions