santoshbt

santoshbt

Issue with wallaby while running tests

Hi All,

I have recently upgraded to the following versions

Erlang/OTP 23 [erts-11.2.2] [source] [64-bit] [smp:2:2] [ds:2:2:10] [async-threads:1] [hipe]
Elixir 1.13.4 (compiled with Erlang/OTP 23)

I have configured wallaby like this
in test.exs

config :wallaby,
  max_wait_time:
    if(ms = System.get_env("WALLABY_MAX_WAIT_TIME"), do: String.to_integer(ms), else: 5000),
  screenshot_on_failure: false,
  driver: Wallaby.Experimental.Chrome,
  chrome: [headless: true]

in test_helpers.exs

Application.put_env(:wallaby, :base_url, MyFutureNowWeb.Endpoint.url())
{:ok, _} = Application.ensure_all_started(:wallaby)

I am getting the issue with Wallaby whenever I try to run mix test.

Generated my_app app
** (MatchError) no match of right hand side value: {:error, {:wallaby, {:bad_return, {{Wallaby, :start, [:normal, []]}, {:EXIT, {:undef, [{Wallaby.Experimental.Chrome, :validate, [], []}, {Wallaby, :start, 2, [file: 'lib/wallaby.ex', line: 31]}, {:application_master, :start_it_old, 4, [file: 'application_master.erl', line: 277]}]}}}}}}
    test/test_helper.exs:6: (file)
    (elixir 1.13.4) lib/code.ex:1183: Code.require_file/2
    (elixir 1.13.4) lib/enum.ex:937: Enum."-each/2-lists^foreach/1-0-"/2

It is unable to identify Wallaby.Experimental.Chrome.
It was running perfect in older version of elixir.

If I replace it with Wallaby.Chrome, it throws error to mention chromedriver path explicitly.
I want to understand if there is any solution with the first option, i.e Wallaby.Experimental.Chrome.

Please help.
TIA

Marked As Solved

al2o3cr

al2o3cr

(note: I added ``` to your post to format the code better)

Wallaby.Experimental.Chrome was renamed in Wallaby 0.25:

0.25.0 (2020-05-27)
Deprecations
Deprecated Wallaby.Phantom, please switch to Wallaby.Chrome or Wallaby.Selenium

Breaking
Wallaby.Experimental.Chrome renamed to Wallaby.Chrome.
Wallaby.Experimental.Selenium renamed to Wallaby.Selenium.
Wallaby.Chrome is now the default driver.

Also Liked

mhanberg

mhanberg

Creator of elixir-tools

Please also see the changelog for 0.24. There was a change to how you configure the Wallaby.Chrome driver

Where Next?

Popular in Questions Top

Brian
What is the proper way to load a module from a file in to IEX? In the python world, doing something like this pretty standard: from ....
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
aalberti333
As the title describes, I’m trying to run Enum.map() over a list of key/value pairs, where the value is a map. My data looks like this: ...
New
pgiesin
This should be a simple problem but I just can’t seem to figure it out. I have a standalone Elixir app that won’t find the database. Dep...
New
New
quazar
How to set Jason to encode all fields in ecto schema, I don’t care about security and implementing only is taking long list of attributes...
New
alice
Hey, Just curious what are the main benefits of Elixir compared to Clojure? When is Elixir more useful than Clojure and vice versa? Th...
New
fayddelight
I tried installing elixir 1.11.2 erlang 23.3.4 via asdf in my zsh shell. Enabled the versions locally and globally. When I list them ...
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
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

Other popular topics Top

openscript
Hello! Sorry for this astonishing simple question, but I’m really stuck. I try to set up the intellij-elixir plugin, but I don’t know ho...
New
quazar
How to set Jason to encode all fields in ecto schema, I don’t care about security and implementing only is taking long list of attributes...
New
hariharasudhan94
I would like to know what is the best IDE for elixir development?
New
vac
Hi, I'm quite new in Elixir and I'm trying to format a string to a PEM format. I have the certificate value like MIIDBTCCAe2...... and ...
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
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
msaraiva
Surface is an experimental library built on top of Phoenix LiveView and its new LiveComponent API that aims to provide a more declarative...
564 42633 214
New
AstonJ
We’ve put together this wiki for Phoenix LiveView - please feel free to add any info you feel is worth including. What is Phoenix LiveV...
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
joeerl
Hello again - after a longish gap I’ve decided I really must dig into Elixir and see what’s been happening here - so I have a few questio...
New

We're in Beta

About us Mission Statement