ChainSafe / dappeteer

[DEPRECATED]🏌🏼‍E2E testing for dApps using Puppeteer + MetaMask
Other
490 stars 151 forks source link

fix: add evaluate element click for closeWhatsNewModal #346

Closed marijanabevanda closed 9 months ago

marijanabevanda commented 10 months ago

Short description of work done Fixing 'Node is Detached from Document' Error in Puppeteer/Dappeteer Code: Refactoring closeWhatsNewModal Logic

PR Checklist

Changes

I encountered an intermittent 'Node is detached from document' error while using the closeWhatsNewModal method. This issue occurred sporadically due to the dynamic nature of the application, where the close button was deleted and recreated.

To address this problem, I implemented a solution similar to what was used in the closePopup method. Specifically, I introduced a new method called evaluateElementClick that contains the necessary logic. This method includes a 1-second delay to handle scenarios where elements are dynamically recreated. Both closePopup and closeWhatsNewModal methods now use evaluateElementClick.

(Added new pull request because last wasn't working with cla)

Error solved: image

Issues

Closes #

marijanabevanda commented 9 months ago

I don't know why Playwright is failing. The error seems (and should be) unrelated to my recent changes, and I've also encountered another on the master branch.

Playwright error: image

Local error on master branch: image

irubido commented 9 months ago

I don't know why Playwright is failing. The error seems (and should be) unrelated to my recent changes, and I've also encountered another on the master branch.

Playwright error: image

Local error on master branch: image

I'm aware of that issue, working on a dappeter update to latest mm version, so it will be addressed in upcoming PR.