解决方法
browser.text_field(:index,1).attribute_value("custom_attribute") #=> "so cool"
资料来源:
> http://www.mail-archive.com/wtr-general%40rubyforge.org/msg06769.html
> http://rdoc.info/gems/watir/1.6.6/Watir/Element#attribute_value-instance_method
> https://github.com/watir/watir-classic/blob/master/lib/watir-classic/element.rb
> http://zeljkofilipin.com/watir-select-element-using-custom-attribute/