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

b = Watir::IE.new
b.goto 'http://www.google.com/'
txt = b.element_by_xpath("//*...@name='q']")
txt.value = 'Richard Lawrence'
btn = b.element_by_xpath("//*...@name='btnG']")
btn.click

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

Richard

On Tue, Jan 13, 2009 at 9:46 AM, TCBlues <tcbl...@gmail.com> 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 watir-general@googlegroups.com
Before posting, please read the following guidelines: 
http://wiki.openqa.org/display/WTR/Support
To unsubscribe from this group, send email to 
watir-general-unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/watir-general
-~----------~----~----~----~------~----~------~--~---

Reply via email to