2011-05-27 108 views
1

我的堆棧跟蹤:硒RC不工作,但在其他瀏覽器中正常工作

公共靜態無效:

[java] 23 May 11 15:21:08, ERROR Failed to start new browser session, shutdown browser and clear all session data 
[java] java.lang.IllegalArgumentException: Resource not found: /core 
[java]  at org.openqa.selenium.server.browserlaunchers.ResourceExtractor.extractResourcePath(ResourceExtractor.java:39) 
[java]  at org.openqa.selenium.server.browserlaunchers.HTABrowserLauncher.createHTAFiles(HTABrowserLauncher.java:88) 
[java]  at org.openqa.selenium.server.browserlaunchers.HTABrowserLauncher.launch(HTABrowserLauncher.java:63) 
[java]  at org.openqa.selenium.server.browserlaunchers.HTABrowserLauncher.launchRemoteSession(HTABrowserLauncher.java:166) 
[java]  at org.openqa.selenium.server.browserlaunchers.InternetExplorerLauncher.launchRemoteSession(InternetExplorerLauncher.java:77) 
[java]  at org.openqa.selenium.server.BrowserSessionFactory.createNewRemoteSession(BrowserSessionFactory.java:372) 
[java]  at org.openqa.selenium.server.BrowserSessionFactory.getNewBrowserSession(BrowserSessionFactory.java:124) 
[java]  at org.openqa.selenium.server.BrowserSessionFactory.getNewBrowserSession(BrowserSessionFactory.java:86) 
[java]  at org.openqa.selenium.server.SeleniumDriverResourceHandler.getNewBrowserSession(SeleniumDriverResourceHandler.java:733) 
[java]  at org.openqa.selenium.server.SeleniumDriverResourceHandler.doCommand(SeleniumDriverResourceHandler.java:399) 
[java]  at org.openqa.selenium.server.SeleniumDriverResourceHandler.handleCommandRequest(SeleniumDriverResourceHandler.java:370) 
[java]  at org.openqa.selenium.server.SeleniumDriverResourceHandler.handle(SeleniumDriverResourceHandler.java:129) 
[java]  at org.openqa.jetty.http.HttpContext.handle(HttpContext.java:1530) 
[java]  at org.openqa.jetty.http.HttpContext.handle(HttpContext.java:1482) 
[java]  at org.openqa.jetty.http.HttpServer.service(HttpServer.java:909) 
[java]  at org.openqa.jetty.http.HttpConnection.service(HttpConnection.java:820) 
[java]  at org.openqa.jetty.http.HttpConnection.handleNext(HttpConnection.java:986) 
[java]  at org.openqa.jetty.http.HttpConnection.handle(HttpConnection.java:837) 
[java]  at org.openqa.jetty.http.SocketListener.handleConnection(SocketListener.java:245) 
[java]  at org.openqa.jetty.util.ThreadedServer.handle(ThreadedServer.java:357) 
[java]  at org.openqa.jetty.util.ThreadPool$PoolThread.run(ThreadPool.java:534) 
[java] 23 May 11 15:21:08, INFO Got result: Failed to start new browser session: Error while launching browser on session null 

只有當我從一個Java類,如下運行硒測試用例時出現此錯誤main(String [] args){org.junit.runner.JUnitCore.main(「com.selenium.test.TestSelenium」); }

當硒從運行Ant腳本如下

+1

哪個IE版本? 6,7,8或9? – duffymo 2011-05-27 22:15:42

+0

我只在ie 8上測試過 – kotipalli 2011-05-31 18:06:27

回答

0

你爲什麼不使用Selenium V2.0的webdriver的,而不是任何理由不能發生這種錯誤?它將自動解析瀏覽器位置和相關性,無需手動啓動RC。它需要重寫測試,但非常值得!

0

使用setBrowser(「* iexploreproxy」);

並嘗試相同的它也可以刪除多次人們面對的同時執行* iehta的JavaScript錯誤。

以上述瀏覽器模式執行時,您應該從管理員登錄運行。

相關問題