Items in the shopping cart

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

Items in the shopping cart

Post by vdoddaguni » Thu Apr 14, 2011 10:45 pm


Our web sites enable customers to view products and make purchases. Using Ranorex, I would like to view the items in the shopping cart. If there are more than zero items, I would like to log an error message to the report file.

How can we do this in Ranorex. Please advise.


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

Re: Items in the shopping cart

Post by Support Team » Thu Apr 14, 2011 11:17 pm


- record the action needed to get to the shopping cart.
- click on the element that contains the number of items
- stop recording
- in the action list "Convert to User Code" (context menu) the mouse click on the number
- in the user code you can now
if (Convert.ToInt32(repo.WebDocumentxxx.YouAdapterName.InnerText) > 0)
				Report.Error("your error message");
Ranorex Support Team