0

Here is the sample view

Home Home

I have tried $1$$21$$41$$61$$81$$101$$121$$141$$161$$181$$201$$221$$241$$261$$281$$301$

but its not get correct value

2 Answers2

1

One of the solutions could be:

  1. Create a user-defined variable, suppose "my_variable"
  2. Create a "Regular Expression" which will list all the values from the response, Test it using expression tester
  3. Now under the sample from where you want to extract the information, create a JSR223 Post Processor and use the sample code as per below:

Code Details

Jeremy Caney
  • 7,102
  • 69
  • 48
  • 77
Pushpendra
  • 21
  • 3
0

We cannot help you without seeing:

  1. Full (or at least partial) response containing the "values" you want to extract
  2. How you're going to re-use them in the next request

One thing is obvious: using regular expressions for extracting values from HTML is not the best idea, I would recommend going for CSS Selector Extractor instead, given your response data:

<a class="main mainAnchor current currentAnchor" tabindex="-1" href="Form1"> <span>Home</span> <a
        class="main mainAnchor parent parentAnchor" tabindex="-1" href="Form2"><a
        class="main mainAnchor current currentAnchor" tabindex="-1" href="Form3"> <span>Home</span> <a
        class="main mainAnchor parent parentAnchor" tabindex="-1" href="Form4">

You can extract all href attributes of the <a> element as simple as:

enter image description here

More information: CSS Selector Reference

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