[lnkForumImage]
TotalShareware - Download Free Software

Confronta i prezzi di migliaia di prodotti.
Asp Forum
 Home | Login | Register | Search 


 

Forums >

comp.lang.ruby

ruby/watir question

newyorkdolluk

9/20/2006 8:39:00 PM

hi,

i am trying to click a tab on a web page and the source reveals this as
the entry (within a table):

<li id="nav-plan">
<a href="Content.aspx?tab=plan"
onClick="getMenu(2,'plan')"target="wwmain">Planning</a>
</li>

can anyone tell me the ruby/watir code to click this?

thanks

4 Answers

Phlip

9/20/2006 11:27:00 PM

0

newyorkdolluk wrote:

> <li id="nav-plan">
> <a href="Content.aspx?tab=plan"
> onClick="getMenu(2,'plan')"target="wwmain">Planning</a>
> </li>
>
> can anyone tell me the ruby/watir code to click this?

Did you try my suggestion (Watir::Simple::click_link_with_name()) from the
other newsgroup?

--
Phlip
http://www.greencheese.u... <-- NOT a blog!!!


newyorkdolluk

9/21/2006 5:51:00 AM

0

had a play with it, but can't seem to hit it. click_link_with_name
seems a bit too simple
can you elaborate?

Phlip wrote:
> newyorkdolluk wrote:
>
> > <li id="nav-plan">
> > <a href="Content.aspx?tab=plan"
> > onClick="getMenu(2,'plan')"target="wwmain">Planning</a>
> > </li>
> >
> > can anyone tell me the ruby/watir code to click this?
>
> Did you try my suggestion (Watir::Simple::click_link_with_name()) from the
> other newsgroup?
>
> --
> Phlip
> http://www.greencheese.u... <-- NOT a blog!!!

newyorkdolluk

9/21/2006 6:03:00 AM

0

had a play with it, but can't seem to hit it. click_link_with_name
seems a bit too simple
can you elaborate?

Phlip wrote:
> newyorkdolluk wrote:
>
> > <li id="nav-plan">
> > <a href="Content.aspx?tab=plan"
> > onClick="getMenu(2,'plan')"target="wwmain">Planning</a>
> > </li>
> >
> > can anyone tell me the ruby/watir code to click this?
>
> Did you try my suggestion (Watir::Simple::click_link_with_name()) from the
> other newsgroup?
>
> --
> Phlip
> http://www.greencheese.u... <-- NOT a blog!!!

Patrick Spence

9/25/2006 3:46:00 PM

0

newyorkdolluk wrote:
> hi,
>
> i am trying to click a tab on a web page and the source reveals this as
> the entry (within a table):
>
> <li id="nav-plan">
> <a href="Content.aspx?tab=plan"
> onClick="getMenu(2,'plan')"target="wwmain">Planning</a>
> </li>
>
> can anyone tell me the ruby/watir code to click this?
>
> thanks

Assuming the variable referencing the IE controller is $ie...

$ie.link(:text, /planning/i).click()


--
Posted via http://www.ruby-....