I want to click a button on iframe window security checkout using JavaScript .
In normal window (except iframe) we use,
document.getElementById("ButtonId").click()
But In iframe window this case is not working fine. As I think this is a security check out which is restricting me to achieve this task.
I have done the following Steps:
document.getElementById("Buttonid").click()
window.frames["frameId"].document.getElementById("Buttonid").click()
I am getting this error:
window.frames['frameId'].document
is undefined