robot --variable VARIABLE:value
*** Settings ***
*** Test Cases *** | |
Scalar examples | |
VAR ${simple} variable | |
VAR ${equals} = this works too | |
VAR ${variable} value contains ${simple} | |
VAR ${sentence} This is a bit longer variable value | |
... that is split into multiple rows. | |
... These parts are joined with a space. | |
VAR ${multiline} This is another longer value. | |
... This time there is a custom separator. |
*** Test Cases *** | |
Examples With Timer String | |
[Documentation] Examples of timer format | |
Should Video Duration Equal 01:05:45 ${video_file_path} | |
Should Ads Inserted from=15:05 to=16:50 ${video_file_path} | |
Sleep 01:00 # 1min pause | |
Should Video Color Start at=01:16:50.005 color=green ${video_file_path} | |
Should Video Color End at=01:17:01.102 color=green ${video_file_path} |
*** Variables *** | |
${TIME_1} 1 min 30 secs | |
${TIME_2} 1.5 minutes | |
${TIME_3} 90 s | |
${TIME_4} 1 day 2 hours 3 minutes 4 seconds 5 milliseconds | |
${TIME_5} 1d 2h 3m 4s 5ms | |
${TIME_6} - 10 seconds |
*** Settings *** | |
Library DateTime | |
Library Browser | |
*** Test Cases *** | |
Examples With Date | |
[Documentation] Examples of date format | |
${date}= Convert Date 1985-08-05 09:01:30 | |
${date}= Convert Date 19850805 090130 |
*** Keywords *** | |
Should Be Almost Equal | |
[Documentation] Check whether two given values are almost equal or not. | |
[Arguments] ${expected} ${actual} ${delta} | |
Should Be True abs(${expected} - ${actual}) < ${delta} |