I tried method 1 and method 2, with no success. I am using Watir 1.5 to support 
modal dialogs. Using irb I can access certain portions of the Javascript alert 
window, such as the title (I attach to the window by title) and 3 text areas 
that are DIV areas. The window has 2 buttons at the bottom. I want to click on 
the CLOSE button.  I have tried accessing the button as follows:

ie.table(:index,1)[5].image(:id,'imgFinishButton').flash 

The button is defined outside of a SPAN or DIV but is within a TABLE.
Here is the html that contains that button (id='imgFinishButton'):

irb> ie.table(:index,1)[5].html

=> "\r\n<TR><TD class=wizButtons colSpan=2 height=27><IMG height=19 
src=\"images/spacer.gif\" width=10 align=left> <INPUT id=imgHelpButton 
onmouseover=swapImage(); onfocus=checkFocus(); onclick=cmdHelp_Click(); 
onmouseout=swapImage(); type=image height=20 width=80 
src=\"http://qlwdmunns2k3/ecm4/L103
3/images/imgHelpButton.gif\" align=left border=0 udefDisabled=\"false\"> 
\r\n<DIV style=\"DISPLAY: none\"><INPUT id=imgCancelButton 
onmouseover=swapImage(); onfocus=checkFocus(); onclick=cmdCancel_Click(); 
onmouseout=swapImage(); type=image height=20 width=80 
src=\"images\\imgCancelButton.gif\" bord
er=0 udefDisabled=\"false\"> <IMG height=19 src=\"images/spacer.gif\" width=8> 
<INPUT id=imgBackButton onmouseover=swapImage(); onfocus=checkFocus(); 
accessKey=B onclick=cmdBack_Click(); onmouseout=swapImage(); type=image 
height=20 width=80 src=\"http://qlwdmunns2k3/ecm4/L1033/images/imgBackButtonDi
sabled.gif\" border=0 udefDisabled=\"true\" udefACCESSKEY=\"2\"> <IMG height=19 
src=\"images/spacer.
gif\" width=8> <INPUT id=imgNextButton onmouseover=swapImage(); 
onfocus=checkFocus(); accessKey=N onclick=cmdNext_Click(); 
onmouseout=swapImage(); type=image height=20 width=80 src=\"http://qlwdmunns2
k3/ecm4/L1033/images/imgNextButtonDisabled.gif\" border=0 udefDisabled=\"true\" 
udefACCESSKEY=\"14\"> <IMG height=19 src=\"images/spacer.gif\" width=8> 
</DIV><INPUT id=imgFinishButton onmouseover=swap
Image(); onfocus=checkFocus(); onclick=cmdFinish_Click(); 
onmouseout=swapImage(); type=image height=20 width=80 
src=\"http://qlwdmunns2k3/ecm4/L1033/images/imgCloseButton.gif\"; border=0 
udefDisabled=\"false\"> <IMG height=19 src=\"images/spacer.gif\" width=10> 
</TD></TR>"
---------------------------------------------------------------------
Posted via Jive Forums
http://forums.openqa.org/thread.jspa?threadID=4669&messageID=13906#13906
_______________________________________________
Wtr-general mailing list
Wtr-general@rubyforge.org
http://rubyforge.org/mailman/listinfo/wtr-general

Reply via email to