Robotframework布尔运算

与或非运算

    ${a}    set variable    True
    ${b}    set variable    False
    ${c}    evaluate    ${a} | ${b}
    log    ${c}
    ${d}    evaluate    ${a} & ${b}
    log    ${d}
    ${e}    evaluate    not ${a}
    log    ${e}

输出结果为:

Starting test: GF-Global UI.L1-案例库-01-布尔运算.booltest
20180802 13:27:53.123 :  INFO : ${a} = True
20180802 13:27:53.124 :  INFO : ${b} = False
20180802 13:27:53.126 :  INFO : ${c} = True
20180802 13:27:53.127 :  INFO : True
20180802 13:27:53.129 :  INFO : ${d} = False
20180802 13:27:53.131 :  INFO : False
20180802 13:27:53.132 :  INFO : ${e} = False
20180802 13:27:53.134 :  INFO : False
Ending test:   GF-Global UI.L1-案例库-01-布尔运算.booltest

猜你喜欢

转载自blog.csdn.net/DaxiaLeeSuper/article/details/81016406