You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When web driver closes a connection (because of a crash or something similar), Hound might return {:error, :closed} literally from every helper function.
It's pretty dangerous since it's pretty unexpected, and it can feed wrong data further into an application.
One example is that Hound.Session.active_sessions() |> Enum.count crashes with (Protocol.UndefinedError) protocol Enumerable not implemented for {:error, :closed}, as in #225
Another example was that it silently returned {:error, :closed} from find_element(:css, "img#iImage") |> attribute_value("src"), causing the other part of system fail, because it expected a string.
It's better to raise exception in such cases, since it's unexpected case, and unexpected output from functions
The text was updated successfully, but these errors were encountered:
When web driver closes a connection (because of a crash or something similar), Hound might return
{:error, :closed}
literally from every helper function.It's pretty dangerous since it's pretty unexpected, and it can feed wrong data further into an application.
One example is that
Hound.Session.active_sessions() |> Enum.count
crashes with(Protocol.UndefinedError) protocol Enumerable not implemented for {:error, :closed}
, as in #225Another example was that it silently returned
{:error, :closed}
fromfind_element(:css, "img#iImage") |> attribute_value("src")
, causing the other part of system fail, because it expected a string.It's better to raise exception in such cases, since it's unexpected case, and unexpected output from functions
The text was updated successfully, but these errors were encountered: