Hound
Summary
end_session() | |
end_session(pid) | Ends a Hound session. If you have multiple sessions, all of those sessions are killed |
start_session() | Starts a Hound session |
Functions
Ends a Hound session. If you have multiple sessions, all of those sessions are killed.
For an example, take a look at the documentation for start_session
.
Starts a Hound session.
Use this in your test case’s setup block to start a Hound session for each test case.
defmodule HoundTest do
use ExUnit.Case
use Hound.Helpers
setup do
Hound.start_session
:ok
end
teardown do
:ok = Hound.end_session
end
test "the truth", meta do
navigate_to("http://example.com/guestbook.html")
find_element(:name, "message")
|> fill_field("Happy Birthday ~!")
|> submit_element()
assert page_title() == "Thank you"
end
end