0
votes

Could you help me with this Beanshell Assertion code:

I need to add 3 AND conditions & in the 3rd AND condition I need to add OR condition as well and I have tried the following code and I am getting the error "BeanShellInterpreter: Error invoking bsh method: eval Sourced file: inline evaluation of: ``String Response1 = prev.getResponseDataAsString(); String Response2 = prev.getRe . . . '' : Operator: '"||"' inappropriate for objects "

Please click on the link to view the code I tried:

enter image description here

1
Please post your code as text within your question. That way people can copy and paste it for testing.Chris

1 Answers

0
votes

Your or condition should be between boolean expressions. So end your line with

  &&  (Response3.contains("Value4") || Response3.contains("Value5"))

Notice also that the convention for Java variables is starting with a lowerCase character as response3