I'm just getting started on Selenium, so I'm still wrapping my head around all the moving parts. I've got my first test suite up and running, but can't for the life of me get jQuery event listeners to fire in IE.
This is especially problematic on dynamic AJAX dropdowns such as $('#country').live('change',showStates)
select -> id=country | label=United States
The selenium driver triggers the events in response to the test script for all other browsers, but nothing I've tried causes or forces the change
event to fire. I've tried using every method I could find documented on SO, including:
- Maintaining window focus per How to fire JS event in selenium?
- Trying different methods to invoke the trigger:
runScript -> "$('#country').change()
per Selenium IE change event not fired runScript -> "$('#country').trigger('change')
fireEvent -> id=country | change
per onchange event does not get fired on selenium type command
None of these commands fire the event in IE9, 8 (emulated) or 7 (emulated). FWIW It's unclear if these actually cause the event to fire in other browsers as the other browsers fire the change
event without an additional call. I'm running the standalone selenium jar 2.33 on Windows 7.
How do I fire change events in IE with selenium?