We ensure drag and drop using jQuery works (html5 drag and drop, is not yet supported by Selenium).

|script          |browser test                              |
|open            |https://jqueryui.com/droppable/           |
|drag            |Drag me to my target|and drop to|Drop here|
|wait for visible|Dropped!                                  |
We ensure drag and drop using jQuery works (html5 drag and drop, is not yet supported by Selenium).

We use a mock server running to serve the HTML (which was copied from https://jqueryui.com/droppable/) defined in this page.

!define HTML { {{{
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>jQuery UI Droppable - Default functionality</title>
<link rel="stylesheet" href="//code.jquery.com/ui/1.12.1/themes/base/jquery-ui.css">
<link rel="stylesheet" href="/resources/demos/style.css">
<style>
#draggable { width: 100px; height: 100px; padding: 0.5em; float: left; margin: 10px 10px 10px 0; }
#droppable { width: 150px; height: 150px; padding: 0.5em; float: left; margin: 10px; }
</style>
<script src="https://code.jquery.com/jquery-1.12.4.js"></script>
<script src="https://code.jquery.com/ui/1.12.1/jquery-ui.js"></script>
<script>
$( function() {
$( "#draggable" ).draggable();
$( "#droppable" ).droppable({
drop: function( event, ui ) {
$( this )
.addClass( "ui-state-highlight" )
.find( "p" )
.html( "Dropped!" );
}
});
} );
</script>
</head>
<body>
<div id="draggable" class="ui-widget-content">
<p>Drag me to my target</p>
</div>
<div id="droppable" class="ui-widget-header">
<p>Drop here</p>
</div>
</body>
</html>
}}} }


|script      |mock xml server setup|
|add response|${HTML}              |
|$url=       |get mock server url  |



|script                |browser test                              |
|open                  |$url                                      |
|seconds before timeout|1                                         |
|drag                  |Drag me to my target|and drop to|Drop here|
|wait for visible      |Dropped!                                  |