Click
單擊給定的元素。
Param | Param Type | Mandatory | Description |
---|---|---|---|
to | TestObject | Required | 表示web元素。 |
flowControl | FailureHandling | Optional | 指定failure handlingschema以確定是否應該允許執行繼續或停止. |
Click Offset
從元素的左上角單擊具有相對位置(x, y)的給定元素。
Param | Param Type | Mandatory | Description |
---|---|---|---|
to | TestObject | Required | 表示web元素。 |
offsetX | int | Required | x相對於元素的位置 |
offsetY | int | Required | y相對於元素的位置 |
flowControl | FailureHandling | Optional | 指定failure handlingschema以確定是否應該允許執行繼續或停止。 |
Double Click
雙擊給定的元素。
Param | Param Type | Mandatory | Description |
---|---|---|---|
to | TestObject | Required | 表示web元素。 |
flowControl | FailureHandling | Optional | 指定failure handlingschema以確定是否應該允許執行繼續或停止。 |
Drag And Drop By Offset
拖動對象並將其拖放到偏移位置。
Param | Param Type | Mandatory | Description |
---|---|---|---|
sourceObject | TestObject | Required | 源對象。 |
xOffset | int | Required | x 偏移 |
yOffset | int | Required | y 偏移 |
flowControl | FailureHandling | Optional | 指定failure handlingschema以確定是否應該允許執行繼續或停止. |
Drag And Drop To Object
拖動一個對象並將其放到另一個對象上。
Param | Param Type | Mandatory | Description |
---|---|---|---|
sourceObject | TestObject | Required | 源對象。 |
destinationObject | TestObject | Required | 目標對象。 |
flowControl | FailureHandling | Optional | 指定failure handlingschema以確定是否應該允許執行繼續或停止。 |
Focus
將焦點移動到指定的元素;例如輸入字段,將光標移動到該字段。
Param | Param Type | Mandatory | Description |
---|---|---|---|
to | TestObject | Required | 表示web元素。 |
flowControl | FailureHandling | Optional | 指定失敗處理模式,以確定是否應該允許執行繼續或停止。 |
Get All Links On Current Page
獲取當前頁面上的所有鏈接。
Param | Param Type | Mandatory | Description |
---|---|---|---|
isIncludedExternalLinks | boolean | Required | 如果爲假,只針對同一主機上的鏈接。否則,指向所有鏈接。 |
excludedLinks | List | Required | 排除鏈接(url)的列表。 |
flowControl | FailureHandling | Optional | 指定失敗處理模式,以確定是否應該允許執行繼續或停止。 |
Get Attribute
獲取web元素的屬性。
Param | Param Type | Mandatory | Description |
---|---|---|---|
to | TestObject | Required | 表示web元素 |
attribute | String | Required | 屬性名稱 |
flowControl | FailureHandling | Optional | 指定失敗處理模式,以確定是否應該允許執行繼續或停止。 |
返回
Param Type | Description |
---|---|
String | 對象屬性的值 |
Get CSS Value
獲取web元素的CSS值。
Param | Param Type | Mandatory | Description |
---|---|---|---|
to | TestObject | Required | 表示web元素。 |
flowControl | FailureHandling | Optional | 指定失敗處理模式,以確定是否應該允許執行繼續或停止。 |
返回
Param Type | Description |
---|---|
String | web元素的CSS值 |
Get Element Height
獲取web元素的高度。
Param | Param Type | Mandatory | Description |
---|---|---|---|
to | TestObject | Required | 表示web元素。 |
flowControl | FailureHandling | Optional | 指定失敗處理模式,以確定是否應該允許執行繼續或停止。 |
返回
Param Type | Description |
---|---|
int | web元素的高度。 |
Get Element Left Position
獲取web元素的左側位置。
Param | Param Type | Mandatory | Description |
---|---|---|---|
to | TestObject | Required | 表示web元素。 |
flowControl | FailureHandling | Optional | 指定失敗處理模式,以確定是否應該允許執行繼續或停止。 |
返回
Param Type | Description |
---|---|
int | web元素的左位置。 |
Get Element Width
獲取web元素的寬度。
Param | Param Type | Mandatory | Description |
---|---|---|---|
to | TestObject | Required | 表示web元素。 |
flowControl | FailureHandling | Optional | 指定失敗處理模式,以確定是否應該允許執行繼續或停止。 |
返回
Param Type | Description |
---|---|
int | web元素的寬度。 |
Mouse Over
模擬用戶將鼠標懸停在給定的元素上。
Param | Param Type | Mandatory | Description |
---|---|---|---|
to | TestObject | Required | 表示web元素。 |
flowControl | FailureHandling | Optional | 指定失敗處理模式,以確定是否應該允許執行繼續或停止。 |
Mouse Over Offset
模擬用戶將鼠標懸停在給定元素的左上角相對位置(x, y)上。
Param | Param Type | Mandatory | Description |
---|---|---|---|
to | TestObject | Required | 表示web元素。 |
offsetX | int | Required | x相對於元素的位置。 |
offsetY | int | Required | y相對於元素的位置。 |
flowControl | FailureHandling | Optional | 指定失敗處理模式,以確定是否應該允許執行繼續或停止。 |
Right Click
右鍵單擊給定的元素。
Param | Param Type | Mandatory | Description |
---|---|---|---|
to | TestObject | Required | 表示web元素 |
flowControl | FailureHandling | Optional | 指定失敗處理模式,以確定是否應該允許執行繼續或停止。 |
Right Click Offset
用相對位置(x, y)從元素的左上角右鍵單擊給定的元素
Param | Param Type | Mandatory | Description |
---|---|---|---|
to | TestObject | Required | 表示web元素。 |
offsetX | int | Required | x相對於元素的位置 |
offsetY | int | Required | y相對於元素的位置 |
flowControl | FailureHandling | Optional | 指定失敗處理模式,以確定是否應該允許執行繼續或停止。 |
Scroll To Element
將元素滾動到瀏覽器窗口的可見區域
Param | Param Type | Mandatory | Description |
---|---|---|---|
to | TestObject | Required | 表示web元素。 |
timeout | int | Required | 系統最多等待超時(秒)返回結果 |
flowControl | FailureHandling | Optional | 指定失敗處理模式,以確定是否應該允許執行繼續或停止。 |
Verify All Links On Current Page Accessible
驗證當前頁面上的所有鏈接(url)是否都是可訪問的。
Param | Param Type | Mandatory | Description |
---|---|---|---|
isIncludedExternalLinks | boolean | Required | 如果爲假,只針對同一主機上的鏈接。否則,指向所有鏈接。 |
excludedLinks | List | Required | 排除鏈接(url)的列表。 |
flowControl | FailureHandling | Optional | 指定失敗處理模式,以確定是否應該允許執行繼續或停止。 |
Verify Element Attribute Value
驗證web元素是否具有具有指定名稱和值的屬性。
Param | Param Type | Mandatory | Description |
---|---|---|---|
to | TestObject | Required | 表示web元素。 |
attributeName | String | Required | 要驗證的屬性的名稱。 |
attributeValue | String | Required | 要驗證的屬性的值。 |
timeout | int | Required | 系統最多等待超時(秒)返回結果 |
flowControl | FailureHandling | Optional | 指定失敗處理模式,以確定是否應該允許執行繼續或停止。 |
返回
- true: 元素具有具有指定名稱和值的屬性。
- false: 元素沒有指定名稱和值的屬性。
Verify Element Clickable
驗證給定元素是否可單擊。
Param | Param Type | Mandatory | Description |
---|---|---|---|
to | TestObject | Required | 表示web元素。 |
flowControl | FailureHandling | Optional | 指定失敗處理模式,以確定是否應該允許執行繼續或停止。 |
返回
-
true: 元素出現並可單擊。
- false: 元素既不存在也不可單擊。
Verify Element Has Attribute
驗證web元素是否具有具有指定名稱的屬性。
Param | Param Type | Mandatory | Description |
---|---|---|---|
to | TestObject | Required | 表示web元素。 |
attributeName | String | Required | 要驗證的屬性的名稱。 |
timeout | int | Required | 系統最多等待超時(秒)返回結果 |
flowControl | FailureHandling | Optional | 指定失敗處理模式,以確定是否應該允許執行繼續或停止 |
返回
- true: 元素具有具有特定名稱的屬性。
- false: 元素沒有具有特定名稱的屬性。
Verify Element Not Clickable
驗證給定元素是否不可單擊。
Param | Param Type | Mandatory | Description |
---|---|---|---|
to | TestObject | Required |
表示web元素。 |
flowControl | FailureHandling | Optional | 指定失敗處理模式,以確定是否應該允許執行繼續或停止。 |
返回
-
true: 元素存在且不可單擊。
- false: 元素出現並可單擊。
Verify Element Not Has Attribute
驗證web元素是否具有具有指定名稱的屬性。
Param | Param Type | Mandatory | Description |
---|---|---|---|
to | TestObject | Required | 表示web元素。 |
attributeName | String | Required | 要驗證的屬性的名稱。 |
timeout | int | Required | 系統最多等待超時(秒)返回結果 |
flowControl | FailureHandling | Optional | 指定失敗處理模式,以確定應該允許執行還是停止執行 |
返回
- true: 元素沒有指定名稱的屬性。
- false: 元素具有具有指定名稱的屬性
Verify Element Not Present
驗證給定的web元素是否不存在於DOM中。
Param | Param Type | Mandatory | Description |
---|---|---|---|
to | TestObject | Required | 表示web元素。 |
timeout | int | Required | 系統最多等待超時(秒)返回結果 |
flowControl | FailureHandling | Optional | 指定失敗處理模式,以確定是否應該允許執行繼續或停止 |
返回
|
Verify Element Not Visible
驗證給定的web元素是否不可見。
Param | Param Type | Mandatory | Description |
---|---|---|---|
to | TestObject | Required | 表示web元素。 |
flowControl | FailureHandling | Optional | 指定失敗處理模式,以確定是否應該允許執行繼續或停止 |
返回
- true:元素是可見的。
- false: 元素不可見