anticoders / gagarin

Another testing framework for your meteor apps.
gagarin.meteor.com
MIT License
150 stars 21 forks source link

Improve docs on using selenium with FF #101

Closed looshi closed 9 years ago

looshi commented 9 years ago

I did have this setup working a couple of weeks ago, but no longer works.

mac os 10.9.5 firefox 33.0.1 selenium-server-standalone-2.43.0

steps to replicate :

  1. start the hub sudo java -jar selenium-server-standalone-2.43.0.jar -role hub
  2. start the node sudo java -jar selenium-server-standalone-2.43.0.jar -role node -hub http://localhost:4444
  3. run the Gagarin test suite sudo ./test.js --webdriver http://localhost:4444

expected results : firefox driver launches and the client tests execute

actual results : firefox driver does not launch and client tests all fail with the following error Error: [init({})] The environment you requested was unavailable.

the hub shows this exception :

$ sudo java -jar selenium-server-standalone-2.43.0.jar -role hub
15:52:40.279 INFO - Launching a selenium grid server
2015-02-25 15:52:40.941:INFO:osjs.Server:jetty-7.x.y-SNAPSHOT
2015-02-25 15:52:40.975:INFO:osjsh.ContextHandler:started o.s.j.s.ServletContextHandler{/,null}
2015-02-25 15:52:40.984:INFO:osjs.AbstractConnector:Started SocketConnector@0.0.0.0:4444
2015-02-25 15:58:56.939:WARN:osjs.ServletHandler:/grid/register
java.security.InvalidParameterException
    at org.openqa.grid.common.RegistrationRequest.parseGrid1Request(RegistrationRequest.java:320)
    at org.openqa.grid.common.RegistrationRequest.getNewInstance(RegistrationRequest.java:291)
    at org.openqa.grid.web.servlet.RegistrationServlet.process(RegistrationServlet.java:75)
    at org.openqa.grid.web.servlet.RegistrationServlet.doGet(RegistrationServlet.java:54)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:707)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:820)
    at org.seleniumhq.jetty7.servlet.ServletHolder.handle(ServletHolder.java:565)
    at org.seleniumhq.jetty7.servlet.ServletHandler.doHandle(ServletHandler.java:479)
    at org.seleniumhq.jetty7.server.session.SessionHandler.doHandle(SessionHandler.java:225)
    at org.seleniumhq.jetty7.server.handler.ContextHandler.doHandle(ContextHandler.java:1031)
    at org.seleniumhq.jetty7.servlet.ServletHandler.doScope(ServletHandler.java:406)
    at org.seleniumhq.jetty7.server.session.SessionHandler.doScope(SessionHandler.java:186)
    at org.seleniumhq.jetty7.server.handler.ContextHandler.doScope(ContextHandler.java:965)
    at org.seleniumhq.jetty7.server.handler.ScopedHandler.handle(ScopedHandler.java:117)
    at org.seleniumhq.jetty7.server.handler.HandlerWrapper.handle(HandlerWrapper.java:111)
    at org.seleniumhq.jetty7.server.Server.handle(Server.java:349)
    at org.seleniumhq.jetty7.server.AbstractHttpConnection.handleRequest(AbstractHttpConnection.java:452)
    at org.seleniumhq.jetty7.server.BlockingHttpConnection.handleRequest(BlockingHttpConnection.java:47)
    at org.seleniumhq.jetty7.server.AbstractHttpConnection.headerComplete(AbstractHttpConnection.java:884)
    at org.seleniumhq.jetty7.server.AbstractHttpConnection$RequestHandler.headerComplete(AbstractHttpConnection.java:938)
    at org.seleniumhq.jetty7.http.HttpParser.parseNext(HttpParser.java:634)
    at org.seleniumhq.jetty7.http.HttpParser.parseAvailable(HttpParser.java:230)
    at org.seleniumhq.jetty7.server.BlockingHttpConnection.handle(BlockingHttpConnection.java:66)
    at org.seleniumhq.jetty7.server.bio.SocketConnector$ConnectorEndPoint.run(SocketConnector.java:254)
    at org.seleniumhq.jetty7.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:599)
    at org.seleniumhq.jetty7.util.thread.QueuedThreadPool$3.run(QueuedThreadPool.java:534)
    at java.lang.Thread.run(Thread.java:695)
apendua commented 9 years ago

Can you try using http://localhost:4444/wd/hub as the --webdriver parameter for Gagarin?

apendua commented 9 years ago

@looshi I was expecting the same problems - except the error messages - when I forgot to use /wd/hub suffix. BTW, I've just realized that if you don't try start your selenium instance with -role hub option you can get away with using the second selenium process.

looshi commented 9 years ago

@apendua forgot to mention I was also using -V verbose mode, so got the error in the Gagarin console output. maybe that's the discrepancy in our experience. I will give your suggestion a try tomorrow. thanks!

apendua commented 9 years ago

@looshi I double checked and it seems that everything works fine when using the /wd/hub suffix. Except that it's pretty important to have an adequate selenium version, e.g. for FF 36, selenium 2.45 is required. Anyway, the problem you've described shows that we still need better documentation on this one.