Items in the shopping cart - discussion 2

Ranorex Spy, Recorder, and Studio.
vdoddaguni
Posts: 11
Joined: Mon Apr 11, 2011 9:34 pm

Items in the shopping cart - discussion 2

Post by vdoddaguni » Sun Apr 17, 2011 2:40 pm

Hi

I need a clarification on this topic.

Here is the issue. A text is displayed on an html page as follows :-

You have 3 items in your shopping cart.

Using the Ranorex tool, can we capture the text "3" from the html page and put it into a variable for validation. The validation to be done is as follows :-

If the varNumberOfItems is > 0 then check out else continue shopping.

How can this logic be implemented in Ranoex. Please reply asap.

Thanks

User avatar
Support Team
Site Admin
Site Admin
Posts: 11710
Joined: Fri Jul 07, 2006 4:30 pm
Location: Graz, Austria

Re: Items in the shopping cart - discussion 2

Post by Support Team » Mon Apr 18, 2011 11:40 am

Hi,

you have to do this using user code as Roland answered on your last post:
http://www.ranorex.com/forum/items-in-t ... html#p8425

The only thing you have to additional do is to extract the number out of the string you get.
Therefore have a look at the string manipulation methods on following link:
http://msdn.microsoft.com/en-us/library ... 80%29.aspx

Regards,
Tobias
Support Team
.
Image