[Wtr-general] Having problems figuring out what to click

Matt Berney forum-watir-users at openqa.org
Fri Jul 6 20:11:30 EDT 2007


I have been using Ruby and watir for a while now.  But, the set of web pages has me stumped.  Any help you can provide is extremely appreciated.

In the source code below, there is a table of items that, when clicked, fills in a frame.  I can get to the TableRow.  But, click on it or fire_event('onClick') doesn't seem to do the trick. The flash method doesn't light up.  However, flashing the entire table seems to work.  So apparently, I am not selecting the item I want.

# this works
$ie.table(:id,'table1').flash 

# this doesn't work
$ie.table(:id,'table1')[1].flash
$ie.table(:id,'table1')[1].click
$ie.table(:id,'table1')[1].fire_event('onClick')

How does one call the changlframes() javascript function?  I thought that is what the fire_event() was for.  BTW, if it makes any difference, this table is inside a <div>.

Thanks in advance.

<table id="table1" style="BORDER-COLLAPSE: collapse" borderColor="#819cb9" height="180" cellPadding="0" width="69" border="1">
	<tr>
		<td id="list1" style="CURSOR: pointer" onClick="changeBG('list1');changIframes(0);" bgColor="#ceddf0" height="30">
			<p style="TEXT-ALIGN: center"><b>Ticket<br> Info</b></p>
		</td>
	</tr>
    ...
        <tr>
	        <td id="list5" style="CURSOR: pointer" onClick="changeBG('list5');changIframes(4);" bgColor="#ceddf0" height="30">
		        <p style="TEXT-ALIGN: center"><b>SVAs</b></p>
	        </td>
        </tr>
</table>


More information about the Wtr-general mailing list