Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: dom handling #212

Merged

Conversation

Monsterovich
Copy link
Contributor

No description provided.

@Monsterovich
Copy link
Contributor Author

@eggplants Hello!

@Monsterovich Monsterovich marked this pull request as draft January 24, 2024 21:06
@Monsterovich Monsterovich changed the title fix: close chrome extension banner too fix: dom handling Jan 24, 2024
@Monsterovich Monsterovich marked this pull request as ready for review January 24, 2024 21:26
@Monsterovich
Copy link
Contributor Author

Monsterovich commented Jan 24, 2024

Interesting that the first click work, but only if you add a delay of a second, It's a strange behavior.

I tried closing the second banner too, but its dom tree doesn't show up if headless = True. I added a workaround.

I wish I had a better solution.

@Monsterovich
Copy link
Contributor Author

@eggplants I rewrote the click method to page.locator(element).dispatch_event("click"). For some reason programmatic clicks work much better, all they need is for the element to exist in the DOM.

BTW, it works much faster. When you have time, merge this PR.

@eggplants eggplants changed the base branch from master to fix-dom-handling April 30, 2024 01:50
@eggplants eggplants merged commit e3643ba into eggplants:fix-dom-handling Apr 30, 2024
1 of 3 checks passed
eggplants added a commit that referenced this pull request Apr 30, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants