HashNuke / hound

Elixir library for writing integration tests and browser automation

Home Page:http://hexdocs.pm/hound

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Unable to create new service: GeckoDriverService

tchoutri opened this issue · comments

Hi @HashNuke! I'm using Hound with these settings:

config :hound,
  port: 4444,
  driver: "selenium",
  browser: "firefox"

However, I've got this error when I call Hound.start_session/0:

11:57:22.121 [error] GenServer Hound.SessionServer terminating
** (RuntimeError) Unable to create new service: GeckoDriverService
Build info: version: '3.13.0', revision: '2f0d292', time: '2018-06-25T15:32:19.891Z'
System info: host: 'moira.daemons', ip: '192.168.10.153', os.name: 'Linux', os.arch: 'amd64', os.version: '4.16.13-200.fc27.x86_64', java.version: '1.8.0_171'
Driver info: driver.version: unknown
    (hound) lib/hound/request_utils.ex:57: Hound.RequestUtils.handle_response/3
    (hound) lib/hound/session_server.ex:99: Hound.SessionServer.create_session/2
    (hound) lib/hound/session_server.ex:78: Hound.SessionServer.handle_call/3
    (stdlib) gen_server.erl:636: :gen_server.try_handle_call/4
    (stdlib) gen_server.erl:665: :gen_server.handle_msg/6
    (stdlib) proc_lib.erl:247: :proc_lib.init_p_do_apply/3
Last message (from #PID<0.227.0>): {:change_session, #PID<0.227.0>, :default, []}
State: %{}
Client #PID<0.227.0> is alive
    (stdlib) gen.erl:169: :gen.do_call/4
    (elixir) lib/gen_server.ex:831: GenServer.call/3
    (stdlib) erl_eval.erl:670: :erl_eval.do_apply/6
    (elixir) src/elixir.erl:233: :elixir.eval_forms/4
    (iex) lib/iex/evaluator.ex:250: IEx.Evaluator.handle_eval/5
    (iex) lib/iex/evaluator.ex:230: IEx.Evaluator.do_eval/3
    (iex) lib/iex/evaluator.ex:208: IEx.Evaluator.eval/3
    (iex) lib/iex/evaluator.ex:94: IEx.Evaluator.loop/1

I have installed Firefox 60.0.1 and Selenium version 3.13.0.
Here is the Selenium log:

11:51:38.060 INFO [GridLauncherV3.launch] - Selenium build info: version: '3.13.0', revision: '2f0d292'
11:51:38.061 INFO [GridLauncherV3$1.launch] - Launching a standalone Selenium Server on port 4444
2018-06-28 11:51:38.120:INFO::main: Logging initialized @236ms to org.seleniumhq.jetty9.util.log.StdErrLog
11:51:38.239 INFO [SeleniumServer.boot] - Selenium Server is up and running on port 4444
11:54:39.160 INFO [ActiveSessionFactory.apply] - Capabilities are: {
  "browserName": "firefox",
  "cssSelectorsEnabled": true,
  "firefox_profile": "UEsDBBQAAAAIAMZe3Ew5CGBGcAAAAHQAAAAHAAAAdXNlci5qcystTi2KLyhKTdNQSk\u002fNSy1KzNErBQolAjklevllqUVFmSmpSjoKSr75VZk5OYn6pnoGChrhmXkp+eXFCn4hCmZ6htYK4f7hZibWCkVlViYGegaaCu6pydn5+kYGhgZAZKjglgm0IL9CHyhpqKRpDQBQSwECFAAUAAAACADGXtxMOQhgRnAAAAB0AAAABwAAAAAAAAAAAAAAAAAAAAAAdXNlci5qc1BLBQYAAAAAAQABADUAAACVAAAAAAA=",
  "javascriptEnabled": false,
  "nativeEvents": false,
  "rotatable": false,
  "takesScreenshot": true,
  "version": ""
}
11:54:39.161 INFO [ActiveSessionFactory.lambda$apply$11] - Matched factory org.openqa.selenium.remote.server.ServicedSession$Factory (provider: org.openqa.selenium.firefox.GeckoDriverService)

Am I missing something obvious?

Okay, the obvious thing was to install GeckoDriver first. Once it's in the PATH everything works.