robotframework - 基础关键词

robotframework基础关键词以下:python

一、可在python、notepad++ 编辑:dom

*** Settings ***

*** Test Cases ***
variable
${a} Set variable Hello World
log ${a}

list
${abc} Create list a b c
log ${abc}

catenate
${hi} Catenate Hello World
log ${hi}

if
${a} Set variable 91
run keyword if ${a}>=90 log 优秀
... ELSE IF ${a}>=70 log 良好
... ELSE IF ${a}>=60 log 及格
... ELSE log 不及格

for
:FOR ${a} IN RANGE 10
\ log ${a}

Evaluate
${a} Evaluate random.randint(1000,9999) random
log ${a}

time
${t} Evaluate time.ctime() time
log ${t}

time1
${t} get time
log ${t}
sleep 5
${t} get time
log ${t}

二、可在ride.py 中编辑 --->先添加project --测试 suite -- 测试 case

 

三、可用bat打开ride.py. --- 》任意取名,如个人是RIDE.bat -->在里面输入 ride.py 

 

四、运行RIDE批处理文件ide

相关文章
相关标签/搜索