Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cannot access error variant information from webdriver::ErrorStatus enum #185

Closed
stevepryde opened this issue Aug 25, 2022 · 1 comment
Closed

Comments

@stevepryde
Copy link
Contributor

It's pretty common when working with WebDriver to want to handle the specific errors returned, such as ElementNotInteractable etc.

I understand fantoccini wants to not expose the webdriver crate types etc but it would be good to provide an equivalent so that these specific error variants can be used in calling code.

There's a related issue where StaleElementReference is treated as NoSuchElement which is also not ideal, since they're not actually interchangeable and may warrant a different course of action depending on which error is returned.

If we don't want to expose the ErrorStatus enum, is it better to duplicate it and provide a From impl? Any better options?

@jonhoo
Copy link
Owner

jonhoo commented Sep 3, 2022

Unfortunately even a From impl would mean that updating webdriver would be a breaking change. I think it'd be okay for us to basically copy their error enumerations into this crate though, and then just mark those as #[non_exhaustive]!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants