gatling-cssselector is an extension for the Gatling stress tool that provides CSS Selector extraction based on CSSelly contains in project jodd.
gatling-cssselector is inspired of gatling-vtd
CSSelly is a Java implementation of the W3C Selectors Level 3 specification..
Just drop the gatling-cssselector-<version>.jar into the lib directory.
Use the following in you pom.xml :
<repository>
<id>excilys</id>
<name>Excilys Repository</name>
<url>http://repository.excilys.com/content/groups/public</url>
</repository>
<dependencies>
<dependency>
<groupId>gatling.cssselector</groupId>
<artifactId>gatling-cssselector</artifactId>
<version>1.0-SNAPSHOT</version>
</dependency>
</dependencies>
If you use the txt format, the required imports are automatically registered. If you use the scala format, add the following import :
import gatling.cssselector.http.check.body.HttpBodyCssSelectorCheckBuilder._
This will let you use the new extractor builtins.
check(cssSelector("#loginForm fieldset legend",innerHtml _).eq("Please log in"))
CSSelly use a BSD license.