【Katalon学习Web UI】元素操作

Click

单击给定的元素。

ParamParam TypeMandatoryDescription
toTestObjectRequired表示web元素。
flowControlFailureHandlingOptional指定failure handlingschema以确定是否应该允许执行继续或停止.

 

Click Offset

从元素的左上角单击具有相对位置(x, y)的给定元素。

 

ParamParam TypeMandatoryDescription
toTestObjectRequired表示web元素。
offsetXintRequiredx相对于元素的位置
offsetYintRequiredy相对于元素的位置
flowControlFailureHandlingOptional指定failure handlingschema以确定是否应该允许执行继续或停止。

 Double Click

双击给定的元素。

ParamParam TypeMandatoryDescription
toTestObjectRequired表示web元素。
flowControlFailureHandlingOptional指定failure handlingschema以确定是否应该允许执行继续或停止。

 Drag And Drop By Offset

拖动对象并将其拖放到偏移位置。

ParamParam TypeMandatoryDescription
sourceObjectTestObjectRequired源对象。
xOffsetintRequiredx 偏移
yOffsetintRequiredy 偏移
flowControlFailureHandlingOptional指定failure handlingschema以确定是否应该允许执行继续或停止.

 Drag And Drop To Object

拖动一个对象并将其放到另一个对象上。

ParamParam TypeMandatoryDescription
sourceObjectTestObjectRequired源对象。
destinationObjectTestObjectRequired目标对象。
flowControlFailureHandlingOptional指定failure handlingschema以确定是否应该允许执行继续或停止。

Focus

将焦点移动到指定的元素;例如输入字段,将光标移动到该字段。

ParamParam TypeMandatoryDescription
toTestObjectRequired表示web元素。
flowControlFailureHandlingOptional指定失败处理模式,以确定是否应该允许执行继续或停止。

 Get All Links On Current Page

获取当前页面上的所有链接。

ParamParam TypeMandatoryDescription
isIncludedExternalLinksbooleanRequired如果为假,只针对同一主机上的链接。否则,指向所有链接。
excludedLinksListRequired排除链接(url)的列表。
flowControlFailureHandlingOptional指定失败处理模式,以确定是否应该允许执行继续或停止。

 Get Attribute

获取web元素的属性。

ParamParam TypeMandatoryDescription
toTestObjectRequired表示web元素
attributeStringRequired属性名称
flowControlFailureHandlingOptional指定失败处理模式,以确定是否应该允许执行继续或停止。

 返回

Param TypeDescription
String对象属性的值

 Get CSS Value

获取web元素的CSS值。

ParamParam TypeMandatoryDescription
toTestObjectRequired表示web元素。
flowControlFailureHandlingOptional指定失败处理模式,以确定是否应该允许执行继续或停止。

 返回

Param TypeDescription
Stringweb元素的CSS值

 Get Element Height

获取web元素的高度。

ParamParam TypeMandatoryDescription
toTestObjectRequired表示web元素。
flowControlFailureHandlingOptional指定失败处理模式,以确定是否应该允许执行继续或停止。

 返回

Param TypeDescription
intweb元素的高度。

 Get Element Left Position

获取web元素的左侧位置。

ParamParam TypeMandatoryDescription
toTestObjectRequired表示web元素。
flowControlFailureHandlingOptional指定失败处理模式,以确定是否应该允许执行继续或停止。

 返回

Param TypeDescription
intweb元素的左位置。

 Get Element Width

获取web元素的宽度。

ParamParam TypeMandatoryDescription
toTestObjectRequired表示web元素。
flowControlFailureHandlingOptional指定失败处理模式,以确定是否应该允许执行继续或停止。

 返回

Param TypeDescription
intweb元素的宽度。

 Mouse Over

模拟用户将鼠标悬停在给定的元素上。

ParamParam TypeMandatoryDescription
toTestObjectRequired表示web元素。
flowControlFailureHandlingOptional指定失败处理模式,以确定是否应该允许执行继续或停止。

 Mouse Over Offset

模拟用户将鼠标悬停在给定元素的左上角相对位置(x, y)上。

ParamParam TypeMandatoryDescription
toTestObjectRequired表示web元素。
offsetXintRequiredx相对于元素的位置。
offsetYintRequiredy相对于元素的位置。
flowControlFailureHandlingOptional指定失败处理模式,以确定是否应该允许执行继续或停止。

 Right Click

