title: In gatling, how do I validate the value of a string extracted via the css check?
body: <p>I'm writing a Gatling simulation, and I want to verify both that a certain element exists, and that the content of one of its attributes starts with a certain substring. E.g.:</p>
  
  <pre><code>val scn: ScenarioBuilder = scenario("BasicSimulation")
    .exec(http("request_1")
    .get("/path/to/resource")
    .check(
      status.is(200),
      css("form#name", "action").ofType[String].startsWith(BASE_URL).saveAs("next_url")))
  </code></pre>
  
  <p>Now, when I add the <code>startsWith</code> above, the compiler reports an error that says <code>startsWith is not a member of io.gatling.http.check.body.HttpBodyCssCheckBuilder[String]</code>. If I leave the <code>startsWith</code> out, then everything works just fine. I know that the expected form element is <em>there</em>, but I cant confirm that its <code>@action</code> attribute starts with the correct base.</p>
  
  <p>How can I confirm that the attribute start with a certain substring?</p>