inferHtmlResources throwing error when passing Whitelist & Blacklist

Gatling version: 3.4.2
Scala: 2.12

My 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

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

I suspect you’ve removed or broken the required imports, in particular:

import io.gatling.core.Predef._

Thanks for the response. Following your suggestion, I played with the imports. In particular changed the order these imports to this from what was earlier and it started working

import io.gatling.http.Predef._
import io.gatling.core.Predef.{rampUsers, _}

This is broken, you should only have import io.gatling.http.Predef._