Ubuntu中的Selenium RC不能启动Firefox 2(也不能关闭它)


Selenium RC in Ubuntu doesn't start Firefox 2 (and cannot close it)

我正在使用selenium grid,我已经尝试了两个服务器版本1.0.3,现在被2.2.0取代。它在google chrome和opera上工作得很好,但在firefox 2或3.6.9上就失败了。

在糟糕的情况下网格有

的配置
name:    "Ubuntu - Firefox 2"
browser: "*firefox /home/artjom/opt/firefox-2.0/firefox-bin"

并且运行testCase在加载配置文件时停止

     [java] 15:41:12.103 INFO - Command request: getNewBrowserSession[*firefox /home/artjom/opt/firefox-2.0/firefox-bin, http://kurapov.name/] on session null
     [java] 15:41:12.104 INFO - creating new remote session
     [java] 15:41:12.104 INFO - Allocated session 1bae135617ab4761abd6be894e49bdae for http://kurapov.name/, launching...
     [java] 15:41:12.215 INFO - Preparing Firefox profile...
     [java] 15:41:20.345 INFO - Checking connection to hub...
     [java] 15:41:20.345 INFO - Ping Hub at http://192.168.20.106:4444/heartbeat?host=192.168.20.98&port=5555
     [java] 15:41:32.540 ERROR - Failed to start new browser session, shutdown browser and clear all session data
     [java] java.lang.RuntimeException: Timed out waiting for profile to be created!
     [java]     at org.openqa.selenium.server.browserlaunchers.FirefoxChromeLauncher.waitForFullProfileToBeCreated(FirefoxChromeLauncher.java:360)

如果我尝试在那里添加一些额外的参数,如-P default或-no-remote,则无法正确解析。所以,相反,我可以写一个shell脚本做同样的事情,虽然在配置中,我将不得不使用*自定义而不是*firefox,我认为它会影响浏览器如何关闭..

name:    "Ubuntu - Firefox 2"
browser: "*custom /home/artjom/firefox2.sh"

所以现在它工作得很好,除了浏览器在会话结束时没有关闭,导致反复执行的问题。在测试用例(或拆除)的末尾,close()方法,许多人建议只关闭正在测试的页面,而RC执行框架仍然存在。有什么建议吗?

通过使用*firefoxproxy关闭浏览器和使用默认配置文件

部分解决
相关文章: