Hello, John,

You can use the Addressable library ( http://addressable.rubyforge.org/  or
gem install addressable ) then use the following:

@url = Addressable::URI.parse(@ie.url)

@ticket = @url.query_values["ticket"]

p @ticket

Hope that helps,

FK

On Thu, Apr 29, 2010 at 1:35 PM, John Williams <[email protected]> wrote:

> I'm using Watir in IE to test a website where many URLs are
> dynamically generated with a unique ticket parameter. How do I grab
> this ticket parameter from the URL once I get to the page?
>
> For example, when I use Watir to go to a URL like:
>
> http://www.mydomain.com
>
> I end up on a page with dynamically generated parameters like this:
>
>
> http://www.mydomain.com/index?ticket=86aa224f8ac26fd9543075f992c29f1c83e77958&randnum=034d28
>
> How do I get this dynamcially generated URL so that I can put together
> and go to additional dynamically generated URLs using the same ticket
> parameter?
>
> Thanks,
> John
>
> --
> Before posting, please read http://watir.com/support. In short: search
> before you ask, be nice.
>
> You received this message because you are subscribed to
> http://groups.google.com/group/watir-general
> To post: [email protected]
> To unsubscribe: 
> [email protected]<watir-general%[email protected]>
>

-- 
Before posting, please read http://watir.com/support. In short: search before 
you ask, be nice.

You received this message because you are subscribed to 
http://groups.google.com/group/watir-general
To post: [email protected]
To unsubscribe: [email protected]

Reply via email to