[英]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
. 在
defmodule
下方,您将要包含use Hound.Helpers
的行。
Then your code should look something like this: 然后,您的代码应如下所示:
Hound.start_session
navigate_to('www.website.com')
Hound.end_session
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.