Commit 1b2c6b69b7174bb748eef281d8c7a0b33a604c2f
1 parent
e9e43121
Simplify keyword for expected failure
Backward compatibility was not saved - `Викликати для учасника` with `shouldfail` argument should be replaced with `Require Failure`.
Showing
1 changed file
with
8 additions
and
5 deletions
@@ -311,15 +311,18 @@ Normal | @@ -311,15 +311,18 @@ Normal | ||
311 | Run Keyword And Return ${keywords_file}.${command} ${username} @{arguments} | 311 | Run Keyword And Return ${keywords_file}.${command} ${username} @{arguments} |
312 | 312 | ||
313 | 313 | ||
314 | -SwitchState | 314 | +Require Failure |
315 | [Arguments] ${username} ${command} @{arguments} | 315 | [Arguments] ${username} ${command} @{arguments} |
316 | + [Documentation] | ||
317 | + ... Sometimes we need to make sure that the given keyword fails. | ||
318 | + ... | ||
319 | + ... This keyword works just like `Run As`, but it passes only | ||
320 | + ... if ``command`` with ``arguments`` fails and vice versa. | ||
316 | Log ${username} | 321 | Log ${username} |
317 | Log ${command} | 322 | Log ${command} |
318 | - Log Many @{arguments} | ||
319 | - Remove From List ${arguments} 0 | ||
320 | - Log Many @{arguments} | 323 | + Log Many ${command} @{arguments} |
321 | ${keywords_file}= Get Broker Property By Username ${username} keywords_file | 324 | ${keywords_file}= Get Broker Property By Username ${username} keywords_file |
322 | - ${status} ${value}= run_keyword_and_ignore_keyword_definitions ${keywords_file}.${command} ${username} @{arguments} | 325 | + ${status} ${value}= Run keyword and ignore keyword definitions ${keywords_file}.${command} ${username} @{arguments} |
323 | Run keyword if '${status}' == 'PASS' Fail Користувач ${username} зміг виконати "${command}" | 326 | Run keyword if '${status}' == 'PASS' Fail Користувач ${username} зміг виконати "${command}" |
324 | [return] ${value} | 327 | [return] ${value} |
325 | 328 |
Please
register
or
login
to post a comment