Testing jQuery Sortable and Dialog example
This page is about Testing Automation of jQuery Sortable & Dialog example. This testing automation is example to sort list element by mouse action. Mainly it uses drag and drop.
In order to understand what test, please take a look at jQuery Sortable & Dialog before reading this page.
- About test cases
- Location of the source code
- Initialize WebDriver of the Selenium
- Testing to sort the items
This test case is testing about jQuery Sortable.
The items are sortable with drag and drop, and by clicking the item, the dialog appears. This test example check the consequences of actions.
The evidense screen shot is stored at location below.
Those screenshots a taken by Selenium program using taking screenshot technique.
The source code to test this is in "org.alinous.test.html5.jqparts" package.
The "JQuerySortableTest" class has the testing code of the JUnit.
At the first of the JUnit Test class, we initialize and connect the WebDriver, and make the download folder empty.
In this testcase, the actions below is done.
- Go to the test page
- Sort the items by drag and drop
source code of the test case
The source code of this test case is below.
In this code, do drag and drop in the "dragAndDrop()" function. The source code is below.
This function has parameter to specify the source identifier and destination' one. It takes a screenshot while moving the item before drop it.