Hi all
So I am very new to Katalon. Let me try and explain the best I can.
On one tab I perform an action which results in a response in another part of the site. I change tabs and navigate to the page which lists the responses by latest.
The issue that I am currently facing, is that when recording, I click on the latest response in the table grid which creates a pop up where I can get further information. This however creates an Object Repository for only the response that I clicked e.g.
WebUI.click(findTestObject(‘Object Repository/Page_Inscape Connect - Communication Detail/td_Dear FirstName SurnameI am pleased to se_a03272’))
When I run the test case again, instead of selecting the most recent response (which I actually need) it will select the Object that I showed above (ending in a03272)
Is there a way to rather look for the most recent on the table grid and always click the most recent?
EDIT FOR CLARIFICATION:
I have added the following code. As you will see, I go through an Enrolment, and to give context, on the other window I need to get the OTP that is generated for the Enrolment.
This is the problem. When I switch to the other window and navigate to the correct place, I am presented with a table grid which is clickable to generate a popup. Now when I did this in the recorded, it recorded the specific row in the table grid, however I want to click on the most recent row in the table grid. Does this info help more?
WebUI.switchToWindowIndex(currentTab + 1)
WebUI.navigateToUrl('https://inscape-operations-staging.stratusolvecloud.com/App/Student/Workflow/NewEnrolment/2022')
WebUI.setText(findTestObject('Object Repository/Page_Connect - Operations - Student Enrolment/input_Welcome to INCONNECT - our online stu_0eecac'),
'Testing')
WebUI.setText(findTestObject('Object Repository/Page_Connect - Operations - Student Enrolment/input_Welcome to INCONNECT - our online stu_d2ddfb'),
'Katalon')
WebUI.setText(findTestObject('Object Repository/Page_Connect - Operations - Student Enrolment/input_land Islands_cell'),
'0426379462')
WebUI.setText(findTestObject('Object Repository/Page_Connect - Operations - Student Enrolment/input_Valid_c3'), 'hsfhsfdgh@dfgdg.com')
WebUI.selectOptionByValue(findTestObject('Object Repository/Page_Connect - Operations - Student Enrolment/select_Country of OriginSouth AfricaUnited _72b9c5'),
'1', true)
WebUI.selectOptionByValue(findTestObject('Object Repository/Page_Connect - Operations - Student Enrolment/select_--Select ID Type--RSA ID NumberPassp_e4a2f7'),
'2', true)
WebUI.setText(findTestObject('Object Repository/Page_Connect - Operations - Student Enrolment/input_Valid_c7'), 'kattest1!')
WebUI.setEncryptedText(findTestObject('Object Repository/Page_Connect - Operations - Student Enrolment/input_Valid_c4'),
'p4y+y39Ir5PEPmX20UxFKw==')
WebUI.setEncryptedText(findTestObject('Object Repository/Page_Connect - Operations - Student Enrolment/input_A digit (0-9) is required_c5'),
'p4y+y39Ir5PEPmX20UxFKw==')
WebUI.click(findTestObject('Object Repository/Page_Connect - Operations - Student Enrolment/input_land Islands_cell'))
WebUI.click(findTestObject('Object Repository/Page_Connect - Operations - Student Enrolment/button_Next'))
WebUI.switchToWindowIndex(currentTab + 0)
WebUI.click(findTestObject('Object Repository/Page_Connect - Members - Individual Overview/a_Communication'))
WebUI.click(findTestObject('Object Repository/Page_Connect - Members - Individual Overview/a_Triggered Communications'))
WebUI.click(findTestObject('Object Repository/Page_Inscape Connect - Triggered Communications/td_Email Verification'))
WebUI.click(findTestObject('Object Repository/Page_Inscape Connect - Communication Detail/a_Message Recipients'))
WebUI.click(findTestObject('Object Repository/Page_Inscape Connect - Communication Detail/td_Dear FirstName SurnameI am pleased to se_a03272'))
WebUI.delay(5)
WebUI.closeWindowIndex(currentTab + 2)
I have attached two screenshots. Does this help?
So as you see, these are clickable “rows” in a table that cause a popup tab, and there are many. The second screenshot shows the next row below it.
Each row has its own “ID” so to speak, so currently when my test case runs, it just looks for the specific row that I clicked on in the recording, but I need to click on the most recent row everytime (the top one)