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

Fix ElementList.__getattr__() to no longer hide ElementNotFound #707

Merged
merged 1 commit into from
Jul 29, 2019

Conversation

vdboor
Copy link
Contributor

@vdboor vdboor commented Jul 29, 2019

When elements aren't found on the page, calling methods like ElementList.click() didn't raise this error. Instead it would report "AttributeError: 'ElementList' object has no attribute 'click'" which confuses users to look at other places than the actual error.

When elements aren't found on the page, calling methods like
ElementList.click() don't raise ElementNotFound. Instead it would report
"AttributeError: 'ElementList' object has no attribute 'click'"

The current behavior is confusing because it reports the wrong error.
Users start looking why there is an AttributeError instead of noticing
that the ElementNotFound exception was the actual cause.
@andrewsmedina andrewsmedina merged commit bc55c13 into cobrateam:master Jul 29, 2019
@andrewsmedina
Copy link
Member

@vdboor thanks for contribute.

@vdboor vdboor deleted the patch-1 branch August 6, 2019 12:02
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

Successfully merging this pull request may close these issues.

2 participants