0

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?

Shadow The GPT Wizard
  • 66,030
  • 26
  • 140
  • 208

1 Answers1

0

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

Tristan
  • 8,733
  • 7
  • 48
  • 96
  • Thanks for your answer.But i can't add a "name" or an "id" to the element.I just want to Simulate user actions to input the value for the "input" element.Any ideas? – recorded Jun 23 '11 at 01:40
  • Sure, I've added an other way to do it – Tristan Jun 24 '11 at 07:15
  • Thanks.But i think it maybe used some javascript on this element,so first have to trigger the handler.For Example:Through Keydown,keypress to trigger it.Are you? – recorded Jun 27 '11 at 01:12
  • Thank you.The problem has solved.It because i haven't positioning the element yet. – recorded Jun 28 '11 at 03:20