Issue 1490 in selenium: Unable to run tests when using firefox custom profile and selenium 2.0b3

已查看 7 次
跳至第一个未读帖子

sele...@googlecode.com

未读,
2011年3月31日 11:56:352011/3/31
收件人 selenium-deve...@googlegroups.com
Status: New
Owner: ----
Labels: Type-Defect Priority-Medium

New issue 1490 by tbhot...@gmail.com: Unable to run tests when using
firefox custom profile and selenium 2.0b3
http://code.google.com/p/selenium/issues/detail?id=1490

-Steps to reproduce the issue-
1. Selenium 2.0b3 running with the following command

java -jar selenium-server-standalone-2.0b3.jar -firefoxProfileTemplate
[Path to custom profile] -timeout 180 -singlewindow -browserSessionReuse
-forcedBrowserModeRestOfLine firefoxchrome

2. Launch suite test with hudson
3. The firefox windows opens but nothing happens

-Log file-
17:46:02.384 INFO - Java: Sun Microsystems Inc. 19.0-b09
17:46:02.386 INFO - OS: Linux 2.6.35-22-server amd64
17:46:02.390 INFO - v2.0 [b3], with Core v2.0 [b3]
17:46:02.391 INFO - Will recycle browser sessions when possible.
17:46:02.391 INFO - "firefoxchrome" will be used as the browser mode for
all sessions, no matter what is passed to getNewBrowserSession.
17:46:02.486 INFO - RemoteWebDriver instances should connect to:
http://127.0.0.1:4444/wd/hub
17:46:02.487 INFO - Version Jetty/5.1.x
17:46:02.487 INFO - Started
HttpContext[/selenium-server/driver,/selenium-server/driver]
17:46:02.488 INFO - Started HttpContext[/selenium-server,/selenium-server]
17:46:02.488 INFO - Started HttpContext[/,/]
17:46:17.488 INFO - Started
org.openqa.jetty.jetty.servlet.ServletHandler@53ebd75b
17:46:17.489 INFO - Started HttpContext[/wd,/wd]
17:46:17.493 INFO - Started SocketListener on 0.0.0.0:4444
17:46:17.493 INFO - Started org.openqa.jetty.jetty.Server@5fe04cbf
17:46:53.855 INFO - Checking Resource aliases
17:46:53.857 INFO - Command request: getNewBrowserSession[*firefox,
http://127.0.0.1] on session null
17:46:53.859 INFO - overriding browser mode w/ forced browser mode setting:
firefoxchrome
17:46:53.859 INFO - grabbing available session...
17:46:53.859 INFO - creating new remote session
17:46:53.881 INFO - Allocated session dd41cb3062924f14995456f7cef70152 for
http://127.0.0.1, launching...
17:46:53.934 INFO - Preparing Firefox profile...
17:46:56.350 INFO - Launching Firefox...
17:48:23.855 INFO - Command request: getNewBrowserSession[*firefox,
http://127.0.0.1] on session null
17:48:23.855 INFO - overriding browser mode w/ forced browser mode setting:
firefoxchrome
17:48:23.855 INFO - grabbing available session...
17:48:23.855 INFO - creating new remote session
17:48:23.856 INFO - Allocated session a480cb20473f4e4583794c164c587294 for
http://127.0.0.1, launching...
17:48:23.887 INFO - Preparing Firefox profile...
17:48:26.261 INFO - Launching Firefox...
17:49:53.925 INFO - Command request: getNewBrowserSession[*firefox,
http://127.0.0.1] on session null
17:49:53.925 INFO - overriding browser mode w/ forced browser mode setting:
firefoxchrome
17:49:53.926 INFO - grabbing available session...
17:49:53.926 INFO - creating new remote session
17:49:53.926 INFO - Allocated session 8ede0c3a5f9c4da7acf8466e7c32917d for
http://127.0.0.1, launching...
17:49:53.954 INFO - Preparing Firefox profile...
17:49:56.349 INFO - Launching Firefox...
17:49:57.377 ERROR - Failed to start new browser session, shutdown browser
and clear all session data
org.openqa.selenium.server.RemoteCommandException: timed out waiting for
window 'null' to appear
at
org.openqa.selenium.server.FrameGroupCommandQueueSet.waitForLoad(FrameGroupCommandQueueSet.java:564)
at
org.openqa.selenium.server.FrameGroupCommandQueueSet.waitForLoad(FrameGroupCommandQueueSet.java:521)
at
org.openqa.selenium.server.BrowserSessionFactory.createNewRemoteSession(BrowserSessionFactory.java:374)
at
org.openqa.selenium.server.BrowserSessionFactory.getNewBrowserSession(BrowserSessionFactory.java:125)
at
org.openqa.selenium.server.BrowserSessionFactory.getNewBrowserSession(BrowserSessionFactory.java:87)
at
org.openqa.selenium.server.SeleniumDriverResourceHandler.getNewBrowserSession(SeleniumDriverResourceHandler.java:785)
at
org.openqa.selenium.server.SeleniumDriverResourceHandler.doCommand(SeleniumDriverResourceHandler.java:422)
at
org.openqa.selenium.server.SeleniumDriverResourceHandler.handleCommandRequest(SeleniumDriverResourceHandler.java:393)
at
org.openqa.selenium.server.SeleniumDriverResourceHandler.handle(SeleniumDriverResourceHandler.java:146)
at org.openqa.jetty.http.HttpContext.handle(HttpContext.java:1530)
at org.openqa.jetty.http.HttpContext.handle(HttpContext.java:1482)
at org.openqa.jetty.http.HttpServer.service(HttpServer.java:909)
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:357)
at org.openqa.jetty.util.ThreadPool$PoolThread.run(ThreadPool.java:534)
17:49:57.378 INFO - Killing Firefox...
17:49:57.405 INFO - Got result: Failed to start new browser session: Error
while launching browser on session null

-Expected output-
Selenium running the tests with the custom profile

-Product version info-
Selenium 2.0b3
Ubuntu 10.04
Firefox 3.6.16
Java version 1.6.0_20
OpenJDK Runtime Environment (IcedTea6 1.9.7) (6b20-1.9.7-0ubuntu1)
OpenJDK 64-Bit Server VM (build 19.0-b09, mixed mode)


Please provide any additional information below.


sele...@googlecode.com

未读,
2011年3月31日 12:03:382011/3/31
收件人 selenium-deve...@googlegroups.com

Comment #1 on issue 1490 by tbhot...@gmail.com: Unable to run tests when
using firefox custom profile and selenium 2.0b3
http://code.google.com/p/selenium/issues/detail?id=1490

I continued with the research and I'm not able to run the tests without the
custom profile on 2.0b3 but I can run the tests without custom profile on
2.0b2.

If I try to run the tests in 2.0b2 with the custom profile I get the
following error:

18:02:24.765 ERROR - Failed to start new browser session, shutdown browser

and clear all session data

java.lang.ClassCastException: java.io.File cannot be cast to
java.lang.String
at
org.openqa.selenium.server.browserlaunchers.BrowserOptions.getFile(BrowserOptions.java:123)
at
org.openqa.selenium.server.browserlaunchers.FirefoxChromeLauncher.initProfileTemplate(FirefoxChromeLauncher.java:164)
at
org.openqa.selenium.server.browserlaunchers.FirefoxChromeLauncher.makeCustomProfile(FirefoxChromeLauncher.java:215)
at
org.openqa.selenium.server.browserlaunchers.FirefoxChromeLauncher.launch(FirefoxChromeLauncher.java:83)
at
org.openqa.selenium.server.browserlaunchers.FirefoxChromeLauncher.launchRemoteSession(FirefoxChromeLauncher.java:413)
at
org.openqa.selenium.server.BrowserSessionFactory.createNewRemoteSession(BrowserSessionFactory.java:373)


at
org.openqa.selenium.server.BrowserSessionFactory.getNewBrowserSession(BrowserSessionFactory.java:125)
at
org.openqa.selenium.server.BrowserSessionFactory.getNewBrowserSession(BrowserSessionFactory.java:87)
at

org.openqa.selenium.server.SeleniumDriverResourceHandler.getNewBrowserSession(SeleniumDriverResourceHandler.java:786)
at
org.openqa.selenium.server.SeleniumDriverResourceHandler.doCommand(SeleniumDriverResourceHandler.java:423)
at
org.openqa.selenium.server.SeleniumDriverResourceHandler.handleCommandRequest(SeleniumDriverResourceHandler.java:394)
at
org.openqa.selenium.server.SeleniumDriverResourceHandler.handle(SeleniumDriverResourceHandler.java:147)

sele...@googlecode.com

未读,
2011年4月15日 11:00:182011/4/15
收件人 selenium-deve...@googlegroups.com

Comment #2 on issue 1490 by aleun...@gmail.com: Unable to run tests when
using firefox custom profile and selenium 2.0b3
http://code.google.com/p/selenium/issues/detail?id=1490

My workaround to run custom firefox profile in Windows 7 is to run the old
selenium rc (selenium-server.jar) instead of this new selenium rc
(selenium-server-standalone-2.0b3.jar)

sele...@googlecode.com

未读,
2011年6月16日 09:25:302011/6/16
收件人 selenium-deve...@googlegroups.com

Comment #3 on issue 1490 by rajat.ch...@plavaga.in: Unable to run tests
when using firefox custom profile and selenium 2.0b3
http://code.google.com/p/selenium/issues/detail?id=1490

after spending a couple of hours/day at google to get around this problem i
havent arrived at any solution , i am pasting a stack trace to make things
clear to all. This is simply horrible . :(

java.lang.RuntimeException: Could not start Selenium session: You may not
start more than one session at a time
at com.thoughtworks.selenium.DefaultSelenium.start(DefaultSelenium.java:90)
at
com.bni.connect.operations.chapter.TestAddVisitor.setUp(TestAddVisitor.java:20)
at junit.framework.TestCase.runBare(TestCase.java:132)
at
com.thoughtworks.selenium.SeleneseTestCase.runBare(SeleneseTestCase.java:228)
at junit.framework.TestResult$1.protect(TestResult.java:110)
at junit.framework.TestResult.runProtected(TestResult.java:128)
at junit.framework.TestResult.run(TestResult.java:113)
at junit.framework.TestCase.run(TestCase.java:124)
at junit.framework.TestSuite.runTest(TestSuite.java:232)
at junit.framework.TestSuite.run(TestSuite.java:227)
at
org.junit.internal.runners.JUnit38ClassRunner.run(JUnit38ClassRunner.java:83)
at
org.eclipse.jdt.internal.junit4.runner.JUnit4TestReference.run(JUnit4TestReference.java:49)
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)
Caused by: com.thoughtworks.selenium.SeleniumException: You may not start
more than one session at a time
at
org.openqa.selenium.WebDriverCommandProcessor.start(WebDriverCommandProcessor.java:217)
at
org.openqa.selenium.WebDriverCommandProcessor.start(WebDriverCommandProcessor.java:208)
at com.thoughtworks.selenium.DefaultSelenium.start(DefaultSelenium.java:82)
... 16 more


回复全部
回复作者
转发
0 个新帖子