[wtr-general] Re: element_by_xpath return value

2009-02-15 Thread Angrez Singh
AFAIK,  we can do that in Watir as well.

 Angrez is the author of both Watir's xpath support as well as FireWatir,
  so that is probably why xpath works better with FireWatir than WatirIE.
 


:), only difference in Firewatir  Watir xpath support is that in Firewatir,
firefox supports element recognition using XPath but in case of watir we
need to first create XML and then use REXML to get the element.

- Angrez

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



[wtr-general] Re: element_by_xpath return value

2009-02-13 Thread rob

I am also curious about this.

Thanks.

On Jan 12, 8:42 pm, Bret Pettichord b...@pettichord.com wrote:
 I'm sure there's a way for Watir to do this just like FireWatir. It just
 hasn't been done yet, as far as i am aware.

 Angrez is the author of both Watir's xpath support as well as FireWatir,
 so that is probably why xpath works better with FireWatir than WatirIE.

 Angrez, do you have anything to add here?

 Bret

 Richard Lawrence wrote:
  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'selement_by_xpathon 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_xpathwith Watir?

  b.button(:xpath, //*...@name='btnG'])

  This actually wraps the call toelement_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
-~--~~~~--~~--~--~---



[wtr-general] Re: element_by_xpath return value

2009-01-12 Thread Bret Pettichord

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



[wtr-general] Re: element_by_xpath return value

2009-01-12 Thread Bret Pettichord

I'm sure there's a way for Watir to do this just like FireWatir. It just 
hasn't been done yet, as far as i am aware.

Angrez is the author of both Watir's xpath support as well as FireWatir, 
so that is probably why xpath works better with FireWatir than WatirIE.

Angrez, do you have anything to add here?

Bret

Richard Lawrence wrote:
 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
-~--~~~~--~~--~--~---