0

I am trying to write pre request script to get value from csv file to store in variable and use on xml body, but I don't know where to start.

Postman Xml body that I will get a value csv file to assign a value on FirstName_Variable , LastName_Variable , Country_Variable

<FirstName>FirstName_Variable</FirstName>
<LastName>LastName_Variable</LastName>
<Country>Country_Variable</Country>
<Product>Loan</Product>

My Csv File

FirstName LastName Country
Antname Lnant Japan
Birdname Lnbird Japan

1 Answers1

0

Step 1: Set variable in Body tab, make sure name of varibale is same name of table in csv file.

enter image description here

enter image description here

Step 2: Run by Runner function of Postman. (bottom left of Postman UI)

enter image description here

Step 3 (optional): Check request body in console tab.

enter image description here

lucas-nguyen-17
  • 5,516
  • 2
  • 9
  • 20