I need to use the parameters from one request in another request's URL parameter. The code snippet is as follows:
Scenario: Lists all Students (limited information)
Given path "/students"
When method GET
Then status 200
* def student = response.students[0]
Then print student
Scenario: GET - Retrieve the complete details of a Student
Given path "/students/" + student.id
When method GET
Then status 200
Then print response
On using this karate throws the following exception:
ReferenceError: "student" is not defined in <eval> at line number 1
What went wrong here? Any help would be appreciated.