Items in the shopping cart

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

Hi,

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.

Thanks

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

Re: Items in the shopping cart

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

Hello,

- 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");
Regards,
Roland
Ranorex Support Team