Chrichton

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

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.

Where Next?

Popular in Questions Top

shahryarjb
Hello, I get Persian date from my client and convert it to normal calendar like this: def jalali_string_to_miladi_english_number(persi...
New
Werner
Hi, I’m using Ubuntu 18.04 and after updating to OTP-24.0 yesterday i have this warning when I run “mix local.hex”: 14:57:30.512 [warn] ...
New
qwerescape
Is there a way to get the call stack or stack trace at any point in the code? Not from exceptions, but an expression that returns how the...
New
Fl4m3Ph03n1x
Background Let’s assume I have a typical GenServer that receives messages as requests, does some operation in a DB and returns responses....
New
gonzofish
I’m currently trying to understand how to join three tables using Ecto. All the examples I’ve seen use 2, so maybe I’m just missing somet...
New
shahryarjb
Hello, I have map which I want to convert it to string like this: the map: %{last_name: "tavakkoli", name: "shahryar"} the string I ne...
New
wernerlaude
In AR this is so simple @articles = current_user.articles How to do in Ecto? def index(conn, _params) do current_user = conn.assig...
New
jc00ke
Expanding on this topic: https://forum.elixirforum.net/t/map-typespec-question/19217 Let’s say I have a map with required and optional k...
New
siddhant3030
Hi, I have to write a raw query for one of my project. But till now I have used ecto queries and don’t have much experience writing raw ...
New
jay1
Why is it that the mnesia database isn’t the most preferred database for use in Elixir/Phoenix?
New

Other popular topics Top

Qqwy
Update: How to use the Blogs & Podcasts section You can post links to your blog posts or podcasts either in one of the Official Blog...
3268 119930 1237
New
JDanielMartinez
Hi! May someone helps me, please! I have two apps into an umbrella project: the first one is Database, which manages queries, and the se...
New
sergio
In Ruby, I can go: User.find_by(email: "foobar@email.com").update(email: "hello@email.com") How can I do something similar in Elixir? ...
New
lessless
I believe there are people here who are dealing with CSV files import on the daily basis, and since Excel is a really popular tool there ...
New
bsollish-terakeet
Credo is smart enough to check for (something like) this: assert length(the_list) == 0 with this response: Checking if an enum is empt...
New
albydarned
Hello all! I am typing this post from my new MacBook Pro with the M1 chip. I’m loving it so far, and will probably use it as my daily dr...
New
malloryerik
Hi, this is for people who, like me, have had some friction using .html.heex templates in VSCode. The solution seems to be, in a hyphena...
New
Harrisonl
We have an ECS cluster with 4 services, where each task joins a single cluster, via discovery ECS discovery service. Currently when I de...
New
polypush135
As many of you may have realized by now (sorry for all the posts here) I’ve been working on a db problem where I’m trying to aggregate a ...
New
shahryarjb
Hello, I have map which I want to convert it to string like this: the map: %{last_name: "tavakkoli", name: "shahryar"} the string I ne...
New

We're in Beta

About us Mission Statement