开发者

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?

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

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