Ruby/watir question

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

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.us/ZeekLand <-- NOT a blog!!!

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-forum.com/\.

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.us/ZeekLand <-- NOT a blog!!!

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.us/ZeekLand <-- NOT a blog!!!