2

Using jMeter 4.0, I need to extract the value of an element which I cannot identify directly, but I can identify one of its siblings.

I want to use jQuery like so: $("#someId").parent().find(".title") That is garden variety jQuery: 'get the parent of the element, then within it get the element with the class title'.

This sounds simple enough, but I cant get it to work in jMeter. All examples/articles I could find about the CSS/jQuery extractor use CSS rather than jQuery.

Is there anything special I should do? Does anyone have an example?

Ori Marko
  • 56,308
  • 23
  • 131
  • 233
RKMNRGRT
  • 33
  • 4

1 Answers1

3

Actually CSS/JQuery Extractor is an HTML extractor, JMeter supports Jsoup by default (or Jodd CSSelly) parser which is used for parsing HTML

parses HTML to the same DOM as modern browsers do

The JQuery/CSS is actually only the syntax used in the expression

Allows the user to extract values from a server response using a CSS/JQuery selector like syntax

jsoup elements support a CSS (or jquery) like selector syntax to find matching elements

EDIT

The name changed in JMeter 5 to HTML Extractor CSS Selector Extractor, following an enhancement to avoid confusion

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