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 |
要取消選擇的選項的索引範圍。例子:
|
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 |
要取消選擇的選項的索引範圍。例子:
|
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 |
|
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 |
|
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 |
|
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 |
|
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: 如果沒有出現預期的選項之一。