Wednesday, July 16, 2014

Powershell -Internet Explorer Web Automation

$ie = New-Object -com "InternetExplorer.Application"
$ie.Navigate("https://www.google.se/?gfe_rd=cr&ei=TDPGU7PmGofK8geauYCoDg")
$ie.visible = $true
do { sleep 5 }
while ( $ie.busy )
$doc = $ie.document
$search = $doc.getElementById("gbqfqwb")
$search.value = "yourUserName"


 

$doc.getElementById("gbqfba").click();
$ie.Quit();

No comments :