我在Ubuntu Desktop 16.04上使用Selenium WebDriver,我无法打开浏览器.Firefox更新后出现以下错误(在此之前,一切正常):
Traceback (most recent call last):
File "test.py", line 6, in <module>
driver = webdriver.Firefox()
File "/usr/local/lib/python3.5/dist-packages/selenium/webdriver/firefox/webdriver.py", line 81, in __init__
self.binary, timeout)
File "/usr/local/lib/python3.5/dist-packages/selenium/webdriver/firefox/extension_connection.py", line 51, in __init__
self.binary.launch_browser(self.profile, timeout=timeout)
File "/usr/local/lib/python3.5/dist-packages/selenium/webdriver/firefox/firefox_binary.py", line 68, in launch_browser
self._wait_until_connectable(timeout=timeout)
File "/usr/local/lib/python3.5/dist-packages/selenium/webdriver/firefox/firefox_binary.py", line 98, in _wait_until_connectable
raise WebDriverException("The browser appears to have exited "
selenium.common.exceptions.WebDriverException: Message: The browser appears to have exited before we could connect. If you specified a log_file in the FirefoxBinary constructor, check it for details.
Run Code Online (Sandbox Code Playgroud) 我正在尝试运行从Selenium IDE导出的Junit测试用例.我超越了异常.我正在使用Windows XP,Firefox 20.0.1,并使用selenium-server-standalone-2.28.0.jar.Upon运行,打开一个空白的Firefox窗口.当我关闭该窗口时,我在控制台中得到以下异常
org.openqa.selenium.firefox.NotConnectedException: Unable to connect to host 127.0.0.1 on port 7055 after 45000 ms at
org.openqa.selenium.firefox.internal.NewProfileExtensionConnection.start(NewProfileExtensionConnection.java:96)
at org.openqa.selenium.firefox.FirefoxDriver.startClient(FirefoxDriver.java:142)
at org.openqa.selenium.remote.RemoteWebDriver.(RemoteWebDriver.java:80)
at org.openqa.selenium.firefox.FirefoxDriver.(FirefoxDriver.java:121)
at org.openqa.selenium.firefox.FirefoxDriver.(FirefoxDriver.java:77)
at com.dci.dids.selenium.SwamiRoleCreationTestCase.setUp(SwamiRoleCreationTestCase.java:20)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at org.junit.internal.runners.BeforeAndAfterRunner.invokeMethod(BeforeAndAfterRunner.java:74)
at org.junit.internal.runners.BeforeAndAfterRunner.runBefores(BeforeAndAfterRunner.java:50)
at org.junit.internal.runners.BeforeAndAfterRunner.runProtected(BeforeAndAfterRunner.java:33)
at org.junit.internal.runners.TestMethodRunner.runMethod(TestMethodRunner.java:75)
at org.junit.internal.runners.TestMethodRunner.run(TestMethodRunner.java:45)
at org.junit.internal.runners.TestClassMethodsRunner.invokeTestMethod(TestClassMethodsRunner.java:66)
at org.junit.internal.runners.TestClassMethodsRunner.run(TestClassMethodsRunner.java:35)
at org.junit.internal.runners.TestClassRunner$1.runUnprotected(TestClassRunner.java:42)
at org.junit.internal.runners.BeforeAndAfterRunner.runProtected(BeforeAndAfterRunner.java:34)
at org.junit.internal.runners.TestClassRunner.run(TestClassRunner.java:52)
at org.eclipse.jdt.internal.junit4.runner.JUnit4TestReference.run(JUnit4TestReference.java:50)
at org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:38)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:467)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:683)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:390)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:197)
Run Code Online (Sandbox Code Playgroud)
JUnit Failure跟踪中的此异常
org.openqa.selenium.WebDriverException: Failed to connect to binary FirefoxBinary(/usr/bin/firefox) on …Run Code Online (Sandbox Code Playgroud) 我在使用firefox和webdriver时遇到错误.
45000 ms后无法在端口7055上连接到主机127.0.0.1
Firefox版本:45.0 Selenium:2.50.1 Windows 10 64位
是否有人得到类似的问题或任何想法是什么解决方案.它使用chrome工作正常,但使用firefox没有任何URL被加载
我正在使用selenium来测试我们的网站.当我构建项目时,有一个异常: -
OpenQA.Selenium.WebDriverException:无法在45000毫秒内启动套接字.尝试连接到以下地址:127.0.0.1:7055,问题来自代码
IWebDriver driver = new FirefoxDriver();
Run Code Online (Sandbox Code Playgroud)
谁知道如何解决这个问题?
我在firefox 47的更新中遇到了Firefox 48.0的错误
45000 ms后无法在端口7055上连接到主机127.0.0.1.Firefox控制台输出:066 addons.xpi DEBUG通过更改已安装的附加组件来更新数据库
我的系统和浏览器配置是:
Firefox 48
Selenium 2.48也尝试2.53
窗口8 64位
我也尝试了牵线木偶驱动程序,但没有得到适当的输出.
除了降级firefox之外,有关如何修复此问题的任何想法?