Here you go:

destination_url = browser.url
puts destination_url

*browser is the name of your browser variable...



On Apr 2, 2:06 pm, Tester78 <hmtest...@gmail.com> wrote:
> I am really new to watir and need some help on how to go about testing
> this case. I am trying to test a next button on a page.   If I am on
> the homepage(http://example.com/1.aspx.com) and click the next button,
> I am taken to the next page with the url(http://example.com/
> 2.aspx.com). If I hit next again the ending url changes to 3.aspx and
> so on.
>
> I inspected the next button on the home page with firebug and this is
> what I have:
> <a class="next" title="Next Page" href="2.aspx">
> Next »
> <span/>
> </a>
>
> So I can see that the button is pointing to 2.aspx. Is there a way to
> make watir click on that next button and verify that the url is
> changed to 2.aspx? This is probably easy for you guys but I am really
> new.
>
> Please let me know if you need me to be more specific. Thanks
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Watir General" group.
To post to this group, send email to watir-general@googlegroups.com
Before posting, please read the following guidelines: 
http://wiki.openqa.org/display/WTR/Support
To unsubscribe from this group, send email to 
watir-general-unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/watir-general
-~----------~----~----~----~------~----~------~--~---

Reply via email to