Reputation: 63
I've got the following code and it won't allow me to break my message over multiple lines. I've looked at over a dozen stack exchange questions but none of them work.
Should Be Equal As Integers ${ans} 0 msg=Failed stuff, the accepted value did not match. Expected value \n
... was between max and min, returned value is below this
It is giving me the error
Keyword 'BuiltIn.Should Be Equal As Integers' got positional argument after named arguments. I've looked at the following links but they don't work
Upvotes: 1
Views: 716
Reputation: 118
Keep the error message on single line and you can Add ${\n}
at the end of the string to get a newline character.
I think, you are using a kw which has positional argument it may not allow using real new line using ...
However, you can use Catenate keyword with SEPARATOR=\n as below:
${str3} = Catenate SEPARATOR=\n line1 text
... line2 text
Upvotes: 0
Reputation: 1526
You can achieve this by using catenate
:
${ans} = Convert To Integer 1
${message} = Catenate Failed stuff, the accepted value did not match. Expected value \n
... was between max and min, returned value is below this
Should Be Equal As Integers ${ans} 0 msg=${message}
Upvotes: 1