0
我正在Eclipse中使用硒(2.53)和Selenide在Java中创建一个框架。我正尝试使用Phantomjs来运行我的脚本。但每一次,我执行我的计划,Firefox会敞开心扉,以下错误消息会显示:Selenium当我想使用phantomjs时,打开firefox浏览器
org.openqa.selenium.WebDriverException: Failed to connect to binary
FirefoxBinary(C:\Program Files (x86)\Mozilla Firefox\firefox.exe) on
port 7055; process output follows:
4 addons.xpi DEBUG Registering manifest for C:\Program Files
(x86)\Mozilla Firefox\browser\features\[email protected]
出现这种情况与下面的代码:
open("Link);
在我开始上课,我有下面的代码来实例化phantomjs驱动程序。
Capabilities caps = new DesiredCapabilities();
((DesiredCapabilities) caps).setJavascriptEnabled(true);
((DesiredCapabilities) caps).setCapability(
PhantomJSDriverService.PHANTOMJS_EXECUTABLE_PATH_PROPERTY,"Path/phantomjs.exe");
请不要破坏帖子的格式。你的信号很难读,所以我编辑了它。不要再改变它 –
你需要显示更多的代码!你的'WebDriver'实例化为什么? – SiKing
请添加其余的代码 –