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

Get Text succeeds and returns None if the element is not found instead of failing #115

Closed
ombre42 opened this issue Sep 19, 2012 · 2 comments
Labels

Comments

@ombre42
Copy link
Contributor

ombre42 commented Sep 19, 2012

Execute: ${text} Get Text id=doesNotExist

Expected: fails with error similar to other keywords such as
ValueError: Element 'id=doesNotExist' not found.
or
ValueError: Element locator 'id=doesNotExist' did not match any elements.

Actual: keyword succeeds and ${text} is assigned a value of None

This appears to be the same root cause as Issue #114 - _ElementKeywords._get_text() returns None if the element is not found instead of raising an exception

@emanlove
Copy link
Member

emanlove commented Oct 2, 2012

'Get Text' and 'Element Should Contain' now throws exception if element is not found. See #127.

@ombre42
Copy link
Contributor Author

ombre42 commented Nov 10, 2013

This was fixed in 1.1. The error as implemented looks like this:
ValueError: Element locator 'id=doesNotExist' did not match any elements.

@ombre42 ombre42 closed this as completed Nov 10, 2013
@aaltat aaltat added bug and removed Keywords labels Sep 19, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants