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
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
> 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
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
> 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
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
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
>> 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:
===
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
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
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
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
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(
13 matches
Mail list logo
| |