...">Geek Answers HandbookHow to access an element with a custom attribute using Watir?I have HTML that looks like this:<input custom_attribute="so cool" type="text" /> I would like to enter text into it using Watir .+4html internet-explorer watirŽeljko filipin 21 sept '09 at 11:02source share2 answers browser.text_field(:xpath , "//input[@custom_attribute='so cool']/").set("even more cool") Sources:http://wiki.openqa.org/display/WTR/XPathhttp://zeljkofilipin.com/2007/01/29/watir-select-element-using-custom-attribute/+5Željko filipin 21 sept '09 at 11:04source shareAnswer Filipin did not work for my work with watir-webdriver.However, I found a way to do work with css selectors. browser.element(:css, "input[custom_attribute='so cool']").send_keys("the coolest") +7boulder_ruby Apr 11 '13 at 0:31source shareMore articles:What is a quick and uncontrolled way to check the quality of the extracted pdf text? - javahttps://translate.googleusercontent.com/translate_c?depth=1&rurl=translate.google.com&sl=ru&sp=nmt4&tl=en&u=https://fooobar.com/questions/1291467/how-do-i-give-a-windows-service-access-to-a-msmq-queue-with-a-setup-project&usg=ALkJrhj0tr-Uu8nNKyD2O9o9CajC0w99gAWhy is this snippet compiled in C? - c ++How to add extra cells to a UITableView in edit mode? - objective-chttps://translate.googleusercontent.com/translate_c?depth=1&rurl=translate.google.com&sl=ru&sp=nmt4&tl=en&u=https://fooobar.com/questions/1291470/can-i-expect-float-variable-values-that-i-set-from-literal-constants-to-be-unchanged-after-assignment-to-other-variables&usg=ALkJrhiT0woEblmL1BIgz13pKJILHZ_gGwHow to build a non-blocking TCP server with ssl encryption - erlangWhen the apostrophe is not an apostrophe - .Net / Javascript check - c #Build href = using XSLT - xsltWhat permissions should a SQL Server user provide for LinqToSql? - sql-serverzend relationship with choice - zend-frameworkAll Articles
I have HTML that looks like this:
<input custom_attribute="so cool" type="text" />
I would like to enter text into it using Watir .
browser.text_field(:xpath , "//input[@custom_attribute='so cool']/").set("even more cool")
Sources:
Answer Filipin did not work for my work with watir-webdriver.
However, I found a way to do work with css selectors.
browser.element(:css, "input[custom_attribute='so cool']").send_keys("the coolest")