我正在尝试将我的凭据放入网站,以便自动执行一些任务。我正在尝试这个代码。没有任何反应。故障自动化Internet Explorer
$Url = "https://srvdcvs05.fiep_pr.br:1311/"
$Ie = New-Object -Com InternetExplorer.Application
$Ie.Navigate($Url)
$secLink = $Ie.Document.getElementsByTagName('A') | Where-Object {$_.innerText -eq 'Continue to this website (not recommended).'}
$secLink.click()
$Ie.Document.getElementsByType("input") | where { $.Name -eq "user" }.value = "myuser"
$Ie.Document.getElementsByName("input") | where { $.Name -eq "password" }.value = "mypassword"
$loginBtn = $Ie.Document.getElementsById('input') | Where-Object {$_.Type -eq 'button' -and $_.Value -eq 'LoginButton'}
$loginBtn.click()