0

I am developing a site that uses a ton of jQuery events. I need to be able to trigger some of these easily for testing purposes. Currently, I am continuously typing the following line into the console:

$('body > #wrapper > .myClassHere').trigger('mouseenter');

Is there a developer plugin, or a feature that I am missing, for a browser (preferably Chrome) that can easily trigger these automatically?

Vadim Kotov
  • 8,084
  • 8
  • 48
  • 62
Fizzix
  • 23,679
  • 38
  • 110
  • 176
  • what do you mean by automatically – Arun P Johny May 01 '14 at 03:24
  • For example, in Chrome Developer Tools, you can right click on a DOM element, and go to 'Force Element State -> Hover'. It would be handy to have this also for jQuery events like 'Force Event -> Mouse Enter'. – Fizzix May 01 '14 at 03:26
  • 1
    Your already in the dev console. Just copy paste. Or add a few helper functions to your page. The dev console gets the same context as the page. Next assumption, you're using mouseenter and the term automatically I'm willing to bet you don't have control of the page source. Perhaps what your looking for is http://docs.seleniumhq.org/ – Sukima May 01 '14 at 03:28
  • Helper functions could actually be the way to go. Might just add `myTriggerFunction(domElementHere, eventHere)`. Never knew that you could call them directly from the console, thanks. – Fizzix May 01 '14 at 03:33

0 Answers0