Puppeteer won't click on div in acceptance test #20140
-
I'm writing an acceptance test for topic management in this PR, and for the mobile view, I am attempting to click on a div that opens a dropdown. The div is clearly visible and clickable on the screen, but puppeteer won't click on it no matter what. We can manually click on the div perfectly fine to open the dropdown. See this debugging doc for more info - |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 2 replies
-
Hey @Vir-8, I believe I know the issue. If you inspect the page (right-click -> Inspect) and press Ctrl-f, you can search for the class and notice that there are two hits. You would have to explicitly click the second element, or click the one that is clickable. Hope that helps :) |
Beta Was this translation helpful? Give feedback.
Hey @Vir-8,
I believe I know the issue.
There is a second element (...that occurs first within the html) with the same class that is hidden and not clickable.
If you inspect the page (right-click -> Inspect) and press Ctrl-f, you can search for the class and notice that there are two hits.
You would have to explicitly click the second element, or click the one that is clickable.
Hope that helps :)