Quantcast
Channel: Internet Explorer 8, 9, 10, 11 forum
Viewing all articles
Browse latest Browse all 10469

using powershell to access internet explorer

$
0
0

I have two systems using Windows 7 PRO.  Both systems up to date.  I run the following script on both systems.$ie = new-object -com "InternetExplorer.Application"
$ie.visible = $true
$ie.navigate("http://localhost:8129/default.aspx")

start-sleep -seconds 8
$doc = $ie.document

On one system this code works.  $doc contains the contents of the page.  On the other system $doc is System.__ComObject.

I can't figure out Why $doc is different on the two machines.  I've googled this problem.  I've found a couple people having the same problem.  But no fix.  The code used to work on both systems.  Then the system that is failing started to display the web page even though the $ie.visible was false. 


Viewing all articles
Browse latest Browse all 10469

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>