0

How to extract a token value which is available only in Inspect elements-> Application (Not in Inspect Elements-> Network) thru Jmeter?

enter image description here

enter image description here

imxitiz
  • 3,920
  • 3
  • 9
  • 33
gopi
  • 1

2 Answers2

1

The access token value is available in the response headers. You can use a post-processor element to extract the access token from the header.

Here is an example to extract the access token using a Regular Expression Extractor Post-processor

enter image description here

Janesh Kodikara
  • 1,670
  • 1
  • 12
  • 23
1

It comes as a Cookie so the easiest way to extract it is to:

  1. Add HTTP Cookie manager to your Test Plan

  2. Add the next line to user.properties file (lives in "bin" folder of your JMeter installation)

    CookieManager.save.cookies=true
    
  3. Restart JMeter to pick the change from point 2

  4. Once done you should be able to access the token as ${COOKIE_accesstoken} where required

More information:

Dmitri T
  • 159,985
  • 5
  • 83
  • 133