美文网首页
robot framework系列学习笔记-基础关键字

robot framework系列学习笔记-基础关键字

作者: hello_dong2015 | 来源:发表于2019-08-18 14:07 被阅读0次

Builtin库是Robot Framework自带的基础库,提供了一套基础的关键字.本节介绍的大多关键字都由该库提供.

  • log就是"print"
  • 定义变量
    通过set variable关键字来定义变量,例如:
    *** Test Cases ***
    test case1
    {a} Set Variable python log{a}
  • 连接对象
    Catenate关键字可以连接多个对象
    *** Test Cases ***
    test case2
    {hi} Catenate hello world log{hi}
  • 定义列表
    如果通过"@{}"去定义列表的话,可以通过"log many"关键字进行打印
    *** Test Cases ***
    test case3
    @{abc} Create List a b c
    log many @{abc}
  • 时间操作
  • 1.get time关键字用来获取当前时间
    *** Test Cases ***
    test case4
    {t} get time log{t}
  • 2.sleep关键字用来设置休眠一定时间
    *** Test Cases ***
    test case5
    {t} get time sleep 5{t} get time

相关文章

网友评论

      本文标题:robot framework系列学习笔记-基础关键字

      本文链接:https://www.haomeiwen.com/subject/warrsctx.html