# Clicking web page tab

**URL:** <https://www.ruby-forum.com/t/clicking-web-page-tab/69503>\
**Category:** Ruby\
**Created:** [September 21, 2006, 1:35pm UTC](https://www.ruby-forum.com/t/clicking-web-page-tab/69503 "2006-09-21T13:35:27Z")\
**Posts on this page:** 3\
**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 21, 2006, 1:35pm UTC](https://www.ruby-forum.com/t/clicking-web-page-tab/69503/1 "2006-09-21T13:35:27Z")

</div>

i have a tab on a web page that i want watir/ruby to click.

the DOM has it down as:

 ... ... 

| 
- can anyone suggest a ruby/watir command to simulate the click

 |

---

<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 22, 2006, 3:43pm UTC](https://www.ruby-forum.com/t/clicking-web-page-tab/69503/2 "2006-09-22T15:43:18Z")

</div>

You can try SWExplorerAutomation (SWEA) from  
http:\webunittesting.com. With SWEA you don’t need to dig into the  
DOM structure. SWEA is .Net API, but you can call it from [RUBY.NET](http://RUBY.NET)

---

<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 26, 2006, 10:46am UTC](https://www.ruby-forum.com/t/clicking-web-page-tab/69503/3 "2006-09-26T10:46:14Z")

</div>

newyorkdolluk wrote:

> ```
> <TD id=tabWrap>
> <DIV class=admin id=header>
> <LI id=nav-plan>
> 
> ```
> 
> can anyone suggest a ruby/watir command to simulate the click

ie.frame(:id, ‘topMenu’).div(:id, ‘header’).click

Watir requires you to specify frames. Other elements are optional,  
except to avoid ambiguity.

Bret
