[wtr-general] Re: Elements supported by Watir
You could even write it without any custom methods (is_element_subclass?) like this: require 'watir/ie' ObjectSpace.each_object(Class) {|c| puts c if c.ancestors.include? (Watir::Element)} Although I don't also understand what's the use of the classnames to regular users... Jarmo On Feb 17, 3:32 pm, Željko Filipin zeljko.fili...@wa-research.ch wrote: On Tue, Oct 6, 2009 at 4:01 AM, Bret Pettichord bpettich...@gmail.com wrote: require 'watir/ie' Thanks, I finally got some time to update the code and the output: http://wiki.openqa.org/display/WTR/HTML+Elements+Supported+by+Watir Željko -- 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
Re: [wtr-general] Re: Elements supported by Watir
On Thu, Feb 18, 2010 at 10:08 AM, Jarmo Pertman jarm...@gmail.com wrote: Although I don't also understand what's the use of the classnames to regular users... Class names just represent html elements that Watir knows about. Željko -- 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
Re: [wtr-general] Re: Elements supported by Watir
Fixed (removed Watir Class column): http://wiki.openqa.org/display/WTR/Collections+of+HTML+Elements http://wiki.openqa.org/display/WTR/HTML+Elements+Supported+by+Watir Željko On Thu, Oct 8, 2009 at 6:12 AM, Bret Pettichord bpettich...@gmail.com wrote: But how do the class names help with this? To me the method names and the elements supported are user-level information. But the class names really have to do with how Watir is structured, which is sometimes ugly inside, but shouldn't matter to most users. I am worried that this information is being presented in a way that might lead users to think this is something they should know, and therefore make Watir look more confusing than it needs to. -- 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
Re: [wtr-general] Re: Elements supported by Watir
On Tue, Oct 6, 2009 at 4:01 AM, Bret Pettichord bpettich...@gmail.com wrote: require 'watir/ie' Thanks, I finally got some time to update the code and the output: http://wiki.openqa.org/display/WTR/HTML+Elements+Supported+by+Watir Željko -- 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: Elements supported by Watir
Hey Brett, How is it that you got Watir::Dd, Watir::Dt Watir::Dl (amongst others like Watir::Strong) in your list? When I run the same code these are not returned - wondering if you have custom methods in place for those, or what I need to do to make sure they are identifiable elements? - Jason On Sep 29, 5:08 am, Bret Pettichord bpettich...@gmail.com wrote: On Sep 28, 4:54 am, Željko Filipin zeljko.fili...@wa-research.ch wrote: Do we have a place where all elements (link, image, button...) supported by Watir are listed? Is this list complete? http://wiki.openqa.org/display/WTR/Methods+Supported+by+Element I've been trying to keep it up to date Is there a simple way I could take a look in the code and find which elements Watir supports? I see we have Element class and I suppose all elements inherit it. I have searched Watir code for ` Element` and found a lot of places where it appears. Is there a central location where all elements are collected? def is_element_subclass?klass whileklass=klass.superclass return true ifklass== Watir::Element end end ObjectSpace.each_object(Class){|c| puts c if is_element_subclass?(c)} Watir::HTMLElement Watir::Link Watir::Image Watir::TableCell Watir::TableRow Watir::TableBody Watir::TableBodies Watir::Table Watir::CheckBox Watir::Radio Watir::RadioCheckCommon Watir::FileField Watir::Hidden Watir::TextField Watir::Button Watir::SelectList Watir::InputElement Watir::Em Watir::Strong Watir::Dd Watir::Dt Watir::Dl Watir::H6 Watir::H5 Watir::H4 Watir::H3 Watir::H2 Watir::H1 Watir::Ul Watir::Li Watir::Label Watir::Area Watir::Map Watir::Span Watir::Div Watir::P Watir::Pre Watir::NonControlElement Watir::Form Željko --http://watirpodcast.com/ --~--~-~--~~~---~--~~ 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: Elements supported by Watir
I think I'm running the latest version of Watir: 1.6.5 rc1 or thereabouts. Bret Jason wrote: Hey Brett, How is it that you got Watir::Dd, Watir::Dt Watir::Dl (amongst others like Watir::Strong) in your list? When I run the same code these are not returned - wondering if you have custom methods in place for those, or what I need to do to make sure they are identifiable elements? - Jason On Sep 29, 5:08 am, Bret Pettichord bpettich...@gmail.com wrote: On Sep 28, 4:54 am, Željko Filipin zeljko.fili...@wa-research.ch wrote: Do we have a place where all elements (link, image, button...) supported by Watir are listed? Is this list complete? http://wiki.openqa.org/display/WTR/Methods+Supported+by+Element I've been trying to keep it up to date Is there a simple way I could take a look in the code and find which elements Watir supports? I see we have Element class and I suppose all elements inherit it. I have searched Watir code for ` Element` and found a lot of places where it appears. Is there a central location where all elements are collected? def is_element_subclass?klass whileklass=klass.superclass return true ifklass== Watir::Element end end ObjectSpace.each_object(Class){|c| puts c if is_element_subclass?(c)} Watir::HTMLElement Watir::Link Watir::Image Watir::TableCell Watir::TableRow Watir::TableBody Watir::TableBodies Watir::Table Watir::CheckBox Watir::Radio Watir::RadioCheckCommon Watir::FileField Watir::Hidden Watir::TextField Watir::Button Watir::SelectList Watir::InputElement Watir::Em Watir::Strong Watir::Dd Watir::Dt Watir::Dl Watir::H6 Watir::H5 Watir::H4 Watir::H3 Watir::H2 Watir::H1 Watir::Ul Watir::Li Watir::Label Watir::Area Watir::Map Watir::Span Watir::Div Watir::P Watir::Pre Watir::NonControlElement Watir::Form Željko --http://watirpodcast.com/ -- Bret Pettichord Lead Developer, Watir, www.watir.com Blog, www.io.com/~wazmo/blog Twitter, www.twitter.com/bpettichord --~--~-~--~~~---~--~~ 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: Elements supported by Watir
On Tue, Oct 6, 2009 at 5:01 AM, Bret Pettichord bpettich...@gmail.com wrote: require 'watir/ie' I knew it will be something simple. :) Thanks, I will try it. Željko --~--~-~--~~~---~--~~ 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: Elements supported by Watir
On Tue, Oct 6, 2009 at 5:03 AM, Bret Pettichord bpettich...@gmail.com wrote: Because Frame is not a subclass of Element. Makes sense. I am curious as to why you find this information helpful. I just wanted to get a definite list of HTML elements supported by Watir. Željko --~--~-~--~~~---~--~~ 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: Elements supported by Watir
On Oct 7, 6:03 pm, Željko Filipin zeljko.fili...@wa-research.ch wrote: On Tue, Oct 6, 2009 at 5:03 AM, Bret Pettichord bpettich...@gmail.com I am curious as to why you find this information helpful. I just wanted to get a definite list of HTML elements supported by Watir. But how do the class names help with this? To me the method names and the elements supported are user-level information. But the class names really have to do with how Watir is structured, which is sometimes ugly inside, but shouldn't matter to most users. I am worried that this information is being presented in a way that might lead users to think this is something they should know, and therefore make Watir look more confusing than it needs to. --~--~-~--~~~---~--~~ 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: Elements supported by Watir
require 'watir/ie' On Sep 29, 4:26 am, Željko Filipin zeljko.fili...@wa-research.ch wrote: On Mon, Sep 28, 2009 at 6:08 PM, Bret Pettichord bpettich...@gmail.com wrote: def is_element_subclass? klass while klass = klass.superclass return true if klass == Watir::Element end end ObjectSpace.each_object(Class){|c| puts c if is_element_subclass?(c)} I executed this code on Mac and Windows and got this error message: NameError: uninitialized constant Watir::Element from (irb):5:in `is_element_subclass?' from (irb):9 from (irb):9:in `each_object' from (irb):9 I tried with or without `require watir` as the first line. What am I doing wrong? Mac: ruby 1.8.6 (2008-08-11 patchlevel 287) [universal-darwin9.0]) commonwatir (1.6.2) firewatir (1.6.2) safariwatir (0.3.3) Windows: ruby 1.8.6 (2007-09-24 patchlevel 111) [i386-mswin32] commonwatir (1.6.2) firewatir (1.6.2) watir (1.6.2) Željko --~--~-~--~~~---~--~~ 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: Elements supported by Watir
Because Frame is not a subclass of Element. I am curious as to why you find this information helpful. If you want to know the class of an element, you can always do browser.text_field(:id, 'foo').class Bret On Sep 30, 7:06 am, Željko Filipin zeljko.fili...@wa-research.ch wrote: Frame is missing from this list. I guess it makes sense, but it is still missing. Željko On Mon, Sep 28, 2009 at 6:08 PM, Bret Pettichord bpettich...@gmail.com wrote: ObjectSpace.each_object(Class){|c| puts c if is_element_subclass?(c)} Watir::HTMLElement Watir::Link Watir::Image Watir::TableCell Watir::TableRow Watir::TableBody Watir::TableBodies Watir::Table Watir::CheckBox Watir::Radio Watir::RadioCheckCommon Watir::FileField Watir::Hidden Watir::TextField Watir::Button Watir::SelectList Watir::InputElement Watir::Em Watir::Strong Watir::Dd Watir::Dt Watir::Dl Watir::H6 Watir::H5 Watir::H4 Watir::H3 Watir::H2 Watir::H1 Watir::Ul Watir::Li Watir::Label Watir::Area Watir::Map Watir::Span Watir::Div Watir::P Watir::Pre Watir::NonControlElement Watir::Form --~--~-~--~~~---~--~~ 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: Elements supported by Watir
Frame is missing from this list. I guess it makes sense, but it is still missing. Željko On Mon, Sep 28, 2009 at 6:08 PM, Bret Pettichord bpettich...@gmail.com wrote: ObjectSpace.each_object(Class){|c| puts c if is_element_subclass?(c)} Watir::HTMLElement Watir::Link Watir::Image Watir::TableCell Watir::TableRow Watir::TableBody Watir::TableBodies Watir::Table Watir::CheckBox Watir::Radio Watir::RadioCheckCommon Watir::FileField Watir::Hidden Watir::TextField Watir::Button Watir::SelectList Watir::InputElement Watir::Em Watir::Strong Watir::Dd Watir::Dt Watir::Dl Watir::H6 Watir::H5 Watir::H4 Watir::H3 Watir::H2 Watir::H1 Watir::Ul Watir::Li Watir::Label Watir::Area Watir::Map Watir::Span Watir::Div Watir::P Watir::Pre Watir::NonControlElement Watir::Form --~--~-~--~~~---~--~~ 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: Elements supported by Watir
I can't get Bret's code to work either. I tried all classes and Watir::Element is not included My Code: require 'Watir' def is_element_subclass? klass while klass = klass.superclass return true end end ObjectSpace.each_object(Class){|c| puts c if is_element_subclass?(c)} Cheers, Alister On Sep 29, 7:26 pm, Željko Filipin zeljko.fili...@wa-research.ch wrote: On Mon, Sep 28, 2009 at 6:08 PM, Bret Pettichord bpettich...@gmail.com wrote: def is_element_subclass? klass while klass = klass.superclass return true if klass == Watir::Element end end ObjectSpace.each_object(Class){|c| puts c if is_element_subclass?(c)} I executed this code on Mac and Windows and got this error message: NameError: uninitialized constant Watir::Element from (irb):5:in `is_element_subclass?' from (irb):9 from (irb):9:in `each_object' from (irb):9 I tried with or without `require watir` as the first line. What am I doing wrong? Mac: ruby 1.8.6 (2008-08-11 patchlevel 287) [universal-darwin9.0]) commonwatir (1.6.2) firewatir (1.6.2) safariwatir (0.3.3) Windows: ruby 1.8.6 (2007-09-24 patchlevel 111) [i386-mswin32] commonwatir (1.6.2) firewatir (1.6.2) watir (1.6.2) Željko --~--~-~--~~~---~--~~ 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: Elements supported by Watir
On Mon, Sep 28, 2009 at 6:08 PM, Bret Pettichord bpettich...@gmail.com wrote: def is_element_subclass? klass while klass = klass.superclass return true if klass == Watir::Element end end ObjectSpace.each_object(Class){|c| puts c if is_element_subclass?(c)} I executed this code on Mac and Windows and got this error message: NameError: uninitialized constant Watir::Element from (irb):5:in `is_element_subclass?' from (irb):9 from (irb):9:in `each_object' from (irb):9 I tried with or without `require watir` as the first line. What am I doing wrong? Mac: ruby 1.8.6 (2008-08-11 patchlevel 287) [universal-darwin9.0]) commonwatir (1.6.2) firewatir (1.6.2) safariwatir (0.3.3) Windows: ruby 1.8.6 (2007-09-24 patchlevel 111) [i386-mswin32] commonwatir (1.6.2) firewatir (1.6.2) watir (1.6.2) Željko --~--~-~--~~~---~--~~ 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: Elements supported by Watir
On Sep 28, 4:54 am, Željko Filipin zeljko.fili...@wa-research.ch wrote: Do we have a place where all elements (link, image, button...) supported by Watir are listed? Is this list complete? http://wiki.openqa.org/display/WTR/Methods+Supported+by+Element I've been trying to keep it up to date Is there a simple way I could take a look in the code and find which elements Watir supports? I see we have Element class and I suppose all elements inherit it. I have searched Watir code for ` Element` and found a lot of places where it appears. Is there a central location where all elements are collected? def is_element_subclass? klass while klass = klass.superclass return true if klass == Watir::Element end end ObjectSpace.each_object(Class){|c| puts c if is_element_subclass?(c)} Watir::HTMLElement Watir::Link Watir::Image Watir::TableCell Watir::TableRow Watir::TableBody Watir::TableBodies Watir::Table Watir::CheckBox Watir::Radio Watir::RadioCheckCommon Watir::FileField Watir::Hidden Watir::TextField Watir::Button Watir::SelectList Watir::InputElement Watir::Em Watir::Strong Watir::Dd Watir::Dt Watir::Dl Watir::H6 Watir::H5 Watir::H4 Watir::H3 Watir::H2 Watir::H1 Watir::Ul Watir::Li Watir::Label Watir::Area Watir::Map Watir::Span Watir::Div Watir::P Watir::Pre Watir::NonControlElement Watir::Form Željko --http://watirpodcast.com/ --~--~-~--~~~---~--~~ 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 -~--~~~~--~~--~--~---