简体   繁体   中英

Unable to load a page using Hound in Elixir

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?

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

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM