Unable to load a page using Hound in Elixir

195 Views Asked by At

I'm trying to request a page and inspect it but I get:

** (exit) exited in: GenServer.call(Hound.SessionServer, {:change_session0.100.0>, :default, []}, 60000)
** (EXIT) an exception was raised:
 ** (MatchError) no match of right hand side value: {:error, :econnrefused}

            (hound) lib/hound/session_server.ex:78: Hound.SessionServer.hall/3

My code:

Hound.start_session
Hound.Helpers.navigate_to("http://example.com")
Hound.end_session

What's wrong with it?

1

There are 1 best solutions below

0
On

Right below your defmodule you will want to include the line use Hound.Helpers.

Then your code should look something like this:

Hound.start_session

navigate_to('www.website.com')

Hound.end_session