Capture unique Bearer token into variable and passed into header of request2

Sorry@djaiswal for late reply

Yes @harsh.vardhan have done it same. the point is when you run the TestSuite it will work with Global Variables. Kindly try tun that let me know

@gsp , yes it worked for TestSuite Run :grinning:

1 Like

Hi @gsp , now I have some other issue i.e., when run only with sendRequest then its PASS but when execute with sendRequestAndVerify then its failed.

See below: [Above written code is the same] now TestCase code

WS.sendRequestAndVerify(findTestObject(‘Token Genrate/Base Class (Data)’))

Test Cases/Country Package/Verify Packages By Country Code FAILED.
Reason:
groovy.lang.MissingPropertyException: No such property: access_token for class: internal.GlobalVariable

@harsh.vardhan

That’s because your and not using any value to verify the response.

Pls check below the document