# How to get the root of a web application with watir/firewati

**URL:** <https://www.ruby-forum.com/t/how-to-get-the-root-of-a-web-application-with-watir-firewati/122080>\
**Category:** Ruby\
**Created:** [December 4, 2007, 2:18pm UTC](https://www.ruby-forum.com/t/how-to-get-the-root-of-a-web-application-with-watir-firewati/122080 "2007-12-04T14:18: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 4, 2007, 2:18pm UTC](https://www.ruby-forum.com/t/how-to-get-the-root-of-a-web-application-with-watir-firewati/122080/1 "2007-12-04T14:18:56Z")

</div>

Hi,  
Somebody knows how to get the root of the web application.  
For example if I am in: www.elmundo.es/ppe/sskk/aaa.htm the root maybe  
can be www.elmundo.es/ppe/ or maybe is www.elmundo.es/

I’m using watir / firewatir.

Thank you 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 5, 2007, 10:55am UTC](https://www.ruby-forum.com/t/how-to-get-the-root-of-a-web-application-with-watir-firewati/122080/2 "2007-12-05T10:55:34Z")

</div>

I’m going to give you more information that can be useful for the  
matter:

Firewatir is giving me the relative url and not the absolute as I need.  
I’m using the next example:  
links=ff.links()  
hrefLinks=Array.new()  
a=0  
links.each {|link| hrefLinks[a]= link.href; a=a+1}

But I’m storing only the relative url and I need to store the absolute  
one.

Thank you in advance.
