I got into the same problem and found that whenever you are using variable we need to use .value=variable instead of .set variable.
On Dec 31 2008, 3:39 am, sowmya <[email protected]> wrote: > Never mind. It worked. > [ie.text_field(:id, "create_id").value=(id)] > > On Dec 30, 2:26 pm, sowmya <[email protected]> wrote: > > > Hello, > > > I'm trying to set value to a text field that takes in only numeric > > values. > > > <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? > > > Thanks > > Sowmya. > > > 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 [email protected] Before posting, please read the following guidelines: http://wiki.openqa.org/display/WTR/Support To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/watir-general -~----------~----~----~----~------~----~------~--~---
