$(selector).click()
results in nothing happening.
this answer works in the browser console with the javascript context set to the iframe, but not the main page:
simulateMouseClick($("iframe").contents().find(selector))
results in:
Uncaught TypeError: targetNode.dispatchEvent is not a function
at triggerMouseEvent (:5:20)
at :8:9
at Array.forEach ()
at simulateMouseClick (:7:52)
at :1:1
$("iframe").contents().find(selector).text()
gives me what's expected so it's the correct element.
how can I achieve this?
Edit: adding this as people apparently can't read:
$("iframe").contents().find(selector).click()
has absolutely no effect as .click()
does not simulate a REAL mouse click.