2015-02-08 116 views
2
09:39:51.984 INFO - Got result: Failed to start new browser session: org.openqa.selenium.server.RemoteCommandException: Error while launching browser on session null 
09:39:52.002 INFO - Command request: getNewBrowserSession[*firefox, http://website.localhost] on session null 
09:39:52.002 INFO - creating new remote session 
09:39:52.003 INFO - Allocated session 4b3951d894ed4a2c94b7fd9758cd5554 for http://website.localhost, launching... 
jar:file:/usr/bin/selenium-server-standalone-2.41.0.jar!/customProfileDirCUSTFFCHROME 
09:39:52.071 INFO - Preparing Firefox profile... 
09:40:12.129 ERROR - Failed to start new browser session, shutdown browser and clear all session data 
java.lang.RuntimeException: Timed out waiting for profile to be created! 
    at org.openqa.selenium.server.browserlaunchers.FirefoxChromeLauncher.waitForFullProfileToBeCreated(FirefoxChromeLauncher.java:307) 
    at org.openqa.selenium.server.browserlaunchers.FirefoxChromeLauncher.populateCustomProfileDirectory(FirefoxChromeLauncher.java:119) 
    at org.openqa.selenium.server.browserlaunchers.FirefoxChromeLauncher.launch(FirefoxChromeLauncher.java:89) 
    at org.openqa.selenium.server.browserlaunchers.FirefoxChromeLauncher.launchRemoteSession(FirefoxChromeLauncher.java:346) 
    at org.openqa.selenium.server.browserlaunchers.FirefoxLauncher.launchRemoteSession(FirefoxLauncher.java:114) 
    at org.openqa.selenium.server.BrowserSessionFactory.createNewRemoteSession(BrowserSessionFactory.java:400) 
    at org.openqa.selenium.server.BrowserSessionFactory.getNewBrowserSession(BrowserSessionFactory.java:144) 
    at org.openqa.selenium.server.BrowserSessionFactory.getNewBrowserSession(BrowserSessionFactory.java:105) 
    at org.openqa.selenium.server.SeleniumDriverResourceHandler.getNewBrowserSession(SeleniumDriverResourceHandler.java:809) 
    at org.openqa.selenium.server.SeleniumDriverResourceHandler.doCommand(SeleniumDriverResourceHandler.java:435) 
    at org.openqa.selenium.server.SeleniumDriverResourceHandler.handleCommandRequest(SeleniumDriverResourceHandler.java:405) 
    at org.openqa.selenium.server.SeleniumDriverResourceHandler.handle(SeleniumDriverResourceHandler.java:151) 
    at org.openqa.jetty.http.HttpContext.handle(HttpContext.java:1526) 
    at org.openqa.jetty.http.HttpContext.handle(HttpContext.java:1479) 
    at org.openqa.jetty.http.HttpServer.service(HttpServer.java:920) 
    at org.openqa.jetty.http.HttpConnection.service(HttpConnection.java:820) 
    at org.openqa.jetty.http.HttpConnection.handleNext(HttpConnection.java:986) 
    at org.openqa.jetty.http.HttpConnection.handle(HttpConnection.java:837) 
    at org.openqa.jetty.http.SocketListener.handleConnection(SocketListener.java:243) 
    at org.openqa.jetty.util.ThreadedServer.handle(ThreadedServer.java:358) 
    at org.openqa.jetty.util.ThreadPool$PoolThread.run(ThreadPool.java:537) 
09:40:12.131 INFO - Got result: Failed to start new browser session: org.openqa.selenium.server.RemoteCommandException: Error while launching browser on session null 
09:40:12.143 INFO - Command request: getNewBrowserSession[*firefox, http://website.localhost] on session null 

我在做什麼?無法啓動新的瀏覽器會話:org.openqa.selenium.server.RemoteCommandException:在會話null上啓動瀏覽器時出錯

步驟1:啓動轂

集線器是中心點將接收所有的測試請求和分發它們的正確節點。

打開命令提示符並導航到您複製了selenium-server-standalone文件的目錄。鍵入以下命令:

java -jar selenium-server-standalone-2.14.0.jar -role hub

第2步:啓動節點

不管你是否要運行新的webdriver功能在一個網格,或使用Selenium 1 RC功能一格,或兩者同時,您使用相同的selenium-server-standalone jar文件來啓動節點。

java -jar selenium-server-standalone-2.14.0.jar -role node -hub http://localhost:44444/grid/register(44444這裏是我工作的環境)

+0

現在我收到此錯誤: 例外 '的RuntimeException' 有消息「無效的響應,同時訪問在Selenium服務器的 'http://本地主機:44444 /硒服務器/驅動器/':定時out after 30000ms'in phar:///usr/bin/phpunit/phpunit-selenium/Extensions/SeleniumTestCase/Driver.php:1066 請幫忙!! phpunit版本4.4.5 – shab 2015-02-10 22:47:58

+0

您確認服務器正在運行嗎?打開瀏覽器並轉到集線器。查看集線器支持的瀏覽器。確保Firefox是其中之一。我們能否看到你的代碼如何構建遠程驅動程序? – jrock2004 2015-02-11 04:51:17

回答

1

這是由於硒和Firefox之間的兼容性問題。

您需要升級到最新的硒服務器2.44

相關問題