Quantcast
Channel: Windows PowerShell forum
Viewing all articles
Browse latest Browse all 21975

Open webpage in a new $ie window

$
0
0

When running the following, $ie1 will open web page1 and then will go to page2 after $a.click(). However, Page2 will take the same window as Page1. Is there a way to keep Page1 in $ie1 and open a new window page2 in $ie2 after $a.click() ? Thanks.

$ie1 = New-Object -COM "InternetExplorer.Application"
$ie2 = New-Object -COM "InternetExplorer.Application"
$ie1.visible = $true
$url = "http://www.website.com/page1.htm
$ie1.navigate($url)
$a = $ie1.document.getElementByID('Page2_id')
$a.click()


Viewing all articles
Browse latest Browse all 21975

Trending Articles



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