I have a piece of Javascript that I need to invoke via Watir. Here is the 
Javascript code:


<td class="off" nowrap> 
<script>menuStart(TAB_MENU_OFF,'A<u>C</u>COUNT','javascript:Events.invokeEvent(\'2_11_act\')','ACCOUNT','AccountTab');
registerMenuShortcut('C');
</script>


Now if this was a Javascript link I know I could do:
"ie.link(:url,"javascript:Events.invokeEvent(\'2_11_act\')").fire_event('onclick')"
but it isn't, so this won't work.
Obviously what I need to do is to "invoke" an Event labelled "2_11_act" -- but 
I don't have any idea how to do this.

I also tried:
table = ie.table(:index, 5)
tab_cell = table.cell(:text, '2_11_act')
tab_cell.click
since the above script existed within a cell within a table nested 5 levels 
deep  but -- that didn't work either. It couldn't find it. Error was:
"Watir::Exception::UnknownObjectException: Unable to locate object, using index 
and 5"

Suggestions?
---------------------------------------------------------------------
Posted via Jive Forums
http://forums.openqa.org/thread.jspa?threadID=4171&messageID=11457#11457
_______________________________________________
Wtr-general mailing list
Wtr-general@rubyforge.org
http://rubyforge.org/mailman/listinfo/wtr-general

Reply via email to