# Getting an \<iframe\> in Watir

**URL:** <https://www.ruby-forum.com/t/getting-an-iframe-in-watir/107856>\
**Category:** Ruby\
**Created:** [June 26, 2007, 10:30pm UTC](https://www.ruby-forum.com/t/getting-an-iframe-in-watir/107856 "2007-06-26T22:30:34Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![jack](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/j/cc9497/32.png) [@jack](https://www.ruby-forum.com/u/jack)\
**Post date:** [June 26, 2007, 10:30pm UTC](https://www.ruby-forum.com/t/getting-an-iframe-in-watir/107856/1 "2007-06-26T22:30:34Z")

</div>

I am new to Ruby and Watir. I need to access a frame (iframe) in a  
popup window and click a link in the frame. The frame tag is as  
follows:

If I ie.show\_frames I get the following:

there are 1 frames  
frame index: 1 name:

Here is my code:

ie = Watir::IE.attach(:url,“mypage.jsp”) #  
ie.frame(:id, “facframe”).link(:text, “mylink”).click

Apparently, you can not access a frame by its id. If there is no  
“name” attribute, how do you get access to the frame?

ruby 186-25  
Watir 1.5.1.1081

Any ideas would be great. TIA.  
-Jack

---

<div class="post-metadata">

**Author:** ![jack](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/j/cc9497/32.png) [@jack](https://www.ruby-forum.com/u/jack)\
**Post date:** [June 28, 2007, 5:30am UTC](https://www.ruby-forum.com/t/getting-an-iframe-in-watir/107856/2 "2007-06-28T05:30:26Z")

</div>

What does ie.frame(“facframe”) yield?
