
看来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
欢迎分享,转载请注明来源:内存溢出
微信扫一扫
支付宝扫一扫
评论列表(0条)