I'm trying to set value to a text field that takes in only numeric

<INPUT class="validtxt" onkeypress="return CreateIssue_CheckKeyCode
('createissue')" id="create_id" value="" />

I tried the following:

id = "123"
ie.text_field(:id, "create_id").fire_event("onkeypress")
ie.text_field(:id, "create_id").set id

But I get a pop up saying "Only numeric values allowed" three times as
each digit of the id is entered. I even tried entering just 1 instead
of 123 and I still got the same error pop-up.

Anyone has ideas on how to get around this problem?


P.S: I've just started using Watir. I looked through this forum to
make sure my question isn't duplicated, but I couldn't find any
answers. If you find that the question is already answered I apologize
- please direct me to the right thread.

You received this message because you are subscribed to the Google Groups 
"Watir General" group.
To post to this group, send email to watir-general@googlegroups.com
Before posting, please read the following guidelines: 
To unsubscribe from this group, send email to 
For more options, visit this group at 

Reply via email to