elixir-wallaby / wallaby

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

Wallaby doesn't find html elements anymore #719

Open alexandreguz opened 1 year ago

alexandreguz commented 1 year ago

Elixir and Erlang/OTP versions

Erlang/OTP 24 [erts-12.3.2.3] [source] [64-bit] [smp:12:12] [ds:12:12:10] [async-threads:1] [jit]

Elixir 1.14.2 (compiled with Erlang/OTP 23)

Operating system

MacOS

Browser

Chrome

Driver

ChromeDriver

Correct Configuration

Current behavior

Before I upgraded my elixir to 1.14 ( I was using 1.9) and Wallaby to 0.30 ( was using 0.28) if I used an element as a query worked perfectly, but not anymore. Example:

assert_has(parent, css("span", text: "Some Text"))

I could use just 'span' but now it's possible CSS options - IDs, classes etc.

The message error isn't that 'expected to find etc' but the test fails because timeout

Is this a bug?

Expected behavior

find the element 'span' with specific text

Test Code & HTML

assert_has(parent, css("span", text: "Some Text")) doesn't find the span

<span class="mx-1 fs-10">CAMPOS APROVADOS</span>

Demonstration Project

No response

mhanberg commented 1 year ago

Can you confirm that your Chrome and Chromedriver versions are both the same and the latest?

alexandreguz commented 1 year ago

Clear and loud, captain

image

alejandrodevs commented 1 year ago

I can confirm this issue. It is happening in version 112.0.5615.49. It does not work using only the tag but if I add the tag and a class like css("span.mx-1", text: "Some Text") it works correctly.

mhanberg commented 1 year ago

if either of you can provide a repo or a script that uses Mix.install that can reproduce the issue, I would very much appreciate it and it will go a long ways towards finding a fix. @alejandrodevs @alexandreguz