I am trying to use web automation and use JavaScript or JQuery to click the svg elements within an iFrame. I am trying to click on all the svg elements with class “expand-svg”.
It should work if you querySelect the class alone with your vanilla JS.
Example: document.querySelectorAll(‘.expand-svg’)[0]
I don’t think I’ve ever seen a .click() built in method before.
Thanks for the reply. I can’t seem to get it to work. I am not for sure, but maybe ‘The Same Origin Policy’ might be the cause like @front_endDEV01 mentioned.
The same-origin policy restricts which network messages one origin can send to another. For example, the same-origin policy allows inter-origin HTTP requests with GET and POST methods but denies inter-origin PUT and DELETE requests