You did answer it, in a different group.. ;-) 

  posted here
    suggested to post to wtr-dev
      posted to wtr-dev
      answered on wtr-dev
  answered here

On Monday, August 13, 2012 1:30:49 PM UTC-7, Jarmo Pertman wrote:
>
> I thought i answered this already. What Tim wanted to probably say was 
> that Watir 3 supports data attributes. Just use underscores instead of 
> dashes.
>
> Jarmo Pertman
> -----
> IT does really matter - http://itreallymatters.net
>
>
> On Friday, August 10, 2012 9:18:36 AM UTC+3, @90kts wrote:
>>
>> support for html5 data-* attributes by using :data_* for locating and 
>> #data_* 
>> for retrieving attribute values 
>>
>> On Friday, August 10, 2012 4:28:53 AM UTC+10, Abe Heward wrote:
>>>
>>> If I want to monkey patch Watir to recognize custom HTML attributes 
>>> ("custom_attrib" in the example code) I just add this code:
>>>
>>> module Watir
>>>
>>>  class Element
>>>
>>>    def custom_attrib
>>>
>>>      @how = :ole_object
>>>
>>>      return @o.custom_attrib
>>>
>>>    end
>>>
>>>  end
>>>
>>> end
>>>
>>> However, take a look at the custom attributes on this div element:
>>>
>>>
>>> <div class="contentauthoring_cell_element" data-element-id="id6775571" 
>>> data-element-type="contacts">
>>>
>>> Notice that those custom items contain dashes.  This is bad, because 
>>> Ruby does not allow dashes to exist in its method names.
>>>
>>> So, is Watir simply unable to be monkey-patched for these sorts of 
>>> custom attributes? If so, that would be really unfortunate because it seems 
>>> like a pretty common thing to have in HTML nowadays.
>>>
>>> OTOH, if it can be monkey-patched to support these things, then how?
>>>
>>

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

Reply via email to