Closed Monsterovich closed 4 months ago
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.
@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 Hello!