Items in the shopping cart - discussion 2

Ranorex Studio, Spy, Recorder, and Driver.
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


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.


User avatar
Support Team
Site Admin
Site Admin
Posts: 12145
Joined: Fri Jul 07, 2006 4:30 pm
Location: Houston, Texas, USA

Re: Items in the shopping cart - discussion 2

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


you have to do this using user code as Roland answered on your last post: ... 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: ... 80%29.aspx

Support Team