Hi! Is this the only instance of the 'Add Another State' text?
Maybe you've tried more than the code you listed, but if you haven't, you may be making this harder than you need to. Have you tried just accessing it as a span or link? ie.link(:text, 'Add Another State').click ie.span(:text, 'Add Another State').click Hope this helps! -Tiffany On Dec 7, 3:21 pm, LizLeong <elc.le...@gmail.com> wrote: > I'm running Ruby1.8.7 patchlevel 249 with Watir 1.6.7 on WinXP. > > I'm trying to click on the text "Add Another State" on a web page. It > looks like a link, but I am having trouble hooking onto it. > > The structure is: > <div class="mainModule"> > <form name="stateBar" id="stateBar" action="http://www.website.com/ > insert" method="post"> > <div> > <span id="writeBar"/> > <div style="text-align: right; width...."> > <a onclick="addState(3); $('a[id ^=dellink]'.show(); > return false;" href="#"> > Text - Add Another State > Text - Empty Text Node > > I've tried the following unsuccessfully. I tried to use flash also > and didn't see anything highlighted either. > ie.div(:class=>"mainModule").div(:text=>"Add Another State").click > ie.div(:class=>"mainModule").div(:href=>"#").click > ie.span(:text,"Add Another State").link(:text,"Add Another > State").click > > Maybe there's no way to do what I want, even knowing that would > help! -- Before posting, please read http://watir.com/support. In short: search before you ask, be nice. watir-general@googlegroups.com http://groups.google.com/group/watir-general watir-general+unsubscr...@googlegroups.com