Watir로 요소 사용자 정의 속성의 가치를 얻으려면 어떻게해야합니까?
-
22-07-2019 - |
문제
다음과 같은 html이 있습니다.
<input custom_attribute="so cool" type="text" />
가치를 얻고 싶습니다 custom_attribute
사용 Watir.
해결책
browser.text_field(:index, 1).attribute_value("custom_attribute")
#=> "so cool"
출처 :
제휴하지 않습니다 StackOverflow