How to set value for this input element through watij
My code:
<input tabIndex="1" style="width: 10px; color: black; margin-left: 2px;" type="text" setvaluehandler="RichInputBoxSetValueHandler1" backspacedeleteoff="true" tipText="" jQuery1308721363625="14"/>
I don't 开发者_开发知识库know what setvaluehandler="RichInputBoxSetValueHandler1"
means?
This looks like a text input with a few custom attributes (maybe read by jquery).
U should be able to fill it like a standard text input with Watij.
EDIT : which means you have to add a "name" or an "id" to your element.
EDIT 2 : If you can't add a "name" or an "id" to you element, you have to use xpath (which may require to experiment).
First you could try :
ie.textField(xpath,"//INPUT[@setvaluehandler='RichInputBoxSetValueHandler1']").set("Text");
XPath finding may not work if HTML is not valid HTML (try to validate the HTML page you're trying to automate through http://validator.w3.org/).
精彩评论