Hi,
I have some page source that looks like:
<div class="battery"> <ul class="battery-level-list"
data-battery-level="5.71535"> <li class="green">1</li>
<li class="green">1</li> <li
class="green">1</li> <li class="green">1</li>
</ul> </div>
I'm trying to get the value of 'data-battery-level' ...
I have tried a number of different things, but I can't seem to find how to pick
out the value.
b = Watir:Browser.new
...
d = b.div :class => 'battery'
d.text
=> "1\n1\n1\n1"
>> d.ul
=> #<Watir::UList:0x101696b88 located=false selector={:tag_name=>"ul"}>
>> d.elements
=> #<Watir::HTMLElementCollection:0x1016a7a50 @selector={},
@parent=#<Watir::Div:0x..fe7cbadc7c located=true
selector={:class=>"battery", :tag_name=>"div"}>>
>> b.div(:class,"battery").li(:index,2).text
=> "1"
>> b.div(:class,"battery-level-list")
=> #<Watir::Div:0x10175b960 located=false
selector={:class=>"battery-level-list", :tag_name=>"div"}>
I'm stumped ...
Thanks in advance for any insight
-Fred
--
--
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.