如何在Firefox中使用webdriver禁用Reader View [英] How to disable Reader View in Firefox using webdriver
本文介绍了如何在Firefox中使用webdriver禁用Reader View的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我禁用了阅读器视图选项,这对我没有多大帮助。关于如何解决这个问题将不胜感激。
谢谢 解决方案
@Before
public void setUp()throws Exception {
FirefoxProfile firefoxProfile = new FirefoxProfile();
firefoxProfile.setPreference(reader.parse-on-load.enabled,false);
driver = new FirefoxDriver(firefoxProfile);
baseUrl =http://google.com;
driver.manage()。timeouts()。implicitlyWait(30,TimeUnit.SECONDS);
}
$ c
$ p $应该这样做。Whenever I run my test in firefox, 'Reader View' message box pops up in the address bar. This pop up hides the element from view, so Webdriver is throwing "ElementnotvisibleException. This pop up is displayed for the pages in languages other than English. I disabled the reader view option. This does not help me much.Any thoughts on how to overcome this issue will be much appreciated.
Thanks
解决方案Something like this:
@Before public void setUp() throws Exception { FirefoxProfile firefoxProfile = new FirefoxProfile(); firefoxProfile.setPreference("reader.parse-on-load.enabled",false); driver = new FirefoxDriver(firefoxProfile); baseUrl = "http://google.com"; driver.manage().timeouts().implicitlyWait(30, TimeUnit.SECONDS); }
should do it.
这篇关于如何在Firefox中使用webdriver禁用Reader View的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文