Subject: | _wait_while_busy does not do what you would like it to do |
Contrary to Microsoft documentation, IE's readystate DOES NOT accurately reflect the state of the browser regarding page load completion. It fails frequently and for a variety of reasons. Samie (http://samie.sourceforge.net/) that checks the event stream to insure that all the loads are complete. This will work most of the time (but not always). In principal there is NO bulletproff technique independent of the application using Mech, however, it is possible to use the Samie technique coupled with a brief timeout waiting for any new events.
I'm willing to help if you would like.