Here is the code for one of the rows. This is a single row of about 150
and has the information that I am looking for.
<tr class="{cycle values=" odd,even'}'="">
>
> <td align="center">905</td>
>
> <td align="center">Internal</td>
>
> <td align="center">Automation</td>
>
> <td align="center">TestClient</td>
>
> <td align="center">autotest</td>
>
> <td align="center"><a href="mailto:[email protected]">[email protected]</a></td>
>
> <td align="center" nowrap="">
>
> <button type="button" class="iconbutton" style="vertical-align: middle;
>> cursor: default;" onclick="openDialog({name:"Edit User",
>
> url:"/useradmin/edit/905",
>
> submit:"Update User",
>
> height:680,
>
> width:440,
>
> submit_click:function(){editUserUpdate_symf("autotest")}},
>
> this)" title="Edit User">
>
> <img src="/img/user_edit.png" style="vertical-align: middle;">
>
> </button>
>
>
>
> <button type="button" class="iconbutton" style="vertical-align: middle;
>> cursor: default;" title="Delete User" onclick="if (confirm("Are you
>> sure you want to delete this user?"))
>> location.href="/admin/admin?UserID=905&action=deleteUser";
>> return false">
>
> <img src="/img/user_delete.png" style="vertical-align: middle;">
>
> </button>
>
>
>
> <button type="button" class="iconbutton" style="vertical-align: middle;
>> cursor: default;" title="Login As User" onclick="if (confirm("Are you
>> sure you want to login as this user?"))
>> location.href="/admin/admin?UserID=905&action=hijackUser";
>> return false">
>
> <img src="/img/user_go.png" style="vertical-align: middle;">
>
> </button>
>
>
>
> </td>
>
> </tr>
>
>
Here is the code that I was using to click the button in that row:
> @browser.table.trs.each do |row|
>
> if row.tds[0].text == TestUserId
>
> @button = row.button(:title, "Edit User")
>
> @button.click
>
> end
>
> end
>
>
This code works, but is extremely slow. I'll keep you updated on the new
code that I'll have from your guys' responses.
--
Before posting, please read http://watir.com/support. In short: search before
you ask, be nice.
[email protected]
http://groups.google.com/group/watir-general
[email protected]