Skip to content
Discussion options

You must be logged in to vote

It sounds like you may want to assert the existence of an element on the page. To do that you can write

session
|> visit("/")
|> assert_has(Query.data("test", "title", count: 1, text: "Foo"))
|> assert_has(Query.data("test", "subTitle", count: 1))

You would use find/2 or find/3 when you want to retrieve an element to use it to scope further queries or to make assertions on that element.

Replies: 2 comments 1 reply

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
1 reply
@montogeek
Comment options

Answer selected by montogeek
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants