Commit 5a1c1faa1a1d09498e1015ab791d49686ce84801
1 parent
f8ca5b1c
Add 2 new keywords for broker property retrieval
Showing
1 changed file
with
21 additions
and
0 deletions
... | ... | @@ -47,6 +47,27 @@ Set Suite Variable With Default Value |
47 | 47 | \ Run Keyword If '${status}' == 'True' Завантажуємо бібліотеку з реалізацією ${BROKERS['${USERS.users['${username}'].broker}'].keywords_file} майданчики |
48 | 48 | \ Run Keyword If '${status}' == 'True' Викликати для учасника ${username} Підготувати клієнт для користувача |
49 | 49 | |
50 | +Get Broker Property | |
51 | + [Arguments] ${broker_name} ${property} | |
52 | + [Documentation] | |
53 | + ... This keyword returns a property of specified broker | |
54 | + ... if that property exists, otherwise, it returns a | |
55 | + ... default value. | |
56 | + ${status}= Run Keyword And Return Status Should Contain ${BROKERS['${broker_name}']} ${property} | |
57 | + Return From Keyword If ${status} ${BROKERS['${broker_name}'].${property}} | |
58 | + # If broker doesn't have that property, fall back to default value | |
59 | + Should Contain ${BROKERS['Default']} ${property} | |
60 | + [return] ${BROKERS['Default'].${property}} | |
61 | + | |
62 | +Get Broker Property By Username | |
63 | + [Documentation] | |
64 | + ... This keyword gets the corresponding broker name | |
65 | + ... for a specified username and then calls | |
66 | + ... "Get Broker Property" | |
67 | + [Arguments] ${username} ${property} | |
68 | + ${broker_name}= Get Variable Value ${USERS.users['${username}'].broker} | |
69 | + Run Keyword And Return Get Broker Property ${broker_name} ${property} | |
70 | + | |
50 | 71 | Підготовка початкових даних |
51 | 72 | @{QUESTIONS} = Create list |
52 | 73 | ${question}= test question data | ... | ... |
Please
register
or
login
to post a comment