开发者

How to set value for this input element through watij

开发者 https://www.devze.com 2023-03-15 00:57 出处:网络
My code: <input tabIndex=\"1\" style=\"width: 10px; color: black; margin-left: 2px;\" type=\"text\" setvaluehandler=\"RichInputBoxSetValueHandler1\" backspacedeleteoff=\"true\" tipText=\"\" jQue

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?

Is it a trigger handler? If so, how is it triggered?


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/).

0

精彩评论

暂无评论...
验证码 换一张
取 消