Re: [Wtr-general] Driving Javascript

2006-09-18 Thread Bret Pettichord
Sun, Thank you for the detailed explanation of how you read the Watir documentation. It is now clear to me that there is one key fact about Watir that you still don't understand (and which may not be well documented). Watir works with the HTML as *currently rendered in the browser* -- not as

Re: [Wtr-general] Driving Javascript

2006-09-18 Thread Sun
BTW -- once you KNOW that link is the way to go, links will reveal the JavaScripts. As in: ie.frame("top_frame").links.each { |l| puts l.to_s } And that's the secret. - Posted via Jive Forums http://forums.openqa.org/thread.jspa?t

Re: [Wtr-general] Driving Javascript

2006-09-18 Thread Sun
> Well... > > (1) There should be documentation that specifically > states how to drive a Javascript -- as in, use > .link(:url, "path") > > (2) It should point out that it is driven by > "click", not fire_event('onclick'). > > (3) Actually, there should be documentation that > identifies all of th

Re: [Wtr-general] Driving Javascript

2006-09-18 Thread Bret Pettichord
Well... > (1) There should be documentation that specifically states how to drive a > Javascript -- as in, use .link(:url, "path") > (2) It should point out that it is driven by "click", not > fire_event('onclick'). > (3) Actually, there should be documentation that identifies all of the > avail

Re: [Wtr-general] Driving Javascript

2006-09-18 Thread forum-watir-users
> Sun wrote: > > Problem solved. Either of these 2 work: > > (a) > ie.frame("top_frame").table(:index,5)[2][2].link(:url, > "javascript:Events.invokeEvent(\'2_11_act\')").click > > > > (b) > ie.frame("top_frame").link(:url,"javascript:Events.inv > okeEvent(\'2_11_act\')").click > > > > It is the "c

Re: [Wtr-general] Driving Javascript

2006-09-14 Thread Bret Pettichord
Sun wrote: > Problem solved. Either of these 2 work: > (a) > ie.frame("top_frame").table(:index,5)[2][2].link(:url,"javascript:Events.invokeEvent(\'2_11_act\')").click > > (b) > ie.frame("top_frame").link(:url,"javascript:Events.invokeEvent(\'2_11_act\')").click > > It is the "click", not the fir

Re: [Wtr-general] Driving Javascript

2006-09-14 Thread Sun
Problem solved. Either of these 2 work: (a) ie.frame("top_frame").table(:index,5)[2][2].link(:url,"javascript:Events.invokeEvent(\'2_11_act\')").click (b) ie.frame("top_frame").link(:url,"javascript:Events.invokeEvent(\'2_11_act\')").click It is the "click", not the fire_event('onclick') that w

Re: [Wtr-general] Driving Javascript

2006-09-14 Thread Sun
>> Sun wrote: >> Anyone have any suggestions? >> > Send us the html for the entire tag. You've only > posted a fragment. OK. But since it is 5 tables deep...and very complex, I will just post the table involved: ===

Re: [Wtr-general] Driving Javascript

Sun wrote: > Anyone have any suggestions? Send us the html for the entire tag. You've only posted a fragment. ___ Wtr-general mailing list Wtr-general@rubyforge.org http://rubyforge.org/mailman/listinfo/wtr-general

Re: [Wtr-general] Driving Javascript

Bit more info. 1st, the javascript in question exists within a nested table structure (this is table #5) within a frame. I can actually make the text that is displayed in the table cell flash (with this): ie.frame("top_frame").table(:index, 5)[2][2].flash And I can actually make it highlight ye

Re: [Wtr-general] Driving Javascript

When I execute: ie.goto("javascript:Events.invokeEvent('2_11_act')") in FreeRIDE the script gets to that point and hangs. When I CTRL-C it (in the terminal window) the error is: c:/ruby/lib/ruby/gems/1.8/gems/watir-1.5.1.1081/./watir.rb:1752:in `sleep': Interrupt from c:/ruby/lib/ruby/gem

Re: [Wtr-general] Driving Javascript

Did you try this? ie.goto("javascript:Events.invokeEvent('2_11_act')") Bret Sun wrote: > I have a piece of Javascript that I need to invoke via Watir. Here is the > Javascript code: > > > > menuStart(TAB_MENU_OFF,'ACCOUNT','javascript:Events.invokeEvent(\'2_11_act\')','ACCOUNT','Acco

[Wtr-general] Driving Javascript

I have a piece of Javascript that I need to invoke via Watir. Here is the Javascript code: menuStart(TAB_MENU_OFF,'ACCOUNT','javascript:Events.invokeEvent(\'2_11_act\')','ACCOUNT','AccountTab'); registerMenuShortcut('C'); Now if this was a Javascript link I know I could do: "ie.link(