我正在尝试请求页面并检查它但我得到了:
** (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
我的代码:
Hound.start_session
Hound.Helpers.navigate_to("http://example.com")
Hound.end_session
它出了什么问题?
答案 0 :(得分:-1)
在defmodule
的正下方,您需要添加行use Hound.Helpers
。
然后您的代码应如下所示:
Hound.start_session
navigate_to('www.website.com')
Hound.end_session