Hi, In this application when we add user every user will have the 'Edit' and 'Delete' link.
<span class="savedentity">a - associate</span></td> > > <tr bgcolor="#f6f2f6"> > <td width="33%"> > > <span class="toolBar"><a href="AppControl?pg=List > Users&ret=Edit&id_user=1">Edit</a>| > <a href='javascript:confirmDelete("AppControl?pg=List > Users&ret=Delete&id_user=1")'>Delete</a></span> I want to write the code to click the 'Edit' link from above code. How can I write it? On Tue, Jul 28, 2009 at 9:54 PM, Chuck van der Linden <sqa...@gmail.com>wrote: > > When interacting with the page manually, how do you know which link > you want to click? is it always in the same position (e.g. always the > third 'edit' link) or next to a particular label in the table, or > something else? > > without knowing how you determind which is the correct link to click, > we can't tell you how you would create a script to do the same > thing. > > Also what part of the code is 'dynamically generated' and subject to > change? do the URL values vary? the position on the page? without > knowing what is dynamic vs what is constant, we can't know what > potential means to identify elements are 'out of play' (or vastly > more complicated) as it were. > > On Jul 28, 2:04 am, Swap <swapnal.sa...@gmail.com> wrote: > > Hello All, > > I want to write the script to click the dynamiclly generated 'Edit' > > and 'Delete' link. How can I do that? > > > > This is the html code for that:: > > > > <div class="contentHolder"> > > <table width="100%" cellspacing="8" > cellpadding="5" border="0"> > > > > <tr bgcolor="#f6f2f6"> > > <td width="33%"> > > > > <span class="toolBar"><a > href="AppControl?pg=List > > Users&ret=Edit&id_user=4">Edit</a>| > > <a > href='javascript:confirmDelete("AppControl?pg=List > > Users&ret=Delete&id_user=4")'>Delete</a></span> > > > > <span > class="savedentity">a - associate</span></td> > > > > <tr bgcolor="#f6f2f6"> > > <td width="33%"> > > > > <span class="toolBar"><a > href="AppControl?pg=List > > Users&ret=Edit&id_user=1">Edit</a>| > > <a > href='javascript:confirmDelete("AppControl?pg=List > > Users&ret=Delete&id_user=1")'>Delete</a></span> > > > > <span > class="savedentity">admin - admin</span></td> > > > > <tr bgcolor="#f6f2f6"> > > <td width="33%"> > > > > <span class="toolBar"><a > href="AppControl?pg=List > > Users&ret=Edit&id_user=3">Edit</a>| > > <a > href='javascript:confirmDelete("AppControl?pg=List > > Users&ret=Delete&id_user=3")'>Delete</a></span> > > > > <span > class="savedentity">sappu - associate</span></ > > td> > > > > <tr bgcolor="#f6f2f6"> > > <td width="33%"> > > > > <span class="toolBar"><a > href="AppControl?pg=List > > Users&ret=Edit&id_user=2">Edit</a>| > > <a > href='javascript:confirmDelete("AppControl?pg=List > > Users&ret=Delete&id_user=2")'>Delete</a></span> > > > > <span > class="savedentity">swap - associate</span></td> > > > > </table> > > > > </div> > > > > Thanks in advance > > > > Swapnal S. > > > --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Watir General" group. To post to this group, send email to watir-general@googlegroups.com Before posting, please read the following guidelines: http://wiki.openqa.org/display/WTR/Support To unsubscribe from this group, send email to watir-general-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/watir-general -~----------~----~----~----~------~----~------~--~---