you can do it using the 'href' value of each edit user link.. since in your case href is unique for each users 'edit user' link. You can get the href value using the IE devlopers toolbar (google it out incase you do not know about it) or get the value from source code of your browser window eg..
$ie.link(:href, ".../AppControl?pg=ListUsers&ret=Edit user&employee id=4").click On Thu, May 28, 2009 at 11:52 AM, Swap <[email protected]> wrote: > > I am in learning stage of Watir. I want to write the code in watir to > click the particula 'Edit user' link. > > Please reply me. > > <table border="0" cellspacing="10" cellpadding="5"> > <tr> > <td colspan="5"><font class="star"> > </font></td> > </tr> > <tr> > <th> </th> <th>First name</th> <th>Last > name</th> <th>User > name</th><th>Role</th><th>Allocated file quota</th> > <th>Occupied > file quota</th><th> </th><th> </th> > </tr> > <tr> > <td></td> > <td><a id="Display profile" href="AppControl?pg=ListUsers&ret=Display > profile&employee id=2">a</a></td> > <td>a</td> > <td>a</td> > <td>Group admin</td><td>10 MB.</td><td>3.3 > KB.</td> > <td><a id="Edit user" > href="AppControl?pg=ListUsers&ret=Edit > user&employee id=2">Edit user</a></td> > <td><a id="Edit > profile"href="AppControl?pg=ListUsers&ret=Edit > profile&employee id=2">Edit profile</a></td> > <td><a id="Delete > href='javascript:confirmDelete("AppControl? > pg=ListUsers&ret=Delete user&employee id=2")'>Delete</a></td> > > <td colspan="2"><a > href="AppControl?pg=ListUsers&ret=view > gallery&employee id=2" id="view_gallery_link">View gallery</a></td> > > </tr> > > <tr> > <td></td> > <td><a id="Display profile" > > href="AppControl?pg=ListUsers&ret=Display profile&employee > id=1">admin</a></td> > <td>admin</td> > > <td>admin</td> > > <td>Admin</td> > <td>90 MB.</td> > <td>0.0 KB.</td> > > <td><a id="Edit user" > > href="AppControl?pg=ListUsers&ret=Edit user&employee id=1">Edit > user</a></td> > <td><a id="Edit profile" > > href="AppControl?pg=ListUsers&ret=Edit profile&employee > id=1">Edit > profile</a></td> > <td><a id="Delete" > > href='javascript:confirmDelete("AppControl? > pg=ListUsers&ret=Delete user&employee id=1")'>Delete</a></td> > > <td><a id="Edit user" > href="AppControl? > pg=ListUsers&ret=messagebox&employee id=1">Mailbox</a></td> > > > <td colspan="2"><a > href="AppControl?pg=ListUsers&ret=edit gallery" > id="edit_gallery_link">Edit gallery</a></td> > > <td colspan="2"><a > href="AppControl?pg=ListUsers&ret=view > gallery&employee id=1" id="view_gallery_link">View gallery</a></td> > > </tr> > > > <tr> > > <td><input type="checkbox" > name="employee_id" id="employee_id" > value="4"/></td> > > <td><a id="Display profile" > > href="AppControl?pg=ListUsers&ret=Display profile&employee > id=4">b</a></td> > <td>b</td> > > <td>b</td> > > <td>Manager</td> > <td>10 MB.</td> > <td>0.0 KB.</td> > > <td><a id="Edit user" > > href="AppControl?pg=ListUsers&ret=Edit user&employee id=4">Edit > user</a></td> > <td><a id="Edit profile" > > href="AppControl?pg=ListUsers&ret=Edit profile&employee > id=4">Edit > profile</a></td> > <td><a id="Delete" > > href='javascript:confirmDelete("AppControl? > pg=ListUsers&ret=Delete user&employee id=4")'>Delete</a></td> > > > <td colspan="2"><a > href="AppControl?pg=ListUsers&ret=view > gallery&employee id=4" id="view_gallery_link">View gallery</a></td> > > </tr> > > > > --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Watir General" group. To post to this group, send email to [email protected] Before posting, please read the following guidelines: http://wiki.openqa.org/display/WTR/Support To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/watir-general -~----------~----~----~----~------~----~------~--~---
