[英]Watir-Webdriver - Unable to locate a button with id, name, text, value
[英]How to call the id from text_area with watir-webdriver?
for i in 0..10
if @b.text_field(:cols => "40", :index => i).exists?
id = @b.text_field(:cols => "40", :index => i)
if profile_profile_qualifications_attributes_new_(\d)+_comment/.match(id)
@b.text_field(:cols => "40", :index => i).set "Rock!"
end
end
end
上面的代碼因
Error: can't convert Watir::TextField to String (TypeError)
id = @b.text_field(:cols => "40", :index => i).id
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.