I want know if its possible to click in a button inside my iframe.
I want click in "Click me!" and select "Geração" button from my iframe. It's possible do it?
I'm trying that:
<html lang="en">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Document</title>
</head>
<body>
<button id="btn1" onclick="clickButton()">
Click Me!
</button>
<iframe src="https://bhissdigital.pbh.gov.br/nfse/" width="1000" height="500"></iframe>
<script type="text/javascript">
// Simulate click function
function clickButton() {
parent.document.getElementById('menu:bt_emissao').click();
}
</script>
</body>
</html>