Skip to content
This repository was archived by the owner on Apr 12, 2024. It is now read-only.

fix: add evaluate element click for closeWhatsNewModal #346

Merged
merged 3 commits into from
Sep 26, 2023

Conversation

marijanabevanda
Copy link
Contributor

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

PR Checklist

  • I have run linter locally
  • I have run unit and integration tests locally
  • Update configuration the newest version (readme and const)
  • Rebased to master branch / merged master

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 #

Copy link
Contributor

@irubido irubido left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Indeed, happens sometimes, good fix. Just fix lint for CI to pass.

@marijanabevanda
Copy link
Contributor Author

marijanabevanda commented Sep 25, 2023

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
Copy link
Contributor

irubido commented Sep 26, 2023

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.

@irubido irubido added this pull request to the merge queue Sep 26, 2023
Merged via the queue into ChainSafe:master with commit 1f7c50f Sep 26, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants