you could try using a fire event statment such as

@browswer.link(:text, "Add Another State").fire_event("onmousedown")
or similar...

On Tue, Dec 7, 2010 at 2:21 PM, LizLeong <[email protected]> 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.
>
> [email protected]
> http://groups.google.com/group/watir-general
> [email protected]<http://groups.google.com/group/watir-general%[email protected]>
>

-- 
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]

Reply via email to