我创建驱动程序如下:
driver = new webdriver.Builder().withCapabilities(webdriver.Capabilities.firefox()).build();
如何设置elementScrollBehavior
?
您可以尝试使用firefoxprofile setPreference方法
FirefoxProfile profile = new FirefoxProfile();
DesiredCapabilities dc=DesiredCapabilities.firefox();
// this sets general.autoScroll to false and you can get all the keys you need from about:config to set your preferences
profile.setPreference("general.autoScroll", false);
dc = DesiredCapabilities.firefox();
dc.setCapability(FirefoxDriver.PROFILE, profile);
Webdriver driver = new FirefoxDriver(dc);
本文收集自互联网,转载请注明来源。
如有侵权,请联系[email protected] 删除。
我来说两句