0

I would like to get all the links from a page, which match on a specific pattern.

I try to do this with Regular Expression Extractor post processor with regex like this: <a[^>]* href="([^"]*)".

I checked response of GET command and found, those links are not visible in response, but links are only visible in browser, when mouse is over text.

Ori Marko
  • 56,308
  • 23
  • 131
  • 233
plaidshirt
  • 5,189
  • 19
  • 91
  • 181

2 Answers2

1

In general when mouse is over text the attribute title is used for the text

So in your case if title is after href you the following (group 2 for mouse over text)

<a[^>]* href="([^"]*)" title="([^"]*)"

and change Template to use second group as $2$

Ori Marko
  • 56,308
  • 23
  • 131
  • 233
1

Don't use regular expressions to parse HTML data.

I would recommend going for CSS/JQuery Extractor instead, the relevant configuration would be something like:

  • Reference Name: anything meaningful, i.e. link
  • CSS/JQuery Expression: a
  • Attribute: href
  • Match No: -1

JMeter CSS JQuery Extractor

You will be able to see all the extracted link URLs using Debug Sampler and View Results Tree listener combination. See How to Use the CSS/JQuery Extractor in JMeter article for more details.

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