-
|
Hi! How to find multiple elements in the page? I have tried this: session
|> visit("/")
|> find(Query.data("test", "title", count: 1, text: "Foo"))
|> find(Query.data("test", "subTitle", count: 1))But it fails because the first What else can I do? Thanks! |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 1 reply
-
|
I found an alternative: |> find(Query.data("test", "title", count: 1, text: "Foo"), fn el -> el end) |
Beta Was this translation helpful? Give feedback.
-
|
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 |
Beta Was this translation helpful? Give feedback.
It sounds like you may want to assert the existence of an element on the page. To do that you can write
You would use
find/2orfind/3when you want to retrieve an element to use it to scope further queries or to make assertions on that element.