ChainSafe / dappeteer

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

fix: add evaluate element click for closeWhatsNewModal #345

Closed marijanabevanda closed 1 year ago

marijanabevanda commented 1 year 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.

Error solved: image

Issues

Closes #

CLAassistant commented 1 year ago

CLA assistant check
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.


mbevanda seems not to be a GitHub user. You need a GitHub account to be able to sign the CLA. If you have already a GitHub account, please add the email address used for this commit to your account.
You have signed the CLA already but the status is still pending? Let us recheck it.