I am new to Scala as well as Gatling. I first tried doing a print of my variables as in:
println(session.getAttribute(“mykeytovar”)) // var is css(…).findAll.saveAs(“mykeytovar”)
But I noticed the print didn’t give me anything … only a list of commas.
What I really want to do is to access the css nodes from findAll and perform a series of steps as in extracting attribute values from the css nodes. Ideally I want to ‘map’ each node when I do:
http(“My Request”).get(“myUrl”).check(status.is(200),
css("div … ")
.findAll
.transform( ? ) // return some sort of map(extract_attrib_values) which returns a collection
.transform( ? ) // randomly pick 1
.saveAs(“myVar”)
)
Is there any easy way to do this? I prefer to use css selector over regex in this case.