You're calling send_keys on the string in .set. Try this instead: $IE0.frame(:index, 11).frame(:index, 7).text_field(:id, 'dataEntryField_40870').set(testtext)
$IE0.frame(:index, 11).frame(:index, 7).text_field(:id, 'dataEntryField_40870').send_keys("{ENTER}") Charley Baker blog: http://blog.charleybaker.org/ Lead Developer, Watir, http://wtr.rubyforge.org QA Architect, Gap Inc Direct On Wed, Apr 29, 2009 at 9:38 AM, deralex <alexander.fed...@googlemail.com>wrote: > > Hi, > > i am actually getting into watir and i really like it. > > But i am missing sending keystrokes to IE text field in a frame. > Case: > We have quick search function e.g. adding a name to a field "test" > then the db is search for all ppl. with "test" in the name. After this > i go a list displayed with a ppl. with "test" in surname and i can > select those via pressing down and after this pressing enter to > confirm the user. > > So i need to add "test" to the search field then wait for the result. > It will be displayed but i have to keep the focus in the search field, > otherwise the search result will be lost and no selection possible. > > I found: > > http://wtr.rubyforge.org/rdoc/ > > send_keys(key_string) > > Send key events to IE window. See > www.autoitscript.com/autoit3/docs/appendix/SendKeys.htm > for complete documentation on keys supported and syntax. > > > I can put text into the serach field e.g. > > $IE0.frame(:index, 11).frame(:index, 7).text_field(:id, > 'dataEntryField_40870').set(testtext) > > =OK > > but i want adding this text and right after it pressing {DOWN} then > {ENTER} > > i try: > > 1.) > $IE0.frame(:index, 11).frame(:index, 7).text_field(:id, > 'dataEntryField_40870').set(testtext).send_keys("{ENTER}") > > > ERROR MESSAGE: > tests_script_in_actual_ie_window.rb:31: undefined method `send_keys' > for "":String (NoMethodError) > >Exit code: 1 > > = not working > > Can someone help me please? > > > > > --~--~---------~--~----~------------~-------~--~----~ 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: http://wiki.openqa.org/display/WTR/Support To unsubscribe from this group, send email to watir-general-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/watir-general -~----------~----~----~----~------~----~------~--~---