I am trying to test the existence of a string “Paged Mode” on the HTML response to play an additional Requette if the string exists.
I get the html response with :
.check(
bodyString.saveAs("""_body""")
)
I can view the HTML response to the console with :
.exec(session => {
val _body=session.getAttribute("_body")
println("HTML body ::: "+_body)
session
})
but, when I try to test whether the word “Paged Mode” exists or not, with the lines below, it does not work! :
.doIf(bodyString.toString().contains(“Mode paginé”))(
exec(http(“request_snake”)
.get("…")
)
)
and either with :
.doIf("""${_body}""".contains(“Mode paginé”))(
…
You have ideas or other solution to my problem.
Thank you