[wtr-general] Re: JavaScript events timing problems with Watir

2009-04-16 Thread Jarmo Pertman
As I said, then everything works correctly when I use debugger and execute commands one by one (or even irb), so the problem is not related with invoking wrong event. Also, I have checked that onclick event is attached to it. On Apr 15, 11:18 pm, Chuck van der Linden sqa...@gmail.com wrote: Are

[wtr-general] Re: JavaScript events timing problems with Watir

2009-04-16 Thread Chuck van der Linden
if it works manually and not automated it sounds like a sort of race condition caused by the speed at which the automation is executing. You could try simulating that in irb by making a little do structure (or a 1.times do loop) that you nest the comands in, so it will execute them quickly

[wtr-general] Re: JavaScript events timing problems with Watir

2009-04-16 Thread Chuck van der Linden
On Apr 15, 2:54 am, Jarmo Pertman jarm...@gmail.com wrote: When you do .click, then Watir waits for page load (it might take 20 minutes), so why wouldn't it be reasonable to wait until events have been processed? I believe (and those more familiar with the watir code, and interacting with

[wtr-general] Re: JavaScript events timing problems with Watir

2009-04-15 Thread Jarmo Pertman
Well, for me the case is as following. User fills in some form and presses submit, which has onclick event attached to it, which in turn invokes JavaScript (not Java!) function, which validates form and if there are missing or invalid fields, submit will not be done and error message div will be

[wtr-general] Re: JavaScript events timing problems with Watir

2009-04-15 Thread Chuck van der Linden
Are you sure what event the javascript is looking for? have you looked at the object on the page and seen what event handlers are defined for it? maybe it's not the 'click' event that it wants? maybe it wants some other sequence such as onfocus or onmouseup On Apr 15, 2:54 am, Jarmo Pertman

[wtr-general] Re: JavaScript events timing problems with Watir

2009-04-14 Thread Chuck van der Linden
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