右键单击给定的元素。

ParamParam TypeMandatoryDescription
toTestObjectRequired表示web元素
flowControlFailureHandlingOptional指定失败处理模式,以确定是否应该允许执行继续或停止。

 Right Click Offset

用相对位置(x, y)从元素的左上角右键单击给定的元素

ParamParam TypeMandatoryDescription
toTestObjectRequired表示web元素。
offsetXintRequiredx相对于元素的位置
offsetYintRequiredy相对于元素的位置
flowControlFailureHandlingOptional指定失败处理模式,以确定是否应该允许执行继续或停止。

 Scroll To Element

将元素滚动到浏览器窗口的可见区域

ParamParam TypeMandatoryDescription
toTestObjectRequired表示web元素。
timeoutintRequired系统最多等待超时(秒)返回结果
flowControlFailureHandlingOptional指定失败处理模式,以确定是否应该允许执行继续或停止。

 Verify All Links On Current Page Accessible

验证当前页面上的所有链接(url)是否都是可访问的。

ParamParam TypeMandatoryDescription
isIncludedExternalLinksbooleanRequired如果为假,只针对同一主机上的链接。否则,指向所有链接。
excludedLinksListRequired排除链接(url)的列表。
flowControlFailureHandlingOptional指定失败处理模式,以确定是否应该允许执行继续或停止。

 Verify Element Attribute Value

验证web元素是否具有具有指定名称和值的属性。

ParamParam TypeMandatoryDescription
toTestObjectRequired表示web元素。
attributeNameStringRequired要验证的属性的名称。
attributeValueStringRequired要验证的属性的值。
timeoutintRequired系统最多等待超时(秒)返回结果
flowControlFailureHandlingOptional指定失败处理模式,以确定是否应该允许执行继续或停止。

返回

  • true: 元素具有具有指定名称和值的属性。
  • false: 元素没有指定名称和值的属性。

 Verify Element Clickable

验证给定元素是否可单击。

ParamParam TypeMandatoryDescription
toTestObjectRequired表示web元素。
flowControlFailureHandlingOptional指定失败处理模式,以确定是否应该允许执行继续或停止。

 返回

  • true: 元素出现并可单击。

  • false: 元素既不存在也不可单击。

 Verify Element Has Attribute

验证web元素是否具有具有指定名称的属性。

ParamParam TypeMandatoryDescription
toTestObjectRequired表示web元素。
attributeNameStringRequired要验证的属性的名称。
timeoutintRequired系统最多等待超时(秒)返回结果
flowControlFailureHandlingOptional指定失败处理模式,以确定是否应该允许执行继续或停止

 返回

  • true: 元素具有具有特定名称的属性。
  • false: 元素没有具有特定名称的属性。

 Verify Element Not Clickable

验证给定元素是否不可单击。

ParamParam TypeMandatoryDescription
toTestObjectRequired

 

表示web元素。

flowControlFailureHandlingOptional指定失败处理模式,以确定是否应该允许执行继续或停止。

 返回

  • true: 元素存在且不可单击。

  • false: 元素出现并可单击。

 Verify Element Not Has Attribute

验证web元素是否具有具有指定名称的属性。

ParamParam TypeMandatoryDescription
toTestObjectRequired表示web元素。
attributeNameStringRequired要验证的属性的名称。
timeoutintRequired系统最多等待超时(秒)返回结果
flowControlFailureHandlingOptional指定失败处理模式,以确定应该允许执行还是停止执行

 返回

  • true: 元素没有指定名称的属性。
  • false: 元素具有具有指定名称的属性

 Verify Element Not Present

验证给定的web元素是否不存在于DOM中。

ParamParam TypeMandatoryDescription
toTestObjectRequired表示web元素。
timeoutintRequired系统最多等待超时(秒)返回结果
flowControlFailureHandlingOptional指定失败处理模式,以确定是否应该允许执行继续或停止

 返回

  • true: 元素不存在。
  • false:元素存在。

 Verify Element Not Visible

验证给定的web元素是否不可见。

ParamParam TypeMandatoryDescription
toTestObjectRequired表示web元素。
flowControlFailureHandlingOptional指定失败处理模式,以确定是否应该允许执行继续或停止

 返回

  • true:元素是可见的。
  • false: 元素不可见

 

  • 0
    点赞
  • 2
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值