You don't get back the specific object type from element_by_xpath, so
some methods don't work. But this works:

b =
b.goto ''
txt = b.element_by_xpath("//*...@name='q']")
txt.value = 'Richard Lawrence'
btn = b.element_by_xpath("//*...@name='btnG']")

So you might try the value property instead of the set method.


On Tue, Jan 13, 2009 at 9:46 AM, TCBlues <> wrote:
> Thanks for your answer.
> In the case the object is a textField or a listField I'm trying to set
> the control with:
> ie.element_by_xpath("//*...@name="imp1"]").set("testing")
> but an error comes up: 13:in `method_missing': unknown property or
> method `set' (WIN32OLERuntimeError)

You received this message because you are subscribed to the Google Groups 
"Watir General" group.
To post to this group, send email to
Before posting, please read the following guidelines:
To unsubscribe from this group, send email to
For more options, visit this group at

Reply via email to