Actions对Element的一些操作解析

针对Chrome浏览器:

在自动化测试的编写中如果报出Element is not visible to click at xxxx point时,我会使用:

new Actions(WebDriver webDriver).moveToElement(WebElement webElement).click().perform(); 使元素能够被准确点击。

如果鼠标移动到界面的某个部位时会显示隐藏的悬浮效果界面时,则使用:

new Actions(WebDriver webDriver).moveToElement(WebElement webElement).perform(); 那么鼠标就会移动到该元素上,使隐藏的悬浮效果得以显示。

posted @ 2017-02-04 11:35  留白*  阅读(353)  评论(0编辑  收藏  举报