But there's no way for Watir to infer the object type the way FireWatir does?

Thanks,

Richard

On Mon, Jan 12, 2009 at 9:15 AM, Bret Pettichord <b...@pettichord.com> wrote:
>
> Richard Lawrence wrote:
>> Using FireWatir's element_by_xpath on my Mac, I get the expected type
>> for the element. For example, on the Google home page:
>>
>> irb(main):008:0> b.element_by_xpath("//*...@name='btnG']").class
>> submit
>> => FireWatir::Button
>>
>> But with Watir (on Windows, of course), I always get an instance of
>> WIN32OLE back. For the same example:
>>
>> irb(main):018:0> b.element_by_xpath("//*...@name='btnG']").class
>> => WIN32OLE
>>
>> Is there a way I can get the Button object I expect from
>> element_by_xpath with Watir?
>>
>>
> b.button(:xpath, "//*...@name='btnG']")
>
> This actually wraps the call to element_by_xpath.
>
> Bret
>
> >
>

--~--~---------~--~----~------------~-------~--~----~
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