Selecting last row of table

Hi,

Is there a way to search for and select the last row of a table in Katalon Recorder?

For example, there are several rows with the same data displayed, but I want to choose the newest entry to this table, i.e. the last row.

so is there a way to write the command, target and value such that last row will be selected, table searches can be conducted from the bottom to the top?

Regards,

1 Like

I know this is a bit late, but here goes :slightly_smiling_face:

You can select the last row using the following XPath:

//tr[last()]

You can then select individual cells from that row like this:

//tr[last()]/td[<index>]

For example, select the second cell:

//tr[last()]/td[2]

Selecting the last cell in the last row:

//tr[last()]/td[last()]

Therefore, in Katalon Recorder, to get the text of the last cell in the last row we could use the following:
Command: storeText
Target: //tr[last()]/td[last()][text()]
Value: LastValue

Command: echo
Target: ${LastValue}

This last command will output the value in the Log window

2 Likes