Data driven test case

Hi Ashwani

You can do this if you store the details of the 20 people (and all the details related to those 20 people) in a CSV file.

e.g. CSV file called “UserDetails.csv” with the contents:

“Number,FirstName,LastName,Age,Postcode,Email
1,Bob,Geldof,61,20004,test1@email.com
2,Jane,Katies,39,20003,test2@email.com
3,Grant,Kemp,24,20002,test3@email.com
4,Richard,Hampsted,18,20001,test4@email.com
…etc… (making sure that you put in the details for all 20 people here)

You can then load this CSV file into Katalon Recorder via the “Data Driven” tab in there

In Katalon Recorder you can then create a script like so

loadVars | UserDetails.csv |
open | https://www.websiteaddress.com/form.html |
type | name=firstname | $FirstName
type | name=lastname | $LastName
select | id=age-dropdown | label=$Age
type | name=age | $Age
type | name=postcode | $Postcode
type | name=emailaddress | $Email
clickAndWait | xpath=(//button[@type=‘submit’])[1] |
endLoadVars | |

This will then run the steps between loadVars and endLoadVars and keep looping through these steps till it reaches the end of the file.

Hope that this helps!

1 Like