joey Posted December 23, 2004 Report Share Posted December 23, 2004 Hi, I would like to launch a website with IE and then use the wait for web page command. I then perform some commands like submitting a form (via <tab> and <enter> on submit button) and then use the wait for web page. I want to use conditions to say that if the web page doesn't load in the time necessary or its loads an error page that i can trap that and send myself an email. Currently my macro just aborts. Do the commands have return values for successful or not? Quote Link to comment Share on other sites More sharing options...
IceBox Posted December 27, 2004 Report Share Posted December 27, 2004 When an error page loads in IE, the window title changes to "Cannot Find Server" or something similar to that. I don't remember the exact title off the top of my head. You can use the "If Window Running" or the "If Window not Running" commands. Another option would be to use the "Variable Set String - Set Value to Topmost Window Title" command and then run logic tests on that variable. (i.e. If %T1% contains "cannot find", then send Email and Macro Stop, Else [continue with desired steps].) Quote Link to comment Share on other sites More sharing options...
Nicolas Posted December 28, 2004 Report Share Posted December 28, 2004 the problem is that sometimes you don't have any error page loaded in IE ... your page is simply loading ... loading ... loading ... and when the "Wait For Web Page" maximum time is reached, it raises an error (and stops your macro) ! maybe one day we'll have an option such as "stop loading when max time reached", or at least "continue" so that you can check by yourself if it finished because the page is loaded or because the max time is exceeded for now, it seems that the better way to handle this kind of situation is to create your own "wait for web page"-like macro ! this point has already been discussed here : http://pgmacros.com/community/index.php?showtopic=139 ... where you should find some ideas Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.