Data driven test case

I want to execute multiple data from csv/excel file how can i do it using katalon recorder only , for example submitting form of personal details of 20 persons in a website

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