Simulated DOM events for automated testing