The XPath query in your example looks wrong: it should be `@value`, not just
`value`.
Assuming that's just a typo, the Firefox XPath engine probably checks the
*content attribute* (often called just "attribute", equivalent to
`$x("//textarea")[0].getAttribute("value")`), but the actual text of the
textarea is in the *IDL attribute* (often called "property", equivalent to
`$x("//textarea")[0].value`). WebDriver's `getAttribute` falls back to the
property if the attribute isn't set.
PS. You don't need the `instance_variable_get` hacks, just call
`e.attribute(:value)`.
---
Reply to this email directly or view it on GitHub:
https://github.com/watir/watir-webdriver/issues/163#issuecomment-12368264
_______________________________________________
Wtr-development mailing list
[email protected]
http://rubyforge.org/mailman/listinfo/wtr-development