On Apr 14, 5:42 am, Jarmo Pertman <jarm...@gmail.com> wrote: >Anyway, now I have completely different problem. Problem is related >with fire_event. I have always assumed that Watir knows when >fire_event call has finished, but it seems that IE will respond >immediately to this call.
The firing of the event *has* finished amost as soon as it's started. The issue is what processes are kicked off in the client side code when the event is detected. I don't think Watir has (nor is it reasonable to expect it to have) any way to tell what will happen when the event is fired, and how long that will take to finish. heck it could be a local flash animation or something that takes 20 minutes to run. brute force would just be to put in a wait (that would be long enough to cover the time needed in any conceivable case), for the java to finish doing it's thing. Frankly unless execution speed is absolutely critical, that would be my approach. beyond that you'll have to examin what happens that is triggered by the event, try to find the last thing it does, and make a loop or something that looks for that to be the case (something is visible perhaps?, or now exists that didn't exist before? But you have to ask yourself 'how long is it going to take me to do that, vs the time I'd save during script execution over just using the brute force method. There may not be much return on the time invested to create the more elegant solution. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Watir General" group. To post to this group, send email to watir-general@googlegroups.com Before posting, please read the following guidelines: http://wiki.openqa.org/display/WTR/Support To unsubscribe from this group, send email to watir-general-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/watir-general -~----------~----~----~----~------~----~------~--~---