robot framework 標準庫

Builtin:包含常常須要的關鍵字。自動導入無需import,所以老是可用的less

一、Call Method,調用方法oop

二、Catenate,鏈接給定的字符串,返回拼接後的字符串——Case2測試

  用法:默認使用空格拼接,能夠經過SEPARATOR關鍵字指定拼接符ui

3,Comment,在日誌中顯示信息—spa

4, 變量轉化3d

             使用方法:日誌

                              

4,Create Dictionary,建立並返回一個字典blog

五、Create List,建立並返回一個list字符串

6,Fail,錯誤,給出消息string

7,Fatal Error,中止整個測試執行

遇到Fatal Error,本case後面的語句不執行,且後面的case也都fail

8,Get Count, 返回item1中包含幾個item2

9,Get Length,返回item的長度

res=4

10,  Get Library Instance

11  Get Time

12 ,BuiltIn.Get Variable Value

13,BuiltIn.Get Variables

14  

、Import Library,引入庫

引入庫

15  Import Resource,引入源文件

16 Keyword Should Exist,除非給定的關鍵字存在,否則就報錯

           

                 判斷log關鍵字是否存在

17 Length Should Be,長度應該爲多少

18, Log,打印日誌信息,後面只能接一條message

        Log Many,後面能夠接多條message

        Log To Console,打印到console控制檯

        Log Variables,打印當前環境變量

       

19, 

3一、No Operation

3二、Pass Execution

3三、Pass Execution If

3四、Regexp Escape

3五、Reload Library

3六、Remove Tags

3七、Repeat Keyword

3八、Replace Variables

3九、Return From Keyword

40、Return From Keyword If

4一、Run Keyword

4二、Run Keyword And Continue On Failure

4三、Run Keyword And Expect Error

4四、Run Keyword And Ignore Error

4五、Run Keyword And Return

4六、Run Keyword And Return If

4七、Run Keyword And Return Status

4八、Run Keyword If

4九、Run Keyword If All Critical Tests Passed

50、Run Keyword If All Tests Pased

5一、Run Keyword If Any Critical Tests Failed

5二、Run Keyword If Any Tests Failed

5三、Run Keyword If Test Failed

5四、Run Keyword If Test Passed

5五、Run Keyword If Timeout Occurred

5六、Run Keyword Unless

5七、Run Keyword

5八、Set Global Variable

5九、Set Library Search Order

60、Set Log Level

6一、Set Suite Documentation

6二、Set Suite Metadata

6三、Set Suite Variable

6四、Set Tags

6五、Set Test Documentation

6六、Set Test Message

6七、Set Test Variable

6八、Set Test Variable If

6九、Should Be Empty,應該爲空

70、Should Be Equal,應該等於

7一、Should Be Equal As Integers,應該是一個整型且相等

7二、Should Be Equal As Numbers,應該是一個字符型,且相等

7三、Should Be Equal As Strings,應該是string,且相等

7四、Should Be True,應該爲真

7五、Should Contain,應該包含

7六、Should Contain Any,包含其中一個

7七、Should Contain X Times,包含幾回

7八、Should End With,應該以什麼結尾

7九、Should Match,應該匹配

80、Should Match Regexp,以正則方式匹配

8一、Should Not Be Empty,應該不爲空

8二、Should Not Be Equal

8三、Should Not Be Equal As Integers

8四、Should Not Be Equal As Numbers

8五、Should Not Be Equal As Strings

8六、Should Not Be True

8七、Should Not Contain

8八、Should Not Contain Any

8九、Should Not End With

90、Should Not Match

9一、Should Not Match Regexp

9二、Should Not Start With

9三、Should Start With,應該以什麼開頭

9四、Sleep

sleep 3,單位,秒

 

9五、Variable Should Exist,變量應該存在

9六、Variable Should Not Exist,變量不存在

9七、Wait Until Keyword Succeeds

9八、Continue For Loop

9九、Continue For Loop If

100、Exit For Loop

10一、Exit For Loop If

相關文章
相關標籤/搜索