Advertisement
Guest User

Untitled

a guest
Mar 17th, 2018
74
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. $ie = New-Object -com internetexplorer.application;
  2.  
  3. # In here there's more code to get you to the actual page, login, etc.
  4.  
  5. # Wait on page element to load or exit after 10 seconds
  6. while ((-Not $ie.document.getElementsByClassName(" x-grid-panel x-component x-border x-masked")[0]) -and ($i -lt 100)) {   
  7. Start-Sleep -m 100;
  8. try {
  9. $i++
  10. $ie.document.getElementById("gtn_auto_33").click()
  11. } catch [System.Management.Automation.RuntimeException] {
  12. # do not do anything and continue the while loop
  13. }
  14. }
  15. $i = 0
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement