OK, I got the hidden part to work, but I do need the fire event, I think. I wish I knew how this is so easily done in Canoo WebTest with the forceHiddenInputField. Not being a programmer, I am thinking I'm not going to be able to figure this out. The Java programmers here aren't too keen to help me but maybe I can get one of them to, I'm sure they could figure it out with all the info y'all have provided. Thanks. -- Lisa
On Thu, May 26, 2011 at 1:44 AM, Chuck van der Linden <[email protected]>wrote: > I'd wager it's working off keypress events. Problem is we can't > easily fire those in watir because the .fire_event method only takes a > single parameter (the event) and I believe to work properly keypress > needs a parameter for the value of the key that was depressed. > > You might need to write your own function that executes the javascript > fireevent function instead, similar to this item from Stackoverflow a > year or two ago > http://stackoverflow.com/questions/602069/autocomplete-dropdown-test-with-ruby-watir > > Another alternative is described here > http://zbarzone.blogspot.com/2008/08/watir-sendkeys-and-javascript.html > and that approach might actually be better for you. > > To fix this 'for real' it seems we'd need to first modify .fire_event > to allow for a second parameter, or create a new method such > as .fire_key_event that would take two parameters. Then any other > methods that have keypress events in them such as .set would need to > be altered to fire the down/press/up events character by character and > fire those events with the proper 'key' values for each character. > > On May 24, 11:24 am, Lisa Crispin <[email protected]> wrote: > > I tried the log events thing, it's nice to know about that, but I don't > see > > anything that really looks like the JS firing. I see a lot of 'select', > > 'click' 'keydown', 'input', 'keypress', 'keyup', none of that looks like > > what the JS is doing with the type ahead. > > -- LIsa > > > > On Mon, May 23, 2011 at 2:36 PM, Željko Filipin < > > > > > > > > > > > > > > > > > > > > [email protected]> wrote: > > > On Mon, May 23, 2011 at 9:44 PM, Lisa Crispin <[email protected]> > > > wrote: > > > > We are changing what used to be regular drop-down select list boxes > to a > > > dojo widget thingie that allows type ahead to select the item. > > > > > Is the page public? Or a similar page? Frameworks usually have examples > > > somewhere online. > > > > > If you think the only problem is that a JavaScript event is not fired > (by > > > Watir), take a look at this: > > > > >http://stackoverflow.com/questions/3787555/how-to-find-out-which-java. > .. > > > > > If the site is not public, but you could show it to me, contact me off > > > list. > > > > > Željko > > > -- > > > watir.com - community manager > > > watir.com/book - author > > > watirpodcast.com - host > > > viaqa.mobi conference on software testing - organizer > > > > > -- > > > Before posting, please readhttp://watir.com/support. In short: search > > > before you ask, be nice. > > > > > [email protected] > > >http://groups.google.com/group/watir-general > > > [email protected] > > > > -- > > Lisa Crispin > > Co-author with Janet Gregory, _Agile Testing: A Practical Guide for > Testers > > and Agile Teams_ (Addison-Wesley 2009) > > Contributor to _Beautiful Testing_ (O'Reilly 2009)http://lisacrispin.com > > @lisacrispin on Twitterhttp://entaggle.com/lisacrispin > > -- > Before posting, please read http://watir.com/support. In short: search > before you ask, be nice. > > [email protected] > http://groups.google.com/group/watir-general > [email protected]<http://groups.google.com/group/watir-general%[email protected]> > -- Lisa Crispin Co-author with Janet Gregory, _Agile Testing: A Practical Guide for Testers and Agile Teams_ (Addison-Wesley 2009) Contributor to _Beautiful Testing_ (O'Reilly 2009) http://lisacrispin.com @lisacrispin on Twitter http://entaggle.com/lisacrispin -- Before posting, please read http://watir.com/support. In short: search before you ask, be nice. [email protected] http://groups.google.com/group/watir-general [email protected]
