2013/6/4 Guy Kisel <
guy....@gmail.com>:
> I'm not sure I understand what you're saying.
Sorry for not being more clear. Had burnt too much midnight oil when replying.
> Is the problem that the msg
> argument has a default value in the keyword definition, or is the problem
> that I'm calling it with the named argument syntax in my test case? If it's
> the latter, then you're right, this is my problem and I can fix it easily. I
> think it was just written that way for clarity.
I meant the latter problem. If I understood your example correctly,
the message ended up being literal `msg=Share access validation
failed!`, including the `msg=` prefix. That's because prior to 2.8
named argument syntax was only used with the last arguments, and using
`name=value` syntax anywhere else had no special meaning. This lead to
somewhat strange behavior, and thus we decided make the rules of
parsing named arguments stricter in 2.8 while enhancing named argument
syntax in general. Possible fixes to your problem include:
1) Remove the offending prefix. You'll get just '`Share access
validation failed!` message which is likely what you wanted in the
beginning.
2) If you want to keep the prefix, even though it is added to the
message, escape it like `msg\=Share access validation failed!`.
3) Alternatively you could use a prefix that doesn't match arguments
you use, for example `message=Share access validation failed!`..
The problem Kevin reported isn't actually exactly the same as this
problem. In his case the keyword that was executed inside Run Keyword
expected an argument in format `name=something` and named argument
syntax was not supposed to be used at all. This failed because Run
Keyword itself has an argument named `name`, and thus using
`name=anything` was considered to be named argument usage. There are
two possibilities how to fix this:
1) Escape the syntax like `name\=something`. Can be a bit annoying.
2) We change Run Keyword variants so that they don't support named
argument syntax themselves. This means that you cannot use `| Run
Keyword | name=No Operation |`, but that isn't a big loss (and it
didn't work in 2.7 either). I'm stating to feel this is a good idea to
do before the final release.
Cheers,
.peke