Page 1 of 1

Items in the shopping cart - discussion 2

Posted: Sun Apr 17, 2011 2:40 pm
by vdoddaguni
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

Re: Items in the shopping cart - discussion 2

Posted: Mon Apr 18, 2011 11:40 am
by Support Team
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