As far as I can tell, the code checks against the "attribute_list" to 
determine if the attribute is valid. You can see the list for a specific 
element type by doing:

browser.element.class.attribute_list

where "element" can be any element type (text_field, link, div, etc.). I 
believe it is auto-generated some how.

Justin Ko



On Friday, March 1, 2013 1:04:25 PM UTC-5, Chuck van der Linden wrote:
>
> We used to have a big chart, which listed all the elements, and what could 
> be used to identify them, but it was hard to keep up to date, and I'm not 
> sure it's around, linked, or up to date if it is.  
>
> Is there a simple way (perhaps it has escaped me) to know (perhaps via the 
> rubydocs) what things can be used to select an element?
>
> for example 
>  browser.text_field(:name => "foo")  #valid
>  browser.tables(:name => "foo")  # results in: invalid attribute: :name 
> (Watir::Exception::MissingWayOfFindingObjectException)
>
> If I look up the tables method in the rubydoc, all I see is  tables 
> (*args)   how can I tell what a valid arg is?
>
>
>

-- 
-- 
Before posting, please read http://watir.com/support. In short: search before 
you ask, be nice.

[email protected]
http://groups.google.com/group/watir-general
[email protected]

--- 
You received this message because you are subscribed to the Google Groups 
"Watir General" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/groups/opt_out.


Reply via email to