I am looking for a framework to simulate mouse drag and drop of various html tags via jquery then capture the screen and compare that with a saved image. I do this in order to test a webpage UI.
I've seen a great post: Javascript testing to simulate drag for JQuery UI sortable lists, which gave this link: https://github.com/jquery/jquery-ui/blob/master/tests/jquery.simulate.js
Currently I am not sure how I can use jquery.simulate.js (but I'm playing with it to learn), so I am interested if there are any other frameworks that I can use (perhaps some that look more like JUnit/NUnit).
Preferably I'd like to do be able to code sth like this:
simulateDivDrag(Image expectedResult){
simulate mouse drag of event
take screenshot
cmp(expectedResult, screenshot)
}
I remember reading that Firefox has built an in house tool for such automated UI testing so it's definitely possible.
Thanks :)