【发布时间】:2014-02-10 09:47:45
【问题描述】:
当我使用 Selenium 2.39.0 和 Firefox 26/27 打开一个页面时,我得到了 <noscript> 标记的内容,所以我需要以某种方式启用 javascript。关于如何使用 FirefoxDriver 和 FirefoxProfile 启用/禁用 javascript 的材料很多,但我不能使用这种方法。原因如下:Selenium fails to open page on localhost
像这样使用 Selenium“旧方式”时,我需要启用 javascript:
browser = new DefaultSelenium("localhost", 4444, "*firefox", "http://localhost/");
我该怎么做?
【问题讨论】: