2 Documentation This Resource contains list of Keywords Set_Variable_If_At_Least*, Set_Variable_If_At_Most,
3 ... Run_Keyword_If_At_Least*, Run_Keyword_If_At_Most*,
4 ... Run_Keyword_If_More_Than*, Run_Keyword_If_Less_Than*,
5 ... for comparison ${ODL_STREAM} to the given ${lower_bound},
6 ... in order to replace ad-hoc conditional execution in suites.
11 &{Stream_dict} hydrogen=${1} stable-helium=${2} stable-lithium=${3} beryllium=${4} boron=${5} carbon=${6} nitrogen=${7}
15 Set_Variable_If_At_Least
16 [Arguments] ${lower_bound} ${value_if_true} ${value_if_false}
17 [Documentation] Compare ${lower_bound} to ${ODL_STREAM} and return ${value_if_true} if ${ODL_STREAM} is at least ${lower_bound},
18 ... return ${value_if_false} otherwise.
19 BuiltIn.Run_Keyword_And_Return BuiltIn.Set_Variable_If &{Stream_dict}[${ODL_STREAM}] >= &{Stream_dict}[${lower_bound}] ${value_if_true} ${value_if_false}
21 Set_Variable_If_At_Most
22 [Arguments] ${upper_bound} ${value_if_true} ${value_if_false}
23 [Documentation] Compare ${upper_bound} to ${ODL_STREAM} and return ${value_if_true} if ${ODL_STREAM} is at most ${upper_bound},
24 ... return ${value_if_false} otherwise.
25 BuiltIn.Run_Keyword_And_Return BuiltIn.Set_Variable_If &{Stream_dict}[${ODL_STREAM}] <= &{Stream_dict}[${upper_bound}] ${value_if_true} ${value_if_false}
27 Set_Variable_If_At_Least_Helium
28 [Arguments] ${value_if_true} ${value_if_false}
29 [Documentation] Compare stable-helium to ${ODL_STREAM} and return ${value_if_true} if ${ODL_STREAM} is at least stable-helium,
30 ... return ${value_if_false} otherwise.
31 BuiltIn.Run_Keyword_And_Return Set_Variable_If_At_Least stable-helium ${value_if_true} ${value_if_false}
33 Set_Variable_If_At_Least_Lithium
34 [Arguments] ${value_if_true} ${value_if_false}
35 [Documentation] Compare stable-lithium to ${ODL_STREAM} and return ${value_if_true} if ${ODL_STREAM} is at least stable-lithium,
36 ... return ${value_if_false} otherwise.
37 BuiltIn.Run_Keyword_And_Return Set_Variable_If_At_Least stable-lithium ${value_if_true} ${value_if_false}
39 Set_Variable_If_At_Least_Beryllium
40 [Arguments] ${value_if_true} ${value_if_false}
41 [Documentation] Compare beryllium to ${ODL_STREAM} and return ${value_if_true} if ${ODL_STREAM} is at least beryllium,
42 ... return ${value_if_false} otherwise.
43 BuiltIn.Run_Keyword_And_Return Set_Variable_If_At_Least beryllium ${value_if_true} ${value_if_false}
45 Set_Variable_If_At_Least_Boron
46 [Arguments] ${value_if_true} ${value_if_false}
47 [Documentation] Compare boron to ${ODL_STREAM} and return ${value_if_true} if ${ODL_STREAM} is at least boron,
48 ... return ${value_if_false} otherwise.
49 BuiltIn.Run_Keyword_And_Return Set_Variable_If_At_Least boron ${value_if_true} ${value_if_false}
51 Set_Variable_If_At_Least_Carbon
52 [Arguments] ${value_if_true} ${value_if_false}
53 [Documentation] Compare carbon to ${ODL_STREAM} and return ${value_if_true} if ${ODL_STREAM} is at least carbon,
54 ... return ${value_if_false} otherwise.
55 BuiltIn.Run_Keyword_And_Return Set_Variable_If_At_Least carbon ${value_if_true} ${value_if_false}
57 Set_Variable_If_At_Least_Nitrogen
58 [Arguments] ${value_if_true} ${value_if_false}
59 [Documentation] Compare nitrogen to ${ODL_STREAM} and return ${value_if_true} if ${ODL_STREAM} is at least nitrogen,
60 ... return ${value_if_false} otherwise.
61 BuiltIn.Run_Keyword_And_Return Set_Variable_If_At_Least nitrogen ${value_if_true} ${value_if_false}
63 Set_Variable_If_At_Most_Helium
64 [Arguments] ${value_if_true} ${value_if_false}
65 [Documentation] Compare stable-helium to ${ODL_STREAM} and return ${value_if_true} if ${ODL_STREAM} is at most stable-helium,
66 ... return ${value_if_false} otherwise.
67 BuiltIn.Run_Keyword_And_Return Set_Variable_If_At_Most stable-helium ${value_if_true} ${value_if_false}
69 Set_Variable_If_At_Most_Lithium
70 [Arguments] ${value_if_true} ${value_if_false}
71 [Documentation] Compare stable-lithium to ${ODL_STREAM} and return ${value_if_true} if ${ODL_STREAM} is at most stable-lithium,
72 ... return ${value_if_false} otherwise.
73 BuiltIn.Run_Keyword_And_Return Set_Variable_If_At_Most stable-lithium ${value_if_true} ${value_if_false}
75 Set_Variable_If_At_Most_Beryllium
76 [Arguments] ${value_if_true} ${value_if_false}
77 [Documentation] Compare beryllium to ${ODL_STREAM} and return ${value_if_true} if ${ODL_STREAM} is at most beryllium,
78 ... return ${value_if_false} otherwise.
79 BuiltIn.Run_Keyword_And_Return Set_Variable_If_At_Most beryllium ${value_if_true} ${value_if_false}
81 Set_Variable_If_At_Most_Boron
82 [Arguments] ${value_if_true} ${value_if_false}
83 [Documentation] Compare boron to ${ODL_STREAM} and return ${value_if_true} if ${ODL_STREAM} is at most boron,
84 ... return ${value_if_false} otherwise.
85 BuiltIn.Run_Keyword_And_Return Set_Variable_If_At_Most boron ${value_if_true} ${value_if_false}
87 Set_Variable_If_At_Most_Carbon
88 [Arguments] ${value_if_true} ${value_if_false}
89 [Documentation] Compare carbon to ${ODL_STREAM} and return ${value_if_true} if ${ODL_STREAM} is at most carbon,
90 ... return ${value_if_false} otherwise.
91 BuiltIn.Run_Keyword_And_Return Set_Variable_If_At_Most carbon ${value_if_true} ${value_if_false}
93 Set_Variable_If_At_Most_Nitrogen
94 [Arguments] ${value_if_true} ${value_if_false}
95 [Documentation] Compare nitrogen to ${ODL_STREAM} and return ${value_if_true} if ${ODL_STREAM} is at most nitrogen,
96 ... return ${value_if_false} otherwise.
97 BuiltIn.Run_Keyword_And_Return Set_Variable_If_At_Most nitrogen ${value_if_true} ${value_if_false}
99 CompareStream__Convert_Input
100 [Arguments] @{arguments}
101 [Documentation] Splits arguments into args and kwargs is used in Run_Keyword_If_At_Least_Else and Run_Keyword_If_At_Most_Else.
102 ... The problem is, when the string contains =, but it is not a named argument (name=value). There can be many values containing =, but
103 ... for sure it is present in xmls. If the string starts with "<" it will be treated as it is xml and splitting for
104 ... name and value will not be executed.
105 ... If named argument is passed into this kw, only string data are supported e.g. name=string. Complex variables such as lists or dictionaries
106 ... are not supported.
107 ${args} BuiltIn.Create_List
108 ${kwargs} BuiltIn.Create_Dictionary
109 : FOR ${arg} IN @{arguments}
110 \ ${arg} BuiltIn.Convert_To_String ${arg}
111 \ ${removed} String.Remove_String ${arg} \n ${Space} \t
113 \ ${splitted} BuiltIn.Run_Keyword_If "${removed[0]}" == "<" BuiltIn.Create List ${arg}
114 \ ... ELSE String.Split_String ${arg} separator== max_split=1
115 \ ${len} BuiltIn.Get_Length ${splitted}
116 \ Run Keyword If ${len}==1 Collections.Append_To_List ${args} @{splitted}[0]
117 \ ... ELSE Collections.Set_To_Dictionary ${kwargs} @{splitted}
118 BuiltIn.Return_From_Keyword ${args} ${kwargs}
120 Run_Keyword_If_At_Least
121 [Arguments] ${lower_bound} ${kw_name} @{varargs} &{kwargs}
122 [Documentation] Compare ${lower_bound} to ${ODL_STREAM} and in case ${ODL_STREAM} is at least ${lower_bound},
123 ... run ${kw_name} @{varargs} &{kwargs} and return its value.
124 BuiltIn.Run_Keyword_And_Return_If &{Stream_dict}[${ODL_STREAM}] >= &{Stream_dict}[${lower_bound}] ${kw_name} @{varargs} &{kwargs}
126 Run_Keyword_If_At_Least_Else
127 [Arguments] ${lower_bound} @{varargs}
128 [Documentation] Compare ${lower_bound} to ${ODL_STREAM} and in case ${ODL_STREAM} is at least ${lower_bound},
129 ... run keyword defined before ELSE statement otherwise run keyword defined after ELSE statement and return its value.
130 ${position} Collections.Get_Index_From_List ${varargs} \ELSE
131 BuiltIn.Run_Keyword_If "${position}" == "-1" BuiltIn.Fail Missing else statement in defined expresion
132 ${varargs_if} Collections.Get_Slice_From_List ${varargs} 0 ${position}
133 ${varargs_else} Collections.Get_Slice_From_List ${varargs} ${position+1}
134 ${args_if} ${kwargs_if} CompareStream__Convert_Input @{varargs_if}
135 ${args_else} ${kwargs_else} CompareStream__Convert_Input @{varargs_else}
136 ${resp} BuiltIn.Run_Keyword_If &{Stream_dict}[${ODL_STREAM}] >= &{Stream_dict}[${lower_bound}] @{args_if} &{kwargs_if}
137 ... ELSE @{args_else} &{kwargs_else}
140 Run_Keyword_If_At_Most
141 [Arguments] ${upper_bound} ${kw_name} @{varargs} &{kwargs}
142 [Documentation] Compare ${upper_bound} to ${ODL_STREAM} and in case ${ODL_STREAM} is at most ${upper_bound},
143 ... run ${kw_name} @{varargs} &{kwargs} and return its value.
144 BuiltIn.Run_Keyword_And_Return_If &{Stream_dict}[${ODL_STREAM}] <= &{Stream_dict}[${upper_bound}] ${kw_name} @{varargs} &{kwargs}
146 Run_Keyword_If_At_Most_Else
147 [Arguments] ${upper_bound} @{varargs}
148 [Documentation] Compare ${upper_bound} to ${ODL_STREAM} and in case ${ODL_STREAM} is at most ${upper_bound},
149 ... run keyword defined before ELSE statement otherwise run keyword defined after ELSE statement and return its value.
150 ${position} Collections.Get_Index_From_List ${varargs} \ELSE
151 BuiltIn.Run_Keyword_If "${position}" == "-1" BuiltIn.Fail Missing else statement in defined expresion
152 ${varargs_if} Collections.Get_Slice_From_List ${varargs} 0 ${position}
153 ${varargs_else} Collections.Get_Slice_From_List ${varargs} ${position+1}
154 ${args_if} ${kwargs_if} CompareStream__Convert_Input @{varargs_if}
155 ${args_else} ${kwargs_else} CompareStream__Convert_Input @{varargs_else}
156 ${resp} BuiltIn.Run_Keyword_If &{Stream_dict}[${ODL_STREAM}] >= &{Stream_dict}[${lower_bound}] @{args_if} &{kwargs_if}
157 ... ELSE @{args_else} &{kwargs_else}
160 Run_Keyword_If_More_Than
161 [Arguments] ${lower_bound} ${kw_name} @{varargs} &{kwargs}
162 [Documentation] Compare ${lower_bound} to ${ODL_STREAM} and in case ${ODL_STREAM} is more than ${lower_bound},
163 ... run ${kw_name} @{varargs} &{kwargs} and return its value.
164 BuiltIn.Run_Keyword_And_Return_If &{Stream_dict}[${ODL_STREAM}] > &{Stream_dict}[${lower_bound}] ${kw_name} @{varargs} &{kwargs}
166 Run_Keyword_If_Equals
167 [Arguments] ${stream} ${kw_name} @{varargs} &{kwargs}
168 [Documentation] Compare ${stream} to ${ODL_STREAM} and in case ${ODL_STREAM} equals ${stream},
169 ... run ${kw_name} @{varargs} &{kwargs} and return its value.
170 BuiltIn.Run_Keyword_And_Return_If &{Stream_dict}[${ODL_STREAM}] == &{Stream_dict}[${stream}] ${kw_name} @{varargs} &{kwargs}
172 Run_Keyword_If_Less_Than
173 [Arguments] ${lower_bound} ${kw_name} @{varargs} &{kwargs}
174 [Documentation] Compare ${lower_bound} to ${ODL_STREAM} and in case ${ODL_STREAM} is less than ${lower_bound},
175 ... run ${kw_name} @{varargs} &{kwargs} and return its value.
176 BuiltIn.Run_Keyword_And_Return_If &{Stream_dict}[${ODL_STREAM}] < &{Stream_dict}[${lower_bound}] ${kw_name} @{varargs} &{kwargs}
178 Run_Keyword_If_At_Least_Helium
179 [Arguments] ${kw_name} @{varargs} &{kwargs}
180 [Documentation] Compare stable-helium to ${ODL_STREAM} and in case ${ODL_STREAM} is at least stable-helium,
181 ... run ${kw_name} @{varargs} &{kwargs} and return its value
182 BuiltIn.Run_Keyword_And_Return Run_Keyword_If_At_Least stable-helium ${kw_name} @{varargs} &{kwargs}
184 Run_Keyword_If_At_Least_Lithium
185 [Arguments] ${kw_name} @{varargs} &{kwargs}
186 [Documentation] Compare stable-lithium to ${ODL_STREAM} and in case ${ODL_STREAM} is at least stable-lithium,
187 ... run ${kw_name} @{varargs} &{kwargs} and return its value.
188 BuiltIn.Run_Keyword_And_Return Run_Keyword_If_At_Least stable-lithium ${kw_name} @{varargs} &{kwargs}
190 Run_Keyword_If_At_Least_Beryllium
191 [Arguments] ${kw_name} @{varargs} &{kwargs}
192 [Documentation] Compare beryllium to ${ODL_STREAM} and in case ${ODL_STREAM} is at least beryllium,
193 ... run ${kw_name} @{varargs} &{kwargs} and return its value
194 BuiltIn.Run_Keyword_And_Return Run_Keyword_If_At_Least beryllium ${kw_name} @{varargs} &{kwargs}
196 Run_Keyword_If_At_Least_Boron
197 [Arguments] ${kw_name} @{varargs} &{kwargs}
198 [Documentation] Compare boron to ${ODL_STREAM} and in case ${ODL_STREAM} is at least boron,
199 ... run ${kw_name} @{varargs} &{kwargs} and return its value
200 BuiltIn.Run_Keyword_And_Return Run_Keyword_If_At_Least boron ${kw_name} @{varargs} &{kwargs}
202 Run_Keyword_If_At_Least_Carbon
203 [Arguments] ${kw_name} @{varargs} &{kwargs}
204 [Documentation] Compare carbon to ${ODL_STREAM} and in case ${ODL_STREAM} is at least carbon,
205 ... run ${kw_name} @{varargs} &{kwargs} and return its value.
206 BuiltIn.Run_Keyword_And_Return Run_Keyword_If_At_Least carbon ${kw_name} @{varargs} &{kwargs}
208 Run_Keyword_If_At_Least_Nitrogen
209 [Arguments] ${kw_name} @{varargs} &{kwargs}
210 [Documentation] Compare nitrogen to ${ODL_STREAM} and in case ${ODL_STREAM} is at least nitrogen,
211 ... run ${kw_name} @{varargs} &{kwargs} and return its value.
212 BuiltIn.Run_Keyword_And_Return Run_Keyword_If_At_Least nitrogen ${kw_name} @{varargs} &{kwargs}
214 Run_Keyword_If_At_Most_Helium
215 [Arguments] ${kw_name} @{varargs} &{kwargs}
216 [Documentation] Compare stable-helium to ${ODL_STREAM} and in case ${ODL_STREAM} is at most stable-helium,
217 ... run ${kw_name} @{varargs} &{kwargs} and return its value
218 BuiltIn.Run_Keyword_And_Return Run_Keyword_If_At_Most stable-helium ${kw_name} @{varargs} &{kwargs}
220 Run_Keyword_If_At_Most_Lithium
221 [Arguments] ${kw_name} @{varargs} &{kwargs}
222 [Documentation] Compare stable-lithium to ${ODL_STREAM} and in case ${ODL_STREAM} is at most stable-lithium,
223 ... run ${kw_name} @{varargs} &{kwargs} and return its value.
224 BuiltIn.Run_Keyword_And_Return Run_Keyword_If_At_Most stable-lithium ${kw_name} @{varargs} &{kwargs}
226 Run_Keyword_If_At_Most_Beryllium
227 [Arguments] ${kw_name} @{varargs} &{kwargs}
228 [Documentation] Compare beryllium to ${ODL_STREAM} and in case ${ODL_STREAM} is at most beryllium,
229 ... run ${kw_name} @{varargs} &{kwargs} and return its value
230 BuiltIn.Run_Keyword_And_Return Run_Keyword_If_At_Most beryllium ${kw_name} @{varargs} &{kwargs}
232 Run_Keyword_If_At_Most_Boron
233 [Arguments] ${kw_name} @{varargs} &{kwargs}
234 [Documentation] Compare boron to ${ODL_STREAM} and in case ${ODL_STREAM} is at most boron,
235 ... run ${kw_name} @{varargs} &{kwargs} and return its value
236 BuiltIn.Run_Keyword_And_Return Run_Keyword_If_At_Most boron ${kw_name} @{varargs} &{kwargs}
238 Run_Keyword_If_At_Most_Carbon
239 [Arguments] ${kw_name} @{varargs} &{kwargs}
240 [Documentation] Compare carbon to ${ODL_STREAM} and in case ${ODL_STREAM} is at most carbon,
241 ... run ${kw_name} @{varargs} &{kwargs} and return its value.
242 BuiltIn.Run_Keyword_And_Return Run_Keyword_If_At_Most carbon ${kw_name} @{varargs} &{kwargs}
244 Run_Keyword_If_At_Most_Nitrogen
245 [Arguments] ${kw_name} @{varargs} &{kwargs}
246 [Documentation] Compare nitrogen to ${ODL_STREAM} and in case ${ODL_STREAM} is at most nitrogen,
247 ... run ${kw_name} @{varargs} &{kwargs} and return its value.
248 BuiltIn.Run_Keyword_And_Return Run_Keyword_If_At_Most nitrogen ${kw_name} @{varargs} &{kwargs}
250 Run_Keyword_If_More_Than_Helium
251 [Arguments] ${kw_name} @{varargs} &{kwargs}
252 [Documentation] Compare stable-helium to ${ODL_STREAM} and in case ${ODL_STREAM} is more than stable-helium,
253 ... run ${kw_name} @{varargs} &{kwargs} and return its value.
254 BuiltIn.Run_Keyword_And_Return Run_Keyword_If_More_Than stable-helium ${kw_name} @{varargs} &{kwargs}
256 Run_Keyword_If_Less_Than_Helium
257 [Arguments] ${kw_name} @{varargs} &{kwargs}
258 [Documentation] Compare stable-helium to ${ODL_STREAM} and in case ${ODL_STREAM} is less than stable-helium,
259 ... run ${kw_name} @{varargs} &{kwargs} and return its value.
260 BuiltIn.Run_Keyword_And_Return Run_Keyword_If_Less_Than stable-helium ${kw_name} @{varargs} &{kwargs}
262 Run_Keyword_If_More_Than_Lithium
263 [Arguments] ${kw_name} @{varargs} &{kwargs}
264 [Documentation] Compare stable-lithium to ${ODL_STREAM} and in case ${ODL_STREAM} is more than stable-lithium,
265 ... run ${kw_name} @{varargs} &{kwargs} and return its value.
266 BuiltIn.Run_Keyword_And_Return Run_Keyword_If_More_Than stable-lithium ${kw_name} @{varargs} &{kwargs}
268 Run_Keyword_If_Less_Than_Lithium
269 [Arguments] ${kw_name} @{varargs} &{kwargs}
270 [Documentation] Compare stable-lithium to ${ODL_STREAM} and in case ${ODL_STREAM} is less than stable-lithium,
271 ... run ${kw_name} @{varargs} &{kwargs} and return its value.
272 BuiltIn.Run_Keyword_And_Return Run_Keyword_If_Less_Than stable-lithium ${kw_name} @{varargs} &{kwargs}
274 Run_Keyword_If_More_Than_Beryllium
275 [Arguments] ${kw_name} @{varargs} &{kwargs}
276 [Documentation] Compare beryllium to ${ODL_STREAM} and in case ${ODL_STREAM} is more than beryllium,
277 ... run ${kw_name} @{varargs} &{kwargs} and return its value.
278 BuiltIn.Run_Keyword_And_Return Run_Keyword_If_More_Than beryllium ${kw_name} @{varargs} &{kwargs}
280 Run_Keyword_If_Less_Than_Beryllium
281 [Arguments] ${kw_name} @{varargs} &{kwargs}
282 [Documentation] Compare beryllium to ${ODL_STREAM} and in case ${ODL_STREAM} is less than beryllium,
283 ... run ${kw_name} @{varargs} &{kwargs} and return its value.
284 BuiltIn.Run_Keyword_And_Return Run_Keyword_If_Less_Than beryllium ${kw_name} @{varargs} &{kwargs}
286 Run_Keyword_If_More_Than_Boron
287 [Arguments] ${kw_name} @{varargs} &{kwargs}
288 [Documentation] Compare boron to ${ODL_STREAM} and in case ${ODL_STREAM} is more than boron,
289 ... run ${kw_name} @{varargs} &{kwargs} and return its value.
290 BuiltIn.Run_Keyword_And_Return Run_Keyword_If_More_Than boron ${kw_name} @{varargs} &{kwargs}
292 Run_Keyword_If_Less_Than_Boron
293 [Arguments] ${kw_name} @{varargs} &{kwargs}
294 [Documentation] Compare boron to ${ODL_STREAM} and in case ${ODL_STREAM} is less than boron,
295 ... run ${kw_name} @{varargs} &{kwargs} and return its value.
296 BuiltIn.Run_Keyword_And_Return Run_Keyword_If_Less_Than boron ${kw_name} @{varargs} &{kwargs}
298 Run_Keyword_If_More_Than_Carbon
299 [Arguments] ${kw_name} @{varargs} &{kwargs}
300 [Documentation] Compare carbon to ${ODL_STREAM} and in case ${ODL_STREAM} is more than carbon,
301 ... run ${kw_name} @{varargs} &{kwargs} and return its value.
302 BuiltIn.Run_Keyword_And_Return Run_Keyword_If_More_Than carbon ${kw_name} @{varargs} &{kwargs}
304 Run_Keyword_If_Less_Than_Carbon
305 [Arguments] ${kw_name} @{varargs} &{kwargs}
306 [Documentation] Compare carbon to ${ODL_STREAM} and in case ${ODL_STREAM} is less than carbon,
307 ... run ${kw_name} @{varargs} &{kwargs} and return its value.
308 BuiltIn.Run_Keyword_And_Return Run_Keyword_If_Less_Than carbon ${kw_name} @{varargs} &{kwargs}
310 Run_Keyword_If_More_Than_Nitrogen
311 [Arguments] ${kw_name} @{varargs} &{kwargs}
312 [Documentation] Compare nitrogen to ${ODL_STREAM} and in case ${ODL_STREAM} is more than nitrogen,
313 ... run ${kw_name} @{varargs} &{kwargs} and return its value.
314 BuiltIn.Run_Keyword_And_Return Run_Keyword_If_More_Than nitrogen ${kw_name} @{varargs} &{kwargs}
316 Run_Keyword_If_Less_Than_Nitrogen
317 [Arguments] ${kw_name} @{varargs} &{kwargs}
318 [Documentation] Compare nitrogen to ${ODL_STREAM} and in case ${ODL_STREAM} is less than nitrogen,
319 ... run ${kw_name} @{varargs} &{kwargs} and return its value.
320 BuiltIn.Run_Keyword_And_Return Run_Keyword_If_Less_Than nitrogen ${kw_name} @{varargs} &{kwargs}