How to store multiple values from the same object


I have a test case like below.

Let say I have 10 payment Types and each of ‘payment Type’ has different total amount.
How could I store the Total Amount values of these payment types for verifying matches in others’ report?


Hi @phtan84sally

I am not sure I understand. Can you describe what your test case is currently doing and what you would like it to do instead ? It’d be better to post a code snippet rather than the screenshot.


I would like to get text of the ‘Total Amount’ of the payment type then compare the value in the report.
My question is how could i store all the total amount?

for (def row = 2; row <= findTestData(‘BTL - Internal Transaction/PaymentType’).getRowNumbers(); row++) {
‘Search transaction by Payment Type’
WebUI.selectOptionByValue(findTestObject(‘Ob_Bank Transaction Log/Browse/filter_PaymentType’), findTestData(‘BTL - Internal Transaction/PaymentType’).getValue(
‘PaymentType’, row), true)

WebUI.waitForElementClickable(findTestObject('Ob_Bank Transaction Log/Browse/btn_Apply'), 2)'Ob_Bank Transaction Log/Browse/btn_Apply'), FailureHandling.STOP_ON_FAILURE)

WebUI.waitForElementPresent(findTestObject('Ob_Bank Transaction Log/Browse/_Listing/td_TotalAmount'), 2)

amountProcessed = WebUI.getText(findTestObject('Ob_Bank Transaction Log/Browse/_Listing/td_TotalAmount'), FailureHandling.STOP_ON_FAILURE)

deposit = WebUI.getText(findTestObject(‘Ob_Bank Transaction_Report/Payment Detail Report/Listing/td_Deposit’), FailureHandling.STOP_ON_FAILURE)

WebUI.verifyMatch(amountProcessed, deposit, true)