You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Keywords defined so that they contain embedded arguments can currently be used also as normal keywords so that the ${arg} part is just considered literal text. For example, these example pass:
*** Test Cases ***Example without normal arguments
Example ${keyword} w/o arguments
Example with normal arguments
Example ${keyword} w/ arguments first second
*** Keywords ***Example ${keyword} w/o arguments
No operation
Example ${keyword} w/ arguments[Arguments]${arg1}${arg2}
Log Many ${arg1}${arg2}
If I remember correctly, the reason for this behavior was backwards compatibility. When embedded arguments functionality was introduced (#370), we didn't want to accidentally break anybody's keywords that just happened to contain ${foo} in their name.
We were recently reported an issue that was caused by this confusing behavior. It would be much simpler if keywords containing embedded arguments could only be used one way. In practice that would mean that the first example above would fail at execution time because ${keyword} variable is not defined in test case level. The second example should fail because it would be an error to create a keyword with both embedded arguments and normal arguments.
This change will also affect newly added functionality to create library keywords with embedded arguments (#1818). There trying to create a keyword with embedded arguments not matching actual function argument count should fail.
The text was updated successfully, but these errors were encountered:
Keywords defined so that they contain embedded arguments can currently be used also as normal keywords so that the
${arg}
part is just considered literal text. For example, these example pass:If I remember correctly, the reason for this behavior was backwards compatibility. When embedded arguments functionality was introduced (#370), we didn't want to accidentally break anybody's keywords that just happened to contain
${foo}
in their name.We were recently reported an issue that was caused by this confusing behavior. It would be much simpler if keywords containing embedded arguments could only be used one way. In practice that would mean that the first example above would fail at execution time because
${keyword}
variable is not defined in test case level. The second example should fail because it would be an error to create a keyword with both embedded arguments and normal arguments.This change will also affect newly added functionality to create library keywords with embedded arguments (#1818). There trying to create a keyword with embedded arguments not matching actual function argument count should fail.
The text was updated successfully, but these errors were encountered: