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