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

How to navigate on a list

$
0
0

Some webpage has unordered list (<ul><li>...</li></ul>). when click to select an item, it will navigate to another page. how can I use Powershell to do it similar as following?

$ie = new-object -com InternetExplorer.Application 
$ie.Visible = $true
$ie.Navigate("http://www.awebsite.com")
Start-Sleep -Seconds 2

....

$signOut = $ie.document.getElementsByTagName('A') | Where-Object {$_.innerText -eq 'Sign Out'}
$signOut.click()




Viewing all articles
Browse latest Browse all 21975

Trending Articles