I have been trying the javascript in jmeter while controller, and am using below function
${__javaScript(("${app_status_g1}".indexOf("100") == -1 && ${App_status_counter} < 10),)}
app_status_g1 is extracted from the regex extractor inside the while controller
However, I get the exception jmeter logs:
JavaScript: Error processing Javascript: [("${app_status_g1}".indexOf("100") == -1 && ${App_status_counter} < 10)]
javax.script.ScriptException: <eval>:1:45 Expected ) but found {
("${app_status_g1}".indexOf("100") == -1 && ${App_status_counter} < 10)
^ in <eval> at line number 1 at column number 45
Tried few combinations with parentheses but not able to get the cause of problem. But looks like while controller still works.
Any help will be appreciated.