无法绑定锁定端口 - webdriver 2.22

时间:2012-06-06 18:27:01

标签: java firefox selenium webdriver

我收到一个错误,我的webdriver(2.22)无法在45000ms内绑定到锁定端口7054.

版本:

  • OS:WinXP
  • FF:12
  • Webdriver:2.22.0
  • Java:1.6

场合

今天早上一切正常,我的测试运行了。我的FF没有安装在"预期" location(我安装时没有管理员工作PC的权限)。因此我必须创建如下所示的firefox驱动程序

新的FirefoxDriver(                 新的FirefoxBinary(                         新文件(                                 " C:\ Documents and Settings \ larsonre \ Local Settings \ Application Data \ Mozilla Firefox \ firefox.exe")),                 空);

今天我终于获得了管理员权限。所以我卸载了FF并重新安装它,因此它将在C:\ Program Files \ Mozilla Firefox \ firefox.exe中,我将呼叫改为"新的FirefoxDriver();"现在我收到webdriver无法绑定到锁定端口的错误。

如果我使用指定二进制路径但给它新路径的代码,我会收到同样的错误。

我没有看到firefox启动,我没有看到任务管理器中的firefox进程。

有什么想法吗? (下面的故障追踪)

-----追踪-----

org.openqa.selenium.WebDriverException:无法在45000 ms内绑定到锁定端口7054 构建信息:版本:' 2.22.0',修订版:' 17048',时间:' 2012-05-29 14:59:54' 系统信息:os.name:' Windows XP',os.arch:' x86',os.version:' 5.1',java.version:&# 39; 1.6.0_29' 驱动程序信息:driver.version:FirefoxDriver     在org.openqa.selenium.internal.SocketLock.lock(SocketLock.java:94)     在org.openqa.selenium.firefox.internal.NewProfileExtensionConnection.start(NewProfileExtensionConnection.java:68)     在org.openqa.selenium.firefox.FirefoxDriver.startClient(FirefoxDriver.java:207)     在org.openqa.selenium.remote.RemoteWebDriver。(RemoteWebDriver.java:93)     在org.openqa.selenium.firefox.FirefoxDriver。(FirefoxDriver.java:147)     在edu.si.solaa._02_ListOfValidAppIDs.setUp(_02_ListOfValidAppIDs.java:24)     at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)     at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)     at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)     at java.lang.reflect.Method.invoke(Unknown Source)     在org.junit.runners.model.FrameworkMethod $ 1.runReflectiveCall(FrameworkMethod.java:44)     在org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:15)     在org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:41)     在org.junit.internal.runners.statements.RunBefores.evaluate(RunBefores.java:27)     在org.junit.internal.runners.statements.RunAfters.evaluate(RunAfters.java:31)     在org.junit.runners.BlockJUnit4ClassRunner.runNotIgnored(BlockJUnit4ClassRunner.java:79)     在org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:71)     在org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:49)     在org.junit.runners.ParentRunner $ 3.run(ParentRunner.java:193)     在org.junit.runners.ParentRunner $ 1.schedule(ParentRunner.java:52)     在org.junit.runners.ParentRunner.runChildren(ParentRunner.java:191)     在org.junit.runners.ParentRunner.access $ 000(ParentRunner.java:42)     在org.junit.runners.ParentRunner $ 2.evaluate(ParentRunner.java:184)     在org.junit.runners.ParentRunner.run(ParentRunner.java:236)     在org.eclipse.jdt.internal.junit4.runner.JUnit4TestReference.run(JUnit4TestReference.java:50)     在org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:38)     在org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:467)     在org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:683)     在org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:390)     在org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:197)

显示java.lang.NullPointerException     在edu.si.solaa._02_ListOfValidAppIDs.tearDown(_02_ListOfValidAppIDs.java:32)     at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)     at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)     at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)     at java.lang.reflect.Method.invoke(Unknown Source)     在org.junit.runners.model.FrameworkMethod $ 1.runReflectiveCall(FrameworkMethod.java:44)     在org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:15)     在org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:41)     在org.junit.internal.runners.statements.RunAfters.evaluate(RunAfters.java:37)     在org.junit.runners.BlockJUnit4ClassRunner.runNotIgnored(BlockJUnit4ClassRunner.java:79)     在org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:71)     在org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:49)     在org.junit.runners.ParentRunner $ 3.run(ParentRunner.java:193)     在org.junit.runners.ParentRunner $ 1.schedule(ParentRunner.java:52)     在org.junit.runners.ParentRunner.runChildren(ParentRunner.java:191)     在org.junit.runners.ParentRunner.access $ 000(ParentRunner.java:42)     在org.junit.runners.ParentRunner $ 2.evaluate(ParentRunner.java:184)     在org.junit.runners.ParentRunner.run(ParentRunner.java:236)     在org.eclipse.jdt.internal.junit4.runner.JUnit4TestReference.run(JUnit4TestReference.java:50)     在org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:38)     在org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:467)     在org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:683)     在org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:390)     在org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:197)

1 个答案:

答案 0 :(得分:3)

显然我只需要在安装后重启我的机器.....