If at all possible, try to get a developer to add an id tag (or some
unique element attribute like name or value) to the href so that you
can locate it more easily.

Otherwise, you could try something like this:

$browser.link(:href, /some_unique_part_of_href/).click
or
$browser.link(:href, /some_unique_part_of_href/).fire_event('onclick')

Hope it helps.

orde

On Aug 12, 11:14 am, Melissa <meisa...@gmail.com> wrote:
> I'm trying to get my Watir test to click the link below, and I'm
> coming up empty. I've tried accessing it by text, href, title, cell,
> table, link index and anything else I could think of. It's such messy
> code - I'm starting to wonder if it's even possible to get at it.
>
> Any thoughts on what I can use to click the link? Thanks for any tips!
>
> <td nowrap title="Business Objects To Query" width="100" height="20"
> bgcolor="#efefe7" align="center" style="font-size:90%;border-
> right:#94a6ce 1px solid;padding-right:4px;border-top:#94a6ce 1px
> solid;padding-left:4px;border-left:#94a6ce 1px solid;width:
> 100px;color:black;border-bottom:#FF9900 1px solid;font-
> family:tahoma;height:20px;background-color:#efefe7;text-
> align:center;text-decoration:none;"><font face="tahoma" color="black">
> <a
> href="javascript:document.aspnetForm.__ctl00_TemplateBody_DesignShell1_ctl0 
> 0_ctl00_SectionTabStrip_State__.value='1';__doPostBack('ctl00$TemplateBody
> $DesignShell1$ctl00$ctl00$SectionTabStrip','1')">
> <font color="black">Sources</font></a></font>
> </td>

-- 
Before posting, please read http://watir.com/support. In short: search before 
you ask, be nice.

You received this message because you are subscribed to 
http://groups.google.com/group/watir-general
To post: watir-general@googlegroups.com
To unsubscribe: watir-general+unsubscr...@googlegroups.com

Reply via email to