Reputation: 57262
I have HTML that looks like this:
<input custom_attribute="so cool" type="text" />
I would like to enter text in it using Watir.
Upvotes: 4
Views: 4170
Reputation: 39695
Filipin's answer did not work for my job with watir-webdriver.
I did, however, find a way to do the job with css selectors.
browser.element(:css, "input[custom_attribute='so cool']").send_keys("the coolest")
Upvotes: 7
Reputation: 57262
browser.text_field(:xpath , "//input[@custom_attribute='so cool']/").set("even more cool")
Sources:
Upvotes: 5