Lorraine,
Actually, I wrote a page object library that can do this sort of thing.
Assuming that you have defined a page object for the Client page, and you
are on the page for a particular client, you could just do something like
this to get the client guid:
site.page.arguments[:client]
Libra
Use a regular expression. Assuming that the URL is
"http://www.mysite.com/client/abcde012345":
browser.url.match(%r{/client/(.*)})[1]
=> "abcde012345"
From: Lorraine Botros
To: watir-general@googlegroups.com
Sent: Tuesday, June 16, 2015 4:24 PM
Subject: [wtr-general] Code suggestions o
you can always get the browser url but I would not take this approach.
I would probably do something different dependent on the actual scenario
you are trying to test.
On Tue, Jun 16, 2015 at 7:24 PM, Lorraine Botros
wrote:
> The site I am automating creates a unique guid when a new client is
>
The site I am automating creates a unique guid when a new client is created
so I will see something like http://www.mysite.com/client/abcde012345 where
'abcde012345 is the unique identifier for that client. I want to get that
value and use it to append to another link such as
http://www.mysite.
no luck prahu...below error i am getting
unable to locate element, using {:id=>"customer-list-item",
:tag_name=>"div"} (Watir::Exception::UnknownObjectException)
On Wed, Jun 17, 2015 at 11:05 AM, Velraj Prabhu
wrote:
> Hi Siddhu,
>
> Try the below mentioned code
>
> customer_list =
> browser.d