I have a followup question after my previous question. I found the element:
<i _ngcontent-c2="" alt="X" class="close-button psi psi-times-v1 psi-hover"></i>
and I need to click on it. In the Chrome browser it works fine (as far as I understand, there’s an event listener registered for this <i>
element and the click
event - that is executed when I click on it. However, when I want to click on it using Wallaby, nothing happens (I mean if I add a clicked |> Browser.page_source() |> IO.puts
line, I still see the source of the page with the <i>
button, not the page that’s supposed to be loaded after the click). This is my code:
xpath = "/html/body/<long-path>/i"
clicked = Browser.click(page, Query.xpath(xpath))
take_screenshot(clicked)
The actual code of the event listener is minified, I don’t know exactly what it does (it is supposed to call a callback I provide and this happens in the real browser). The callback I provide is supposed to load a new page and I see in tcpdump that this happens. Why is the session not updated?