public class ClickEvent extends AbstractEvent
文件名:ClickEvent.java
用途: 定义了对控件进行点击操作相关的方法,可通过该类,对页面进行基本的点击操作
编码时间:2019年8月29日下午3:24:34
修改时间:2021年10月18日 上午10:23:53
brower, exceptionSet, isLocationElement, LOCATION_ELEMENT_JS, wait, waitTime, webElement| Constructor and Description |
|---|
ClickEvent(AbstractBrower brower)
构造对象
|
| Modifier and Type | Method and Description |
|---|---|
void |
click(Element element)
鼠标左键单击事件
|
void |
continuousClick(Element element,
int clickCount,
long sleepInMillis)
连续进行指定次数的鼠标左键点击事件
|
void |
doubleClick(Element element)
鼠标左键双击事件
|
void |
rightClick(Element element)
鼠标右键点击事件
|
actionOperate, arrayToString, getBrower, getExceptionInfomation, isExistElement, locationElement, setLocationElement, setWaitTimepublic ClickEvent(AbstractBrower brower)
brower - 浏览器AbstractBrower类对象public void click(Element element)
element - Element对象org.openqa.selenium.TimeoutException - 元素无法操作时抛出的异常org.openqa.selenium.NoSuchElementException - 元素不存在或下标不正确时抛出的异常public void doubleClick(Element element)
element - Element对象org.openqa.selenium.TimeoutException - 元素无法操作时抛出的异常org.openqa.selenium.NoSuchElementException - 元素不存在或下标不正确时抛出的异常public void rightClick(Element element)
element - Element对象org.openqa.selenium.TimeoutException - 元素无法操作时抛出的异常org.openqa.selenium.NoSuchElementException - 元素不存在或下标不正确时抛出的异常public void continuousClick(Element element, int clickCount, long sleepInMillis)
element - Element对象clickCount - 点击次数sleepInMillis - 操作时间间隔,单位为毫秒org.openqa.selenium.TimeoutException - 元素无法操作时抛出的异常org.openqa.selenium.NoSuchElementException - 元素不存在或下标不正确时抛出的异常Copyright © 2024. All rights reserved.