变量的值与判断的结果有关,使用Set Variable If

1.有时候变量的值在赋值时,会依据情况来赋值。这个时候就要用到:Set Variable If

${result} BuiltIn.Set Variable 10

${my_result}= BuiltIn.Set Variable If ${result}>100 视频播放失败 视频播放成功

BuiltIn.Should Be Equal 视频播放成功 ${my_result}

原文地址:https://www.cnblogs.com/1234abcdttttjy001/p/10642384.html