I've also run into a problem with the triggered blur. I use the selenium select command to change the value of a select box. Problem is that this select box has an onChange that redraws the page before blur is fired, then the blur errors out on IE. I'm fairly sure that it worked a month or so ago, but this code has been broke since updating to the latest version of IE 6.
Everything works fine on Firefox. But I still wonder if the blur should always be fired. Maybe a check could be made to see if the select box still has focus? I couldn't find a way to write this check myself. Ideas? -- Jeff -----Original Message----- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Dan Fabulich Sent: Saturday, December 10, 2005 1:03 AM To: selenium-devel@lists.public.thoughtworks.org Subject: [Selenium-devel] Why blur after triggered events? Today I tried to use Selenium to automatically test this: http://www.irian.at/myfaces-sandbox/inputSuggestAjax.jsf It's an autocompleting AJAX input field. (The implementation just suggests what you typed followed by numbers, so for "foo" it suggests "foo1", "foo2", "foo3", "foo4", etc.) Immediately I ran into the problem that I couldn't trigger a keypress using Selenium. I therefore stole FJH's code from here: http://jira.openqa.org/browse/SEL-143 This code seemed to work, but it forced the autocomplete control not to autocomplete, because at the end of every triggered event in selenium-browserbot.js, it ends the action by triggering a "blur" event on the control. PageBot.selectOption, .replaceText, and .clickElement all come with automatic blurs at the end; FJH just reproduced this in his .keypressElement, .keydownElement, .mouseoverElement, and .mousedownElement. Unfortunately, the AJAX autocompleter has logic that says: "If I still have the focus once the AJAX request is done, then display a nifty auto-completion list... otherwise, the user must be doing something else, so forget about it." Since all of the PageBot triggered events blur immediately after action, the autocompleter never thinks it should autocomplete. Commenting out the 'blur's seemed to do the trick, but I'm a little nervous about doing that. Are these 'blur' actions good for me for some reason? Does adding them fix a bug that I'm now re-exposing? -Dan _______________________________________________ Selenium-devel mailing list Selenium-devel@lists.public.thoughtworks.org http://lists.public.thoughtworks.org/mailman/listinfo/selenium-devel _______________________________________________ Selenium-devel mailing list Selenium-devel@lists.public.thoughtworks.org http://lists.public.thoughtworks.org/mailman/listinfo/selenium-devel