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

Textfield value should be -keyword fails, doesn't find the element #27

Closed
wants to merge 1 commit into from

Conversation

laurilarjo
Copy link

"Textfield Value Should Be" -keyword did not find the textfield, but just failed with:

FAIL Value of text field 'edit-mail' should have been 'acceptance-user@example.com' but was 'None'

This small change fixes the issue, but is probably not the optimal solution.

…nd the textfield, but just failed with:

FAIL Value of text field 'edit-mail' should have been 'acceptance-user@example.com' but was 'None'
@emanlove
Copy link
Member

Lauri, although your test passed with this change I am not sure this change is a good one or even valid. The tag parameter which you changed is passed along to the find method within the ElementFinder class. And the find method in turn passes this value to ElementFinder._get_tag_and_constraints(). This method then compares the "tag" value to several constants of which 'input' is not one of the valid choices but 'text area' is. I suspect that when you changed this value to 'input' the locator relaxed it's constraints and thus "found" the element you were looking for. Probably the parameter name "tag" is a mislabeled and the _get_tag_and_constraints method should error if the "tag" is not one listed in the elif structure but as far as I can tell this change is incorrect.

Do you see this differently?

@j1z0
Copy link
Contributor

j1z0 commented Jan 17, 2012

Lauri,

You probably want the function element_text_should_be.

@j1z0 j1z0 closed this Jan 17, 2012
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.

4 participants