elixir-wallaby / wallaby

Concurrent browser tests for your Elixir web apps.
https://twitter.com/elixir_wallaby
MIT License
1.68k stars 198 forks source link

Wallaby test issue #745

Closed santoshturamari closed 1 year ago

santoshturamari commented 1 year ago

Elixir and Erlang/OTP versions

Erlang/OTP 22 [erts-10.6.4] [source] [64-bit] [smp:2:2] [ds:2:2:10] [async-threads:1] [hipe]

Elixir 1.10.0 (compiled with Erlang/OTP 22)

Operating system

Debian

Browser

Chrome

Driver

chromedriver 114

Correct Configuration

Current behavior

I am using {:wallaby, "~> 0.23", only: [:test]} 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: System.get_env("WALLABY_DISABLE_HEADLESS_CHROME") != "true"]

The ExUnit tests are failing with the following error

%Wallaby.Session{driver: Wallaby.Experimental.Chrome, id: "123213asdasd213", screenshots: [], server: Wallaby.Experimental.Chrome.Chromedriver, session_url:

defp cast_as_element(parent, -%{"ELEMENT" => id}-) defp cast_as_element(parent, -%{"element-213123-11e4-eqwe1235466c213cf" => id}-)

Expected behavior

The ExUnit test must pass

Test Code & HTML

test "admin log in is required", %{session: session, conn: conn} do session |> visit(Routes.admin_user_path(conn, :index)) |> assert_has_flash(text: "You must log in", level: :warning) |> assert_has_current_path(Routes.admin_auth_path(conn, :log_in)) end

Demonstration Project

No response

mhanberg commented 1 year ago

Your elixir version and OTP version are far too old, and I think your wallaby version has to be several years old.

I can't really provide support for code that is so far out of date of the current release.