9
属性我有HTML,看起来像这样:我怎样才能得到元素的自定义的值用的Watir
<input custom_attribute="so cool" type="text" />
我想用Watir得到的custom_attribute
值。
属性我有HTML,看起来像这样:我怎样才能得到元素的自定义的值用的Watir
<input custom_attribute="so cool" type="text" />
我想用Watir得到的custom_attribute
值。
browser.text_field(:index, 1).attribute_value("custom_attribute")
#=> "so cool"
来源:
不幸的是,这个答案的最后3个环节进行的Watir一个文件重新链接。我目前无法做到,但有人可以提供更新的链接? – artlung 2012-10-17 23:54:57
@artlung:我已修复链接。谢谢你让我知道。 – 2012-10-18 14:23:18
令人惊叹!你救了我的命 – Feytality 2016-02-04 17:49:13