古いwatirスクリプトを代わりにwatir-webdriverを使用するように変換しようとしています。これは、(最終的には)IE9とFirefox 4をサポートするためです。$browser.table_row(:id => "account_1").click
これは、watir / firewatirの画面でテーブルの最初の行をクリックするために使用したものですが、このためのAPIはwatir-webdriverで変更されました。これで、コードは$browser.table(:class => "sortable")[0].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>