Skip to Main Content
Mastering Selenium WebDriver 3.0 - Second Edition
book

Mastering Selenium WebDriver 3.0 - Second Edition

by Mark Collin
June 2018
Beginner to intermediate content levelBeginner to intermediate
376 pages
8h 58m
English
Packt Publishing
Content preview from Mastering Selenium WebDriver 3.0 - Second Edition

Working with drag and drop

Another HTML construct that is hard to work with is a page that allows you to drag and drop elements. For this example, we will create a simple HTML page that uses jQuery to allow us to drag some elements around the screen. We are also going to add an element that will destroy any of the draggable elements that we drop onto it so that these draggable elements can be removed from the page. Let's start off with the basic HTML:

<!DOCTYPE html> 
<html lang="en"> 
<head> 
    <meta charset=utf-8> 
    <title>Drag and drop</title> 
    <style type="text/css">${TBC}</style> 
    <script src="https://ajax.googleapis.com/ajax/libs/jquery    /2.1.3/jquery.min.js"></script> 
    <script src="https://ajax.googleapis.com/ajax/libs/jqueryui /1.11.3/jquery-ui.min.js"></script> ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

Selenium WebDriver 3 Practical Guide - Second Edition

Selenium WebDriver 3 Practical Guide - Second Edition

Pallavi Sharma, UNMESH GUNDECHA, Satya Avasarala

Publisher Resources

ISBN: 9781788299671Supplemental Content