【Katalon學習Web UI】下拉組合框 操作

Deselect All Option

取消選擇所有選項。

Param Param Type Mandatory Description
to TestObject Required 表示web元素。
flowControl FailureHandling Optional 指定failure handlingschema以確定是否應該允許執行繼續或停止。

 

 Deselect Option By Index

在給定索引處取消選擇該選項。Index從0開始。

Param Param Type Mandatory Description
to TestObject Required  表示web元素。
range Object Required

要取消選擇的選項的索引範圍。例子:

  • 2 - i索引 2 
  • "2,3" -索引2及3
  • "2-5" - 索引2至5 (2,3,4,5)
flowControl FailureHandling Optional Specify failure handlingschema to determine whether the execution should be allowed to continue or stop

 Deselect Option By Label

取消選擇具有給定標籤(顯示文本)的選項。

Param Param Type Mandatory Description
to TestObject Required 表示web元素。
labelText String Required 顯示要取消選擇的選項的文本。
isRegex boolean Required 如果標籤是正則表達式,則爲真,否則爲假
flowControl FailureHandling Optional 指定failure handlingschema以確定是否應該允許執行繼續或停止

 Deselect Option By Value

取消選擇具有給定值的選項。

Param Param Type Mandatory Description
to TestObject Required 表示web元素。
value String Required 要取消選擇的選項的值。
isRegex boolean Required 如果標籤是正則表達式,則爲真,否則爲假
flowControl FailureHandling Optional 指定失敗handlingschema,以確定應該允許執行還是繼續執行

 Get Number Of Selected Option

計算給定web元素所選擇的選項的數量。

Param Param Type Mandatory Description
to TestObject Required 表示web元素。
flowControl FailureHandling Optional 指定failure handlingschema以確定是否應該允許執行繼續或停止。

 返回

Param Type Description
int 輸入所選選項的編號

Get Number Of Total Option

計算給定web元素的選項總數。

Param Param Type Mandatory Description
to TestObject Required 表示web元素。
flowControl FailureHandling Optional 指定failure handlingschema以確定是否應該允許執行繼續或停止。

 返回

Param Type Description
int 選項的總數。

 Select All Option

選擇列表中的所有選項。

Param Param Type Mandatory Description
to TestObject Required 表示web元素。
flowControl FailureHandling Optional 指定failure handlingschema以確定是否應該允許執行繼續或停止。

 Select Option By Index

選擇給定索引中的選項。Index從0開始。

Param Param Type Mandatory Description
to TestObject Required 表示web元素。
range Object Required

要取消選擇的選項的索引範圍。例子:

  • 2 - index 2 
  • "2,3" - index 2 and 3 
  • "2-5" - index 2 to 5 (2,3,4,5)
flowControl FailureHandling Optional 指定failure handlingschema以確定是否應該允許執行繼續或停止

 Select Option By Label

選擇具有給定標籤(顯示文本)的選項。

Param Param Type Mandatory Description
to TestObject Required Represent a web element.
labelText String Required Displayed text of the options to be selected.
isRegex boolean Required true if the label is a regular expression, otherwise false
flowControl FailureHandling Optional Specify failure handlingschema to determine whether the execution should be allowed to continue or stop

 Select Option By Value

選擇具有給定值的選項。

Param Param Type Mandatory Description
to TestObject Required 表示web元素。
value String Required 要選擇的選項的值。
isRegex boolean Required 如果標籤是正則表達式,則爲真,否則爲假
flowControl FailureHandling Optional 指定失敗handlingschema,以確定應該允許執行還是繼續執行

 Verify Option Not Present By Label

驗證具有給定顯示文本的選項是否不存在。

Param Param Type Mandatory Description
to TestObject Required 表示web元素。
label String Required 顯示要驗證的選項的文本(如果不存在)。
isRegex boolean Required 如果標籤是正則表達式,則爲真,默認爲假。
timeout int Required 系統最多等待超時(秒)以返回結果。
flowControl FailureHandling Optional 指定failure handlingschema以確定是否應該允許執行繼續或停止。

 返回

Param Type Description
boolean
  • true:如果不顯示具有給定顯示文本的選項。
  • false: 如果選項具有給定的顯示文本。

 Verify Option Not Present By Value

驗證具有給定值的選項是否不存在。

Param Param Type Mandatory Description
to TestObject Required 表示web元素。
value String Required 要驗證的選項的值(如果不顯示)。
isRegex boolean Required 如果標籤是正則表達式,則爲真,默認爲假。
timeout int Required 系統最多等待超時(秒)以返回結果
flowControl FailureHandling Optional 指定failure handlingschema以確定是否應該允許執行繼續或停止。

 返回

Param Type Description
boolean
  • true:如果給定值的所有選項不存在。

  • false:如果所有具有給定值的選項都存在

 Verify Option Not Selected By Index

驗證給定索引的選項是否沒有被選中

參數

  • to - TestObject (required): 表示web元素
  • range - Object (required): 如果沒有選中要驗證的選項的索引
  • isRegex - boolean (required): 如果標籤是正則表達式,則爲真,默認爲假
  • timeOut - int (required):  系統最多等待超時(秒)返回結果

  • flowControl - FailureHandling (optional): 指定失敗處理模式,以確定是否應該允許執行繼續或停止。更多細節請點擊這裏。

 返回

  • true: 如果沒有選擇給定索引的所有選項
  • false:如果選擇了給定索引的選項

Verify Option Not Selected By Label

驗證是否沒有選中具有給定顯示文本的選項。

Param Param Type Mandatory Description
to TestObject Required 表示web元素。
label String Required 顯示要驗證的選項的文本(如果沒有選中)。
isRegex boolean Required 如果標籤是正則表達式,則爲真,默認爲假。
timeout int Required 系統最多等待超時(秒)以返回結果。
flowControl FailureHandling Optional 指定failure handlingschema以確定是否應該允許執行繼續或停止。

 返回:

Param Type Description
boolean
  • true:如果未選擇具有給定顯示文本的所有選項。
  • false: 如果選擇了具有給定顯示文本的所有選項

 Verify Option Not Selected By Value

驗證是否沒有選擇具有給定值的選項。

Param Param Type Mandatory Description
to TestObject Required 表示web元素。
value String Required 如果沒有選中要驗證的選項的值。
isRegex boolean Required 如果標籤是正則表達式,則爲真,默認爲假。
timeout int Required 系統最多等待超時(秒)以返回結果。
flowControl FailureHandling Optional 指定failure handlingschema以確定是否應該允許執行繼續或停止

返回

Param Type Description
boolean
  • true:如果沒有選擇所有具有給定值的選項。
  • false: 如果選擇所有具有給定值的選項

 Verify Option Present By Label

驗證具有給定顯示文本的選項是否存在。

Param Param Type Mandatory Description
to TestObject 必填 表示web元素。
label String 必填 顯示要驗證的選項的文本(如果存在)。
isRegex boolean 必填 如果標籤是正則表達式,則爲真,默認爲假。
timeout int 必填 系統最多等待超時(秒)以返回結果。
flowControl FailureHandling 選填 指定failure handlingschema以確定是否應該允許執行繼續或停止

返回

  • true: 如果存在具有給定顯示文本的選項。
  • false:如果不顯示具有給定顯示文本的選項

Verify Option Present By Value

驗證具有給定值的選項是否存在。

 返回:

  • true: 如果存在具有給定顯示文本的選項。
  • false: 如果不顯示具有給定顯示文本的選項

Verify Option Selected By Index

驗證是否選擇了給定索引的選項。

參數

  • to - TestObject (required): 表示web元素
  • range - Object (required):要驗證的選項的索引列表
  • timeout - int (requiredl):系統最多等待超時(秒)返回結果
  • flowControl - FailureHandling (optional): 指定失敗處理模式,以確定是否應該允許執行繼續或停止。更多細節請參見此頁:故障處理

返回

  • true:如果選擇具有給定索引的選項
  • false:如果沒有選擇具有給定索引的選項

Verify Option Selected By Label

驗證是否選擇了具有給定顯示文本的選項。

Param Param Type Mandatory Description
to TestObject 必填 表示web元素。
label String 必填 顯示要驗證的選項的文本(如果存在)。
isRegex boolean 必填 如果標籤是正則表達式,則爲真,默認爲假。
timeout int 必填 系統最多等待超時(秒)以返回結果。
flowControl FailureHandling 選填 指定failure handlingschema以確定是否應該允許執行繼續或停止

 返回

  • true: 如果選擇具有給定顯示文本的選項。
  • false: 如果沒有顯示給定文本的選項

Verify Option Selected By Value

驗證是否選擇了具有給定值的選項。

 返回

  • true: 如果選擇具有給定顯示文本的選項。
  • false: 如果沒有顯示給定文本的選項

 Verify Options Present

驗證給定測試對象中是否存在所有預期的選項。

參數

Param Param Type Mandatory Description
to TestObject Required 表示web元素。
expectedOptions List Required 給定web元素的所有預期選項的列表。
flowControl FailureHandling Optional 指定failure handlingschema以確定是否應該允許執行繼續或停止。

返回

  • true: 如果存在所有預期的選項。
  • false: 如果沒有出現預期的選項之一。

 

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章