Hello everyone,
I'm currently having some trouble with the return Win32OLE from the
elements_by_xpath function.
Scenario: Website with 4 TOTALLY identical text boxes.
Task: Enter hello into 3rd and 4th.
puts browser.text_field(:name, "TF_1").class
-> outputs Watir::TextField
my_lis = []
my_lis = browser.elements_by_xpath("//p[@class='qbody']/
input[@name='TF_1']")
puts my_lis[0].value
-> outputs "my default"
@@@ ALTHOUGH @@@
puts browser.text_field(:name, "TF_1").class
-> outputs WIN32OLE
As such when I try to set the value like so
my_lis[0].set("new text string")
-> Output `method_missing': unknown property or method:
`set' (NoMethodError)
HRESULT error code:0x80020006
Unknown name.
Any help would be greatly appreciated,
- Matt
--
Before posting, please read http://watir.com/support. In short: search before
you ask, be nice.
[email protected]
http://groups.google.com/group/watir-general
[email protected]