How to capture a unique identifier in a Web UI and reuse the identifier in additional tests

Hi Katalon Community, i’m fairly new to Katalon Studio and need some help.

I am automating a Web UI application where it generates ticket numbers.
I am trying to capture the ticket number in 1 test and need to use that ticket number in additional tests as part of the end to end flow.
Each time i execute the flow it will create a unique ticket number so i cannot use a test data file.
Is there a way to do this using the Katalon Recorder?

High Level Example:

  1. One user logs in and generates a ticket number
  2. A different user then logs in and searches for that specific ticket number from a large list of generated ticket numbers

In general terms, i want to copy the ticket number from step 1 and paste it into a search bar in step 2

Any help would be very much appreciated

Regards,

Robert

1 Like

Hi,

Welcome to the community. Can you please share the version you are using?

1 Like

Hi,

I am currently working with version 8.6.6-65709

Regards,

Robert

1 Like

Just a note that you are using the Web Recorder of Katalon Studio, not Katalon Recorder. KR is a separate application completely.

If you want to have the identifier available from one Test Suite into another, then you either have to save the identifier to disk or run the Test Cases or Test Suites together somehow, like in a Test Collection.

There is no WebUI keyword that you can use to save the identifier to disk (text file or spreadsheet) so that you can read it into the next Test Suite. However, there are ways that you can do this, like the below (using the Script tab).

Edit: There are other answers on this forum that you can see other methods to save to disk.

Edit2: You cannot have the spreadsheet open when you run your Test Case as that creates a lock on the file that will cause KS to fail.

Moved this thread into the relevant category.