I defined an event to capture if the user is clicking a dropdown button using:
- Click On span.dropdown_button
However, within the dropdown button itself there are more elements like icon and text, when the user clicks on those elements it doesn’t trigger the event I defined but a separate event. How can I change it such that the clicking of anywhere in the dropdown will record the event I defined?
I’m also trying to define a property to capture the text value in the header whenever this is clicked. I used to value of javascript, and copied the JSpath from the Inspect Element but it’s still returning nothing.
document.querySelector("#main-content > main > div.main-content__inner > header > section > h1")
Thank you!
Best answer by Nora-Heap
View original