我有HTML,看起来像这样:
<input custom_attribute="so cool" type="text" />
我想获得的价值custom_attribute
使用的Watir 。
我有HTML,看起来像这样:
<input custom_attribute="so cool" type="text" />
我想获得的价值custom_attribute
使用的Watir 。
browser.text_field(:index, 1).attribute_value("custom_attribute")
#=> "so cool"
资料来源: