一、特殊变量运算:
执行结果:
Starting test: Robot Demo.Demo.test
20161115 10:14:49.949 : INFO :
数字变量运算=82016111510:14:49.950:INFO:
{布尔类型true运算} = 4
20161115 10:14:49.951 : INFO :
布尔类型false运算=02016111510:14:49.952:INFO:
{space运算} =
Ending test: Robot Demo.Demo.test
二、Evaluate使用
函数释义:Evaluate是执行python表达式,并返回执行结果
示例1:
执行结果:
Starting test: Robot Demo.Demo.test4-2
20161115 10:32:08.674 : INFO :
var1=42016111510:32:08.675:INFO:
{var2} = 8
20161115 10:32:08.677 : INFO :
var1+var2=122016111510:32:08.678:INFO:
{var1-var2} = -4
20161115 10:32:08.679 : INFO :
var1∗var2=322016111510:32:08.680:INFO:
{var1/var2} = 0
Ending test: Robot Demo.Demo.test4-2
示例2:
执行结果:
Starting test: Robot Demo.Demo.Python表达式运算
20161115 11:16:42.100 : INFO :
result=3.142016111511:16:42.101:INFO:
{status} = True
20161115 11:16:42.102 : INFO :
向下取整=32016111511:16:42.103:INFO:
{向上取整} = 4.0
Ending test: Robot Demo.Demo.Python表达式运算