Call Toll Free: 1-888-484-3535    

  Automation Anywhere - The Automation Software

Automated Website Testing -> T63 - Test & Validate Online Shopping Cart functionality

Task Description: Online shopping cart is arguably the most important part of an E-Commerce site. Testing shopping cart is essential to success of any E-commerce site. This task shows how you can test online shopping cart.

Note: This sample task uses an example of www.barnesandnobel.com just for illustrative purposes.

Solution
1.Record a new task
  • Click on Tools->Web Recorder.
  • Type in http://www.barnesandnobel.com/ and click on Start
  • Select ISBN from the dropdown. Enter any ISBN number for e.g. 074322566X.
  • Click on Search.
  • Click on 'Add To Cart'
  • Click on 'View Entire Cart'
  • Click on 'Import Table' button from the toolbar on the bottom right hand corner of the screen.
  • Click in the 'Price' column to capture the pricing table.
  • Stop Recording and Save the task.
2.Validate your Shopping Cart
  • After Import Table command is executed, you can use System Variable command, $Table Column(index)$ to extract the row data of the Table when the task runs.
  • Open the Task in Editor to insert loop and conditional commands to validate the shopping cart.
  • Insert a Conditional command inside the Loop command to verify if the $Table Column(4)$ has the value 16.00 i.e. the price of the book. Screenshot 1
  • This way when you run the task it will import the tabular data of the shopping cart and look for the expected price and if found, will show a message box

How to find which index to use in System Variable $Table Column$?

  • While recording, when you click on the Import Table and capture a table, it will ask you for a csv file name.
  • Specify a valid filename.
  • Run the recorded task once. It will generate the csv file.
  • Open the csv file in Excel and find out which column your data is in and that is the index you need to use. Screenshot 2
 
When you run this task, it adds one book to the cart and validates the expected price of the book in the shopping cart.

Screenshot 1:

Screenshot 2:

 

Tags: automated software testing, load testing, web testing, automation software

E-Mail: Enter your email address to receive information about new products & offers from Tethys Solutions.


 PRODUCTS

 Automation Anywhere
   Standard & Premier
   Enterprise
 Workspace Macro Pro
 Workspace Macro
 Launch-n-Go
 Free Downloads
 Compare Products
 

 SOLUTIONS FOR

 Home & Home Office
 Business & IT
 Partners
 Developers
 

 SERVICES

 Ask The Expert
 Consulting Service
 

 PURCHASE

 BUY NOW
 Pricing
 Upgrades
 Our Guarantee

 SUPPORT

 FAQ & Examples
 Have a Question?
 Open A Support Case
 Forums
 

 QUICK LINKS

 Productivity Essentials
 Pre-defined Templates
 

 GENERAL

 Tell A Friend, Win a CD
 Affiliates
 Articles: Macro &
 Automation

 Get RSS Feeds

 Press & News
 Contact Us
Home |Site Map |Privacy Policy |About Us |Contact Us

Copyright © 2003-2008 Tethys Solutions, LLC. All rights reserved. Trademarks