-
Book Overview & Buying
-
Table Of Contents
-
Feedback & Rating

JMeter Cookbook
By :

JMeter offers CSS/jQuery Extractor that allows you to extract server responses using a CSS/jQuery-like syntax. This component was introduced in JMeter 2.9 and is particularly helpful when dealing with HTML responses. CSS/jQuery-like syntax allows you to easily select HTML DOM elements that might otherwise have been difficult to write a regular expression for, for example, selecting a button with a danger
class in the response (button.danger
), selecting images matching a particular regular expression (img[src~=(?i)\\.(png|jpeg|gif)]
), and so on. The default implementation of the CSS/jQuery implementation is JSoup (http://jsoup.org) and the API documentation for its selector can be found at http://jsoup.org/apidocs/org/jsoup/select/Selector.html.
In this recipe, we will cover how to use the CSS/jQuery Extractor component to extract information from server responses. Perform the following steps:
ch2_css_jquery.jmx
test script...Change the font size
Change margin width
Change background colour