0

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 :)

0

1 Answer 1

2

If you are using jUnit, you probably want to use Selenium which can automated user actions in multiple browsers.

Sign up to request clarification or add additional context in comments.

2 Comments

it's for a .NET website; I mentioned those unit tests because I am very familiar w them since I do backend work. Can Selenium be integrated with any website?
And there is nUnit and if you read the Selenium's site you would see it is available in a bunch of languages.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.