robot framework系列學(xué)習(xí)筆記-基礎(chǔ)關(guān)鍵字

Builtin庫是Robot Framework自帶的基礎(chǔ)庫,提供了一套基礎(chǔ)的關(guān)鍵字.本節(jié)介紹的大多關(guān)鍵字都由該庫提供.

  • log就是"print"
  • 定義變量
    通過set variable關(guān)鍵字來定義變量,例如:
    *** Test Cases ***
    test case1
    {a} Set Variable python log{a}
  • 連接對(duì)象
    Catenate關(guān)鍵字可以連接多個(gè)對(duì)象
    *** Test Cases ***
    test case2
    {hi} Catenate hello world log{hi}
  • 定義列表
    如果通過"@{}"去定義列表的話,可以通過"log many"關(guān)鍵字進(jìn)行打印
    *** Test Cases ***
    test case3
    @{abc} Create List a b c
    log many @{abc}
  • 時(shí)間操作
  • 1.get time關(guān)鍵字用來獲取當(dāng)前時(shí)間
    *** Test Cases ***
    test case4
    {t} get time log{t}
  • 2.sleep關(guān)鍵字用來設(shè)置休眠一定時(shí)間
    *** Test Cases ***
    test case5
    {t} get time sleep 5{t} get time
最后編輯于
?著作權(quán)歸作者所有,轉(zhuǎn)載或內(nèi)容合作請(qǐng)聯(lián)系作者
【社區(qū)內(nèi)容提示】社區(qū)部分內(nèi)容疑似由AI輔助生成,瀏覽時(shí)請(qǐng)結(jié)合常識(shí)與多方信息審慎甄別。
平臺(tái)聲明:文章內(nèi)容(如有圖片或視頻亦包括在內(nèi))由作者上傳并發(fā)布,文章內(nèi)容僅代表作者本人觀點(diǎn),簡書系信息發(fā)布平臺(tái),僅提供信息存儲(chǔ)服務(wù)。

友情鏈接更多精彩內(nèi)容