Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <input name="loginForm:j_idt56:loginButton" id="loginForm:j_idt56:loginButton" onclick="this.style.display='none'; document.getElementById('euLoginButDis').style.display='inline';" type="submit" value="Login">
- $username = "USERNAME"
- $password = "PASSWORD"
- $ie = New-Object -com InternetExplorer.Application
- $ie.visible=$true
- $ie.navigate("URL")
- while($ie.ReadyState -ne 4) {start-sleep -m 100}
- $ie.document.getElementById("loginForm:j_idt21:username:username").value= "$username"
- $ie.document.getElementById("loginForm:j_idt42:password:passwordb").value = "$password"
- # $ie.document.getElementById("loginForm:j_idt56:loginButton").submit()
- start-sleep 20
- # $ie.Document.body | Out-File -FilePath c:web.txt
- You cannot call a method on a null-valued expression.
- At line:16 char:36
- + $commit = $doc.getElementsByTagName <<<< ("input")
- + CategoryInfo : InvalidOperation: (getElementsByTagName:String) [], RuntimeException
- + FullyQualifiedErrorId : InvokeMethodOnNull
- You cannot call a method on a null-valued expression.
- At line:16 char:36
- + $commit = $doc.getElementsByTagName <<<< ("input") | ? { $_.name -eq "commit" }
- + CategoryInfo : InvalidOperation: (getElementsByTagName:String) [], RuntimeException
- + FullyQualifiedErrorId : InvokeMethodOnNull
- Exception calling "click" with "0" argument(s): "The object invoked has disconnected from its clients. (Exception from HRESULT: 0x80010108 (RPC_E_DISCONNECTED))"
- At line:17 char:29
- + if ($commit) { $commit.click <<<< () }
- + CategoryInfo : NotSpecified: (:) [], MethodInvocationException
- + FullyQualifiedErrorId : ComMethodCOMException
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement