# Ruby/watir question

**URL:** <https://www.ruby-forum.com/t/ruby-watir-question/69416>\
**Category:** Ruby\
**Created:** [September 20, 2006, 10:42pm UTC](https://www.ruby-forum.com/t/ruby-watir-question/69416 "2006-09-20T22:42:00Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![newyorkdolluk](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/n/0ea827/32.png) [@newyorkdolluk](https://www.ruby-forum.com/u/newyorkdolluk)\
**Post date:** [September 20, 2006, 10:42pm UTC](https://www.ruby-forum.com/t/ruby-watir-question/69416/1 "2006-09-20T22:42:00Z")

</div>

hi,

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

- Planning

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

thanks

---

<div class="post-metadata">

**Author:** ![newyorkdolluk](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/n/0ea827/32.png) [@newyorkdolluk](https://www.ruby-forum.com/u/newyorkdolluk)\
**Post date:** [September 21, 2006, 1:32am UTC](https://www.ruby-forum.com/t/ruby-watir-question/69416/2 "2006-09-21T01:32:15Z")

</div>

newyorkdolluk wrote:

> - Planning
> 
> 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?

---

<div class="post-metadata">

**Author:** ![newyorkdolluk](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/n/0ea827/32.png) [@newyorkdolluk](https://www.ruby-forum.com/u/newyorkdolluk)\
**Post date:** [September 21, 2006, 7:56am UTC](https://www.ruby-forum.com/t/ruby-watir-question/69416/3 "2006-09-21T07:56:49Z")

</div>

had a play with it, but can’t seem to hit it. click\_link\_with\_name  
seems a bit too simple  
can you elaborate?

---

<div class="post-metadata">

**Author:** ![newyorkdolluk](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/n/0ea827/32.png) [@newyorkdolluk](https://www.ruby-forum.com/u/newyorkdolluk)\
**Post date:** [September 21, 2006, 8:06am UTC](https://www.ruby-forum.com/t/ruby-watir-question/69416/4 "2006-09-21T08:06:51Z")

</div>

had a play with it, but can’t seem to hit it. click\_link\_with\_name  
seems a bit too simple  
can you elaborate?

---

<div class="post-metadata">

**Author:** ![newyorkdolluk](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/n/0ea827/32.png) [@newyorkdolluk](https://www.ruby-forum.com/u/newyorkdolluk)\
**Post date:** [September 25, 2006, 5:45pm UTC](https://www.ruby-forum.com/t/ruby-watir-question/69416/5 "2006-09-25T17:45:42Z")

</div>

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):
> 
> - Planning
> 
> 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()
