Skip to main content

POS Automation - Verfiying latest Transaction xml

Overview

This tutorial provides step-by-step guidance on automating the process of verfiying latest Transaction xml after doing a simple sale.

What you will learn

How to use the following steps

  1. Verfiying latest Transaction xml

Pre-requisites

Should have a POS Setup and Automation Workspace Setup

Should have followed Tutorial - Sale

Exercises

Add Automation Script File

Right click on the Automated Tests project and create a new package in the test folder, feature.retail.pos.tutorials.sale

note

Make sure your package is registered in the testNG.xml

Right click on the package and create a new cucumber test PosVerifyTransactionXml.feature

Add the Steps

  • Add the steps for doing a sale by following the Tutorial - Sale

  • The only difference is that instead of verifying the receipt, the required properties will be validated from the Transaction XML.

  • To check the properties in the Transaction xml Refer Verify Latest Transaction xml

  • Finally, Your feature file would be like ,

 Scenario: Verifying the latest Transaction xml
Given user signs on as "Sales Assistant"
And user enters "${Product 1}" into "Input Box" field
And user presses "ENT" button
And "${Product 1 Description}" is displayed in "Receipt" list
When user presses "TOTAL" button and "Select Tender" page shown
And user presses "Cash" button and "Enter Cash Tender Amount" page shown
And user presses "OK" button and "Await Drawer Closed" page shown
And latest transaction xml contains
| normalRetailSaleTransaction.applicationId | POS |
| normalRetailSaleTransaction.basket.items.merchandiseItem.description | ${Product 1 Description} |
When user presses "Close" button on external "Cash Drawer" window
Then "Transaction Basket" page is shown
When user presses "SignOff" button
Then "Enter User" page is shown