简体   繁体   中英

Failed to connect to binary FirefoxBinary(C:\Program Files (x86)\Mozilla Firefox\firefox.exe) on port 7056; process output follows: null

I am using FireFox 18 with Selenium 2.29.0. While running test exception occurs

Failed to connect to binary FirefoxBinary(C:\\Program Files (x86)\\Mozilla Firefox\\firefox.exe) on port 7056; process output follows: null

It seems strange that this error seldom occurs. Let's say I have 20 tests in my class, the "failed to connect" error occurs in 2 tests sometimes 3 and sometimes it doesn't occur.

Can't figure out why is it happening. If this is some how version problem or something else, none of the test case should run.

If you have path variable at your environment variables not set..then set it to location of Firefox.exe.... Or you can explicitly mention path to firefox.exe a

File pathToFirefoxBinary = new File(browser);
FirefoxBinary firefoxbin = new FirefoxBinary(pathToFirefoxBinary);
driver = new FirefoxDriver(firefoxbin,null);

This should work.. Or u can go for upgradation to 2.31.0

我在使用 Firefox 28.0 时遇到了完全相同的问题,我通过将 Firefox 版本降级到 27.0.1 解决了这个问题

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM