在OSX上启动Selenium-Server-Standalone缓慢启动

时间:2014-11-01 03:27:49

标签: java macos selenium selenium-server

Selenium-server-standalone启动时有5秒的延迟。如果我使用调试选项运行selenium,则表明延迟是由New random session seed引起的。

我使用java -jar selenium-server-standalone-2.44.0.jar启动Selenium服务器。

如果我想指定chromedriver,那么我写java -jar selenium-server-standalone-2.44.0.jar -Dwebdriver.chrome.driver=chromedriver_2.11

它发生在:

  • OSX 10.9.5和OSX 10.10
  • Java 1.7.0_51(更新67和更新71)
  • selenium-server-standalone 2.42.0,2.43.1,2.44
  • 有和没有chromedriver(2.9,2.10,2.11)
  • 以sudo和非主要用户身份运行

据我所知,在配置相同的其他机器上没有这样的延迟。

似乎5秒钟没什么,但我有另一个问题,很可能是同一个问题造成的。 It gives me 1 minute of waiting instead of few seconds

这是日志

11:22:50.445 INFO - Launching a standalone server
11:22:50.820 INFO - Java: Oracle Corporation 24.51-b03
11:22:50.820 INFO - OS: Mac OS X 10.10 x86_64
11:22:50.948 INFO - v2.44.0, with Core v2.44.0. Built from revision 76d78cf
11:22:50.948 INFO - Selenium server running in debug mode.
11:22:51.001 DEBUG - add component: SocketListener0@0.0.0.0:4444
11:22:51.022 DEBUG - add component: org.openqa.jetty.http.ResourceCache@50265e47
11:22:51.046 DEBUG - add component: org.openqa.selenium.server.ProxyHandler in HttpContext[/,/]
11:22:51.065 DEBUG - add component: HttpContext[/,/]
11:22:51.070 DEBUG - Added HttpContext[/,/] for host *
11:22:51.071 DEBUG - add component: org.openqa.jetty.http.ResourceCache@36264c17
11:22:51.073 DEBUG - added SC{BASIC,null,user,CONFIDENTIAL} at /org/openqa/selenium/tests/html/basicAuth/*
11:22:51.107 DEBUG - add component: org.openqa.jetty.http.handler.SecurityHandler in HttpContext[/selenium-server,/selenium-server]
11:22:51.111 DEBUG - add component: org.openqa.selenium.server.StaticContentHandler in HttpContext[/selenium-server,/selenium-server]
11:22:51.123 DEBUG - add component: org.openqa.selenium.server.SessionExtensionJsHandler in HttpContext[/selenium-server,/selenium-server]
11:22:51.125 DEBUG - add component: org.openqa.selenium.server.htmlrunner.SingleTestSuiteResourceHandler in HttpContext[/selenium-server,/selenium-server]
11:22:51.126 DEBUG - add component: org.openqa.selenium.server.htmlrunner.SeleniumHTMLRunnerResultsHandler@6d9d3901
11:22:51.132 DEBUG - add component: HttpContext[/selenium-server,/selenium-server]
11:22:51.132 DEBUG - Added HttpContext[/selenium-server,/selenium-server] for host *
11:22:51.242 INFO - Default driver org.openqa.selenium.ie.InternetExplorerDriver registration is skipped: registration capabilities Capabilities [{platform=WINDOWS, ensureCleanSession=true, browserName=internet explorer, version=}] does not match with current platform: MAC
11:22:51.446 DEBUG - add component: org.openqa.jetty.http.ResourceCache@61f3318a
11:22:51.483 DEBUG - add component: org.openqa.selenium.server.SeleniumDriverResourceHandler in HttpContext[/selenium-server,/selenium-server]
11:22:51.483 DEBUG - add component: HttpContext[/selenium-server/driver,/selenium-server/driver]
11:22:51.484 DEBUG - Added HttpContext[/selenium-server/driver,/selenium-server/driver] for host *
11:22:51.484 DEBUG - add component: org.openqa.jetty.http.ResourceCache@c3b626c
11:22:51.528 DEBUG - add component: WebDriver remote server
11:22:51.568 DEBUG - add component: org.openqa.jetty.jetty.servlet.HashSessionManager@5298d146
11:22:51.568 DEBUG - add component: org.openqa.jetty.jetty.servlet.ServletHandler@2ed37507
11:22:51.596 INFO - RemoteWebDriver instances should connect to: http://127.0.0.1:4444/wd/hub
11:22:51.596 DEBUG - add component: HttpContext[/wd,/wd]
11:22:51.597 DEBUG - Added HttpContext[/wd,/wd] for host *
11:22:51.597 DEBUG - Starting org.openqa.jetty.jetty.Server@a5bdce3
11:22:51.598 INFO - Version Jetty/5.1.x
11:22:51.598 DEBUG - LISTENERS: [SocketListener0@0.0.0.0:4444]
11:22:51.598 DEBUG - HANDLER: {null={/selenium-server/driver/*=[HttpContext[/selenium-server/driver,/selenium-server/driver]], /selenium-server/*=[HttpContext[/selenium-server,/selenium-server]], /=[HttpContext[/,/]], /wd/*=[HttpContext[/wd,/wd]]}}
11:22:51.599 DEBUG - Starting HttpContext[/selenium-server/driver,/selenium-server/driver]
11:22:51.612 DEBUG - Init classloader from null, sun.misc.Launcher$AppClassLoader@5eb1404f for HttpContext[/selenium-server/driver,/selenium-server/driver]
11:22:51.612 INFO - Started HttpContext[/selenium-server/driver,/selenium-server/driver]
11:22:51.612 DEBUG - Starting HttpContext[/selenium-server,/selenium-server]
11:22:51.612 DEBUG - Init classloader from null, sun.misc.Launcher$AppClassLoader@5eb1404f for HttpContext[/selenium-server,/selenium-server]
11:22:51.613 DEBUG - Started org.openqa.jetty.http.handler.SecurityHandler in HttpContext[/selenium-server,/selenium-server]
11:22:51.613 DEBUG - Started org.openqa.selenium.server.StaticContentHandler in HttpContext[/selenium-server,/selenium-server]
11:22:51.613 DEBUG - Started org.openqa.selenium.server.SessionExtensionJsHandler in HttpContext[/selenium-server,/selenium-server]
11:22:51.613 DEBUG - Started org.openqa.selenium.server.htmlrunner.SingleTestSuiteResourceHandler in HttpContext[/selenium-server,/selenium-server]
11:22:51.613 DEBUG - Started org.openqa.selenium.server.SeleniumDriverResourceHandler in HttpContext[/selenium-server,/selenium-server]
11:22:51.613 INFO - Started HttpContext[/selenium-server,/selenium-server]
11:22:51.614 DEBUG - Starting HttpContext[/,/]
11:22:51.614 DEBUG - Init classloader from null, sun.misc.Launcher$AppClassLoader@5eb1404f for HttpContext[/,/]
11:22:51.614 DEBUG - Started org.openqa.selenium.server.ProxyHandler in HttpContext[/,/]
11:22:51.614 INFO - Started HttpContext[/,/]
11:22:51.614 DEBUG - Starting HttpContext[/wd,/wd]
11:22:51.614 DEBUG - Init classloader from null, sun.misc.Launcher$AppClassLoader@5eb1404f for HttpContext[/wd,/wd]
11:22:51.614 DEBUG - Starting org.openqa.jetty.jetty.servlet.ServletHandler@2ed37507
11:22:51.614 DEBUG - New random session seed
11:22:56.882 DEBUG - Session scavenger period = 30s
11:22:56.890 DEBUG - Started holder of class org.openqa.selenium.remote.server.DriverServlet
11:22:56.891 INFO - Started org.openqa.jetty.jetty.servlet.ServletHandler@2ed37507
11:22:56.891 INFO - Started HttpContext[/wd,/wd]
11:22:56.928 INFO - Started SocketListener on 0.0.0.0:4444
11:22:56.928 INFO - Started org.openqa.jetty.jetty.Server@a5bdce3

0 个答案:

没有答案