Commit ec7b17ee696fc9ba2f201a821ec9202368c61a37
1 parent
565e9c79
Use "Run Keyword And Return" in keywords.robot
Plus some minor changes in formatting.
Showing
1 changed file
with
10 additions
and
12 deletions
| ... | ... | @@ -147,21 +147,19 @@ Set Suite Variable With Default Value |
| 147 | 147 | ... this keyword takes "shouldfail" argument as first one in @{arguments} |
| 148 | 148 | ... and switches the behaviour of keyword and "shouldfail" |
| 149 | 149 | [Arguments] ${username} ${command} @{arguments} |
| 150 | - log ${username} | |
| 151 | - log ${command} | |
| 152 | - log ${arguments} | |
| 153 | - ${state}= change_state ${arguments} | |
| 154 | - ${value}= Run keyword if '${state}' == 'shouldfail' SwitchState ${username} ${command} @{arguments} | |
| 155 | - ${value}= Run keyword if '${state}' == 'pass' Normal ${username} ${command} @{arguments} | |
| 156 | - [return] ${value} | |
| 150 | + Log ${username} | |
| 151 | + Log ${command} | |
| 152 | + Log ${arguments} | |
| 153 | + ${state}= change_state ${arguments} | |
| 154 | + Run Keyword And Return If '${state}' == 'shouldfail' SwitchState ${username} ${command} @{arguments} | |
| 155 | + Run Keyword And Return If '${state}' == 'pass' Normal ${username} ${command} @{arguments} | |
| 157 | 156 | |
| 158 | 157 | Normal |
| 159 | 158 | [Arguments] ${username} ${command} @{arguments} |
| 160 | - log ${username} | |
| 161 | - log ${command} | |
| 162 | - log ${arguments} | |
| 163 | - ${value}= Run Keyword ${BROKERS['${USERS.users['${username}'].broker}'].keywords_file}.${command} ${username} @{arguments} | |
| 164 | - [return] ${value} | |
| 159 | + Log ${username} | |
| 160 | + Log ${command} | |
| 161 | + Log ${arguments} | |
| 162 | + Run Keyword And Return ${BROKERS['${USERS.users['${username}'].broker}'].keywords_file}.${command} ${username} @{arguments} | |
| 165 | 163 | |
| 166 | 164 | SwitchState |
| 167 | 165 | [Arguments] ${username} ${command} @{arguments} | ... | ... |
Please
register
or
login
to post a comment