I'm trying to convert my old watir scripts to use watir-webdriver instead, as that will (eventually) support IE9 and Firefox 4. $browser.table_row(:id => "account_1").click is what I used to click the first row of a table on screen in watir/firewatir, but the API for this was modified in watir-webdriver. Now, the code is this: $browser.table(:class => "sortable")[0].click which should grab the first row of the table then click it. It seems to be successful, as it continues code execution, but it doesn't actually click the row.
Can someone explain what the right syntax would be in this case?
Here's the source code around the area I want to click:
<table class="sortable">
<thead>
<tr id="">
<th> </th>
<th class="sort" > Name </th>
<th class="sort" > Number </th>
</tr>
</thead>
<tbody>
<tr id="account_1" onclick=";$('timer').show();; new Ajax.Request('create_new_account', {asynchronous:false, evalScripts:true, onComplete:function(request){;$('timer').hide();initializeCustomEffects();}})">
<td></td>
<td class="sortTd">Test Account</td>
<td class="sortTd">1</td>
</tr>
</tbody>