hound
hound copied to clipboard
fill_field produces: protocol String.Chars not implemented for %Hound.Element{uuid: ":wdc:1487841743209"}
Hi there,
We do a find_element(:css, "some css selector", 20) |> fill_field("some text")
The fill_field produces the error: ** (Protocol.UndefinedError) protocol String.Chars not implemented for %Hound.Element{uuid: ":wdc:1487841743209"} stacktrace: (elixir) lib/string/chars.ex:3: String.Chars.impl_for!/1 (elixir) lib/string/chars.ex:17: String.Chars.to_string/1 (hound) lib/hound/helpers/element.ex:106: Hound.Helpers.Element.clear_field/1 (hound) lib/hound/helpers/element.ex:69: Hound.Helpers.Element.fill_field/2
We are working on hound master. Any idears are highly appreciated.
BR
Ah, it happens with both phantom_js and chromedriver. Stepping back to 1.0.3 solves the problem for the moment.
Hi, could you give me a website where I can reproduce this please? I just tried a few examples but could not reproduce. For example, with selenium + geckodriver:
use Hound.Helpers
Hound.start_session
navigate_to "https://github.com"
find_element(:css, ~s([name="user[login]"])) |> fill_field("[email protected]")
Hi, sorry the website is not public available. Even with the 1.0.3 the problem came back to me. So it is not version related. Deleting all the files in _build folder solved the issue for me again. So I am not sure if that is a hound problem or something with my env. If am the only one having the issue we can close the issue. Deleting the binaries is a workaround.
That's very weird. Please let us know if you discover something. Thanks for reporting!
We have an Umbrella Project, maybe it is related. Thx for taking care...
We're experiencing the same problem regularly, but didn't find a pattern when yet.
It's also happening in the context of an umbrella project. Unfortunately it's also not public.
I'm deleting the file _build/test/consolidated/Elixir.String.Chars.beam
anytime this error arises, which solves the problem for some time.
I believe this happened to me when I moved my gettext
dependency from my child app to my top-level umbrella app. Never saw the error until I did that.
The module only appears to be used for Error reporting within my app, but after I moved the dependency, I consistently got the OP's error message until I deleted the compiled beam file Elixir.String.Chars.beam
as suggested above.
We have the same issue and also an Umbrella Project.
Confirming this is still an issue in umbrella projects and that @marcelotto's solution works as a temporary solution.
Same as above; private umbrella app. Running mix clean
solved the issue for me.