Chrichton
Wallaby visit("/") produces empty screenshot
Hi all.
I am brand-new on wallaby.
It looked very nice to me, so I added it to my Phoenix-application, which uses Ecto.
I am using the chrome-driver.
I was able to create a feature test, which seems to start correctly. I see the chrome-icon inside my dock blink shortly.
The test without assertion passed.
But when I tried to find a css element, it told me, there was none visible.
** (Wallaby.QueryError) Expected to find 1, visible element that matched the css 'h1' but 0, visible elements were found.
code: |> find(Query.css("h1", text: "Welcome"))
stacktrace:
(wallaby 0.29.1) lib/wallaby/browser.ex:956: Wallaby.Browser.find/2
test/anamnesis_content_viewer/integration/index_page_test.exs:15: (test)
I used the take_snapshot function.
It showed a white, empty image.
I changed to a different route via visit().
But all routes returned the same empty snapshot image.
How can I find out, what’s going wrong.
I think, maybe I missed something when adding wallaby to my project.
Or could it be?: My Phoenix-App is running on port 4000. Do I have to specify the port somewhere?
here is my test
feature("foo", %{session: session}) do
session
|> visit("/")
|> take_screenshot()
|> find(Query.css("h1", text: "Welcome"))
end
@mhanberg : do you have an idea?
Thanks for your answer, HeIko
Marked As Solved
Chrichton
I found the error.
My base_url was “http://localhost:4000”.
But it has to be "http://localhost:4002.
After correcting it, everything worked perfectly.
Thanks to Mitchell Hanberg for his help.
Popular in Questions
Other popular topics
Categories:
Sub Categories:
Forums
Popular Tags
- #ecto
- #liveview
- #troubleshooting
- #learning-elixir
- #deployment
- #library
- #erlang
- #testing
- #genserver
- #mix
- #absinthe
- #remote-other
- #otp
- #plug
- #how-to-question
- #macros
- #postgres
- #channels
- #elixirconf
- #exunit
- #discussion
- #code-sync
- #javascript
- #podcasts
- #onsite
- #dialyzer
- #docker
- #authentication
- #umbrella
- #full-time-contract
- #podcasts-by-brainlid
- #ecto-query
- #elixir-ls
- #phoenix_html
- #iex
- #blog-post
- #graphql
- #genstage
- #ai
- #websockets
- #supervisor
- #advent-of-code
- #elixirconf-us
- #distillery
- #processes
- #forms
- #api
- #metaprogramming
- #security
- #performance








