How to navigate on a list


some webpage has unordered list (<ul><li>...</li></ul>). when click to select item, navigate page. how can use powershell similar 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()



just found workaround using $ie.document.getelementsbytagname('a')) | where-object, spend lot of time try & error



Windows Server  >  Windows PowerShell



Comments

Popular posts from this blog

Group Policy Event ID 1058 Error Code 1326 (The user name or password is incorrect)

Suspicious event log Event ID: 4905

DCOM received error "2147746132" from...