I am trying to access an element of a popup window, which seems to be embedded in an iframe. Below is the html I am dealing with. The line I am interested in below is ...OK.../a> . I have left some html out as it is rather large and I did not think it would be helpful. If needed I can post. I have tried many combinations to access this but so far nothing gets that OK button. Below is my best guess code that does not work.
$ie.Document.getElementsByTagName("A") | Where {$_.getAttributeNode
('class').Value -eq 'btn btn3d PopupBtn'}
<html>
<head>...</head>
<body>
<iframe id="12345"src="https://example.com/html/messagepopup.html"
frameborder="0" style="width:100%; height: 154px;">
<!-- COMMENT HERE about the software
-->
<html>
<head>
<link href="https://example.com/path/to/custompage.css"rel=stylesheet">
</link>
</head>
<body class="popupmsg" onload="onload()">
<div class="PopupMsgFooter" id="PopupMsgFooter">
<a class="btn bnt3d PopupBtn" href="#" arid="2"arwindowid="0">OK</a>
</body>
</html>
</iframe>
</body>
</html>