Is there some way to use VBA code to wait for events such as new page loads after button clicks?
I do not mean using a Timer function or RSWWait statement to create a set delay time. I need something that I can place after a coded button click that "waits" for the event caused by the button click to be completed.
An example of this is a page which allows the addition of addresses to a customer's record. The more addresses, the bigger the database and the longer the page takes to refresh.
My script is entirely a VBA coded afterPlay event on the 1st (and only) page of the script. As such, without a wait statement it could potentially run ahead of the Site In Test.
I need a dynamic wait to handle the range of possible times without retuning an error. (unless required) I cannot find any reference to this in the database.
Both of these options make use of a hard coded delay or "wait time". I specifically do not wish to do this (as indicated in my post) because that would invlove a wait on each user function of each iteration of each script. That alone adds in excess of 3 hours to my run time.
I want to use code to automatically pause and wait until the page has finished processing before immediately continuing on.
An example would be:
Step 1: Hit back button
Step 2: Wait for previous page to complete
Step 3: Next Test Step
I need something like a "Wait for Page event" function.
Using either the recorded delay or a set delay time causes 2 problems. Either the page takes longer than expected and the script crashes, or it is faster than expected and the delay still costs processing time.