8000 Cannot read current value from a textarea · Issue #174 · geb/issues · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
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 read current value from a textarea #174

Closed
geb-bot opened this issue Mar 5, 2012 · 1 comment
Closed

Cannot read current value from a textarea #174

geb-bot opened this issue Mar 5, 2012 · 1 comment
Assignees
Labels
Milestone

Comments

@geb-bot
Copy link
geb-bot commented Mar 5, 2012

Originally created by Eric Sword.

I hit the problem talked about in this thread - http://markmail.org/thread/h7assdeska6cc7ml - and I think the conclusion that it is caused by a WebDriver bug is wrong. According to the selenium documentation for WebElement:

java.lang.String getAttribute(java.lang.String name)

Get the value of a the given attribute of the element. Will return the current value, even if this has been modified after the page has been loaded. More exactly, this method will return the value of the given attribute, ====>>> unless that attribute is not present, in which case the value of the property with the same name is returned <<<====

The confusion was highlighted by this selenium bug that was filed against the documentation:

http://code.google.com/p/selenium/issues/detail?id=2443

I think the proper thing to do is to update NonEmptyNavigator.getValue to be:

private getValue(WebElement input) {
    if (input == null) {
        return null
    }

    input.getAttribute('value')
}

I just tried calling nav.firstElement().getAttribute('value') for a textarea object and it worked as documented.

@geb-bot
Copy link
Author
geb-bot commented Apr 1, 2013

Resolved

@geb-bot geb-bot added the Bug label Apr 12, 2015
@geb-bot geb-bot added this to the 0.9.0 milestone Apr 12, 2015
@geb-bot geb-bot closed this as completed Apr 12, 2015
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

2 participants
0