inferHtmlResources in Gatling http configuration throws error

Viewed 161

This is my Gatling http configuration

  val httpConf = http
    .maxConnectionsPerHostLikeChrome
    .baseUrl(BASE_URL)
    .inferHtmlResources(BlackList, WhiteList(BASE_URL+"/*"))
    .headers(headers)
    .userAgentHeader("Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/86.0.4240.198 Safari/537.36")
    .disableCaching

The inferHtmlResources usage here is throwing an error

 found   : String
 required: io.gatling.core.session.Session
    .inferHtmlResources(BlackList, WhiteList(BASE_URL+"/*"))
                                                     ^
20:23:19.820 [ERROR] i.g.c.ZincCompiler$ - one error found
20:23:19.825 [ERROR] i.g.c.ZincCompiler$ - Compilation crashed

My code seems to be inline with the gatling documentation here

My Gatling Version is 3.4.2 Java JDK11 Scala 2.12

Can anyone point me why I am getting this error and how can I fix this. Thank you.

0 Answers
Related