# Watir: how to get the url in a frame

**URL:** <https://www.ruby-forum.com/t/watir-how-to-get-the-url-in-a-frame/122316>\
**Category:** Ruby\
**Created:** [December 6, 2007, 4:26pm UTC](https://www.ruby-forum.com/t/watir-how-to-get-the-url-in-a-frame/122316 "2007-12-06T16:26:56Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![tcblues](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/t/db5fbb/32.png) [@tcblues](https://www.ruby-forum.com/u/tcblues)\
**Post date:** [December 6, 2007, 4:26pm UTC](https://www.ruby-forum.com/t/watir-how-to-get-the-url-in-a-frame/122316/1 "2007-12-06T16:26:56Z")

</div>

I’m using this code:

class GiveMe(frame)  
def initialize  
@frameURL=frame.url()

```
a few operations with this data

```

return result  
end  
end

nav=Watir::IE.new()  
nav.goto(“[http://es-aas.com/customers/info/ettem.do](http://es-aas.com/customers/info/ettem.do)”)

isok=GiveMe.new(nav.frame(“top”).frame(“data”))  
…  
isok=GiveMe.new(nav.frame(“main”))  
…  
isok=GiveMe.new(nav)  
…

This is working only for the last case  
How can I get the url of a frame?

Thanks in advance.

---

<div class="post-metadata">

**Author:** ![tcblues](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/t/db5fbb/32.png) [@tcblues](https://www.ruby-forum.com/u/tcblues)\
**Post date:** [December 10, 2007, 10:50am UTC](https://www.ruby-forum.com/t/watir-how-to-get-the-url-in-a-frame/122316/2 "2007-12-10T10:50:26Z")

</div>

No ideas?
