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 not(@checked) Using this page as a testing target: http://fiddle.jshell.net/flaviocysne/TmMPF/show/light/ The result showed in View Results Tree was: chk_status_xpath=checked chk_status_xpath_1=checked chk_status_xpath_2= chk_status_xpath_3= chk_status_xpath_4=checked chk_status_xpath_5=checked chk_status_xpath_matchNr=5 Instead of a CSV with true and false you should use checked and empty string. Hope it helps 2013/5/24 Robin D. Wilson <[email protected]> > 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 <[email protected]> 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: [email protected] > For additional commands, e-mail: [email protected] > >
