jmeter-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Flavio Cysne <>
Subject Re: Assert Checkbox value if checked
Date Sat, 25 May 2013 12:50:11 GMT
Challenge accepted!!! :)

I used a XPath Extractor post-processor with the XPath below to return all
checkboxes checked attribute's values

//input[@type='checkbox']/@checked | //input[@type='checkbox' and

Using this page as a testing target:

The result showed in View Results Tree was:


Instead of a CSV with true and false you should use checked and empty

Hope it helps

2013/5/24 Robin D. Wilson <>

> You need to create all of your response assertions as direct children of
> the response, and then (after collecting all of the values) check them with
> the if statement(s).
> --
> Robin D. Wilson
> VOICE: 512-777-1861
> On May 24, 2013, at 3:39 PM, Aaron Tracy <> wrote:
> Hi all!
>  Hopefully this question is easy to answer :D   My webpage contains a
> bunch of checkmarks on it so I was hoping to do a regular expression
> extraction on each checkbox, then in an If controller check if the checkbox
> is to be checked (I have a .csv file that tells me which checkboxes are to
> be checked).  If it is to be checked, then verify the regular expression
> that was extracted contains "checked" in it.
>  To do this validation, I'm using an IF controller and it appears that
> once I jump into the IF controller (I only check the checkbox if it is
> supposed to be checked), the response assertion loses scope and no longer
> can see the http request to perform the evaluation on.   I don't need to
> use a response assertion but I'm not sure which assertion type I can use to
> compare two variables to each other.  I was thinking of a beanshell
> assertion, does anyone have a good example of a beanshell or other method
> where I can evaluate these two strings and have the assertion pass if both
> variables are equal and fail if they aren't?
> Thanks!
> Aaron
> ---------------------------------------------------------------------
> To unsubscribe, e-mail:
> For additional commands, e-mail:

  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message