Advertisement
Guest User

Untitled

a guest
Jun 22nd, 2016
85
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.63 KB | None | 0 0
  1. <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">
  2.  
  3. $username = "USERNAME"
  4. $password = "PASSWORD"
  5.  
  6. $ie = New-Object -com InternetExplorer.Application
  7.  
  8. $ie.visible=$true
  9.  
  10. $ie.navigate("URL")
  11.  
  12. while($ie.ReadyState -ne 4) {start-sleep -m 100}
  13.  
  14. $ie.document.getElementById("loginForm:j_idt21:username:username").value= "$username"
  15. $ie.document.getElementById("loginForm:j_idt42:password:passwordb").value = "$password"
  16. # $ie.document.getElementById("loginForm:j_idt56:loginButton").submit()
  17.  
  18. start-sleep 20
  19.  
  20. # $ie.Document.body | Out-File -FilePath c:web.txt
  21.  
  22. You cannot call a method on a null-valued expression.
  23. At line:16 char:36
  24. + $commit = $doc.getElementsByTagName <<<< ("input")
  25. + CategoryInfo : InvalidOperation: (getElementsByTagName:String) [], RuntimeException
  26. + FullyQualifiedErrorId : InvokeMethodOnNull
  27.  
  28. You cannot call a method on a null-valued expression.
  29. At line:16 char:36
  30. + $commit = $doc.getElementsByTagName <<<< ("input") | ? { $_.name -eq "commit" }
  31. + CategoryInfo : InvalidOperation: (getElementsByTagName:String) [], RuntimeException
  32. + FullyQualifiedErrorId : InvokeMethodOnNull
  33.  
  34. Exception calling "click" with "0" argument(s): "The object invoked has disconnected from its clients. (Exception from HRESULT: 0x80010108 (RPC_E_DISCONNECTED))"
  35. At line:17 char:29
  36. + if ($commit) { $commit.click <<<< () }
  37. + CategoryInfo : NotSpecified: (:) [], MethodInvocationException
  38. + FullyQualifiedErrorId : ComMethodCOMException
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement