Can't access head elements like meta
#660
Unanswered
raphaklaus
asked this question in
Q&A
Replies: 1 comment
-
|
Hi, By default, selectors only return visible elements. This ensures that your test is operating the page as a human user would. If you need to find elements that are not visible, you can add head = session
|> visit("https://google.com")
|> find(Query.css("meta", visible: false, count: :all))In the above example, I also used the option |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Hello! I am trying to select some head elements like
metabut receive this message:** (Wallaby.QueryError) Expected to find 1, visible element that matched the css 'meta' but 0, visible elements were found.Code that I used:
If I ask the
sessionto do atake_snapshotorpage_sourceI can see the page rendered and the meta tag in the source, but can't achieve the querying when it's insideheadelements. Selecting body elements works nicely though.Using version
0.29.1Beta Was this translation helpful? Give feedback.
All reactions