Commit 1b2c6b69b7174bb748eef281d8c7a0b33a604c2f

Authored by selurvedu
1 parent e9e43121

Simplify keyword for expected failure

Backward compatibility was not saved - `Викликати для учасника`
with `shouldfail` argument should be replaced with `Require Failure`.
... ... @@ -311,15 +311,18 @@ Normal
311 311 Run Keyword And Return ${keywords_file}.${command} ${username} @{arguments}
312 312
313 313
314   -SwitchState
  314 +Require Failure
315 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 321 Log ${username}
317 322 Log ${command}
318   - Log Many @{arguments}
319   - Remove From List ${arguments} 0
320   - Log Many @{arguments}
  323 + Log Many ${command} @{arguments}
321 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 326 Run keyword if '${status}' == 'PASS' Fail Користувач ${username} зміг виконати "${command}"
324 327 [return] ${value}
325 328
... ...
Please register or login to post a comment