Submit iframe from main window

I had the problem to submit my form in a iframe with a button on the main page, I used XPATH to get my iframe and then select it and submit the form like this:

document.evaluate('//iframe', document, null, XPathResult.FIRST_ORDERED_NODE_TYPE, null).singleNodeValue.contentWindow.document.FORM.submit();

Leave a Reply

Your email address will not be published.

2 × 3 =