栏目分类:
子分类:
返回
名师互学网用户登录
快速导航关闭
当前搜索
当前分类
子分类
实用工具
热门搜索
名师互学网 > IT > 面试经验 > 面试问答

Selenium WebDriver鼠标操作moveToElement不会在Firefox Linux上引发mouseout事件

面试问答 更新时间: 发布时间: IT归档 最新发布 模块sitemap 名妆网 法律咨询 聚返吧 英语巴士网 伯小乐 网商动力

Selenium WebDriver鼠标操作moveToElement不会在Firefox Linux上引发mouseout事件

看来Advanced Actions
API依赖于本机事件,默认情况下,Linux版本的Firefox中禁用了本机事件。因此,必须在WebDriver实例中显式启用它们。

FirefoxProfile profile = new FirefoxProfile();//explicitly enable native events(this is mandatory on Linux system, since they//are not enabled by defaultprofile.setEnableNativeEvents(true);WebDriver driver = new FirefoxDriver(profile);
另外,就我而言,我需要将WebDriver升级到2.31版,因为
moveToElement
即使显式启用了本机事件,hover()操作也无法在2.30上正常工作。在Linux上使用WebDriver的2.31版和Firefox的17和19版对此进行了测试。有关更多信息,您可以检查以下链接:http
//pre.google.com/p/selenium/wiki/AdvancedUserInteractions#Native_events_versus_synthetic_events


转载请注明:文章转载自 www.mshxw.com
本文地址:https://www.mshxw.com/it/426782.html
我们一直用心在做
关于我们 文章归档 网站地图 联系我们

版权所有 (c)2021-2022 MSHXW.COM

ICP备案号:晋ICP备2021003244-6号