Quantcast
Channel: Internet Explorer Web Development forum
Viewing all articles
Browse latest Browse all 3527

Accessing a document's IFRAME via Powershell

$
0
0

I am trying to use Powershell to load a web page in Internet Explorer, and then access elements in an IFRAME on the page without success. I am using Vista and IE 9.

My code uses $Browser.Navigate2($Url) and then waits for $Browser.Busy to be $False, and the ReadyState of all frames on the page to be "complete", before accessing the DOM.

When the elements I want to access are in an IFRAME on the page, my code cannot access them via $Browser.Document.getElementByID("elementID") - the returned value is $Null. I have tried getting the frame object using "$Frame = $Browser.Document.getElementByID("frameID")" and then using that object to access the frame's document. However, $Frame.Document returns the same object as $Browser.Document, and I cannot find any other way of accessing the frame's actual document object. I have also tried accessing the frame object via the $Browser.Document.Frames array, but the document's Frames property is $Null.

Any help anyone can give me would be appreciated.


Viewing all articles
Browse latest Browse all 3527

Trending Articles