All Projects → html-dnd → html-dnd

html-dnd / html-dnd

Licence: MIT license
HTML Drag and Drop Simulator for E2E testing

Programming Languages

typescript
32286 projects
javascript
184084 projects - #8 most used programming language

Projects that are alternatives of or similar to html-dnd

nightwatch101
使用 Nightwatch 實現 End-to-End Testing ★
Stars: ✭ 42 (-20.75%)
Mutual labels:  webdriver, nightwatch
tees
Universal test framework for front-end with WebDriver, Puppeteer and Enzyme
Stars: ✭ 23 (-56.6%)
Mutual labels:  webdriver, selenium-webdriver
Thirtyfour
Selenium WebDriver client for Rust, for automated testing of websites
Stars: ✭ 191 (+260.38%)
Mutual labels:  webdriver, selenium-webdriver
Nightwatch
End-to-end testing framework written in Node.js and using the Webdriver API
Stars: ✭ 10,912 (+20488.68%)
Mutual labels:  webdriver, nightwatch
google-meet-bot
Bot for scheduling and entering google meet sessions automatically
Stars: ✭ 33 (-37.74%)
Mutual labels:  webdriver, selenium-webdriver
Java.webdriver
Browser test automation using Selenium WebDriver in Java
Stars: ✭ 135 (+154.72%)
Mutual labels:  webdriver, selenium-webdriver
Steward
PHP libraries that makes Selenium WebDriver + PHPUnit functional testing easy and robust
Stars: ✭ 215 (+305.66%)
Mutual labels:  webdriver, selenium-webdriver
Webdriverextensions
Make your WebDriver based Selenium tests more readable, reusability and maintainable by using WebDriver Extensions!
Stars: ✭ 89 (+67.92%)
Mutual labels:  webdriver, selenium-webdriver
mugshot
Framework independent visual testing library
Stars: ✭ 126 (+137.74%)
Mutual labels:  webdriver, webdriverio
nightwatch-vrt
Visual Regression Testing tools for nightwatch.js
Stars: ✭ 59 (+11.32%)
Mutual labels:  selenium-webdriver, nightwatch
Marionette
Selenium alternative for Crystal. Browser manipulation without the Java overhead.
Stars: ✭ 119 (+124.53%)
Mutual labels:  webdriver, selenium-webdriver
spydriver
🕵️ Lightweight utility to intercept WebDriver and WebElement method calls.
Stars: ✭ 24 (-54.72%)
Mutual labels:  webdriver, selenium-webdriver
Csharp.webdriver
Browser test automation using Selenium WebDriver in C#
Stars: ✭ 115 (+116.98%)
Mutual labels:  webdriver, selenium-webdriver
Webium
Webium is a Page Object pattern implementation library for Python (http://martinfowler.com/bliki/PageObject.html). It allows you to extend WebElement class to your custom controls like Link, Button and group them as pages.
Stars: ✭ 144 (+171.7%)
Mutual labels:  webdriver, selenium-webdriver
Wp E2e Tests
Automated end-to-end tests for WordPress.com
Stars: ✭ 111 (+109.43%)
Mutual labels:  webdriver, selenium-webdriver
Panther
A browser testing and web crawling library for PHP and Symfony
Stars: ✭ 2,480 (+4579.25%)
Mutual labels:  webdriver, selenium-webdriver
Java.appium
Mobile test automation using Appium in Java
Stars: ✭ 59 (+11.32%)
Mutual labels:  webdriver, selenium-webdriver
Cabbie
WebDriver for the masses
Stars: ✭ 70 (+32.08%)
Mutual labels:  webdriver, selenium-webdriver
Cdp4j
cdp4j - Chrome DevTools Protocol for Java
Stars: ✭ 232 (+337.74%)
Mutual labels:  webdriver, selenium-webdriver
frontend testing
Repository containing sample code used in a Frontend Testing workshop
Stars: ✭ 14 (-73.58%)
Mutual labels:  selenium-webdriver, webdriverio

HTML Drag and Drop Simulator

Circle CI npm version

HTML Drag and Drop Simulator for E2E testing.

Now, WebDriver cannot handle HTML Drag and Drop. This module can simulate the HTML Drag and Drop by using the Execute Script command.

This module is like rcorreia/drag_and_drop_helper.js, but it does not require jQuery.

Install

npm install --save-dev html-dnd

Compatibility

Sauce Test Status

Usage

For selenium-webdriver

var dragAndDrop = require('html-dnd').code;
var webdriver = require('selenium-webdriver');
var By = webdriver.By;

var driver = new webdriver.Builder()
  .forBrowser('firefox')
  .build();

driver.get('http://example.com');

var draggable = driver.findElement(By.id('draggable'));
var droppable = driver.findElement(By.id('droppable'));

driver.executeScript(dragAndDrop, draggable, droppable);

driver.quit();

For Nightwatch.js

var dragAndDrop = require('html-dnd').codeForSelectors;

module.exports = {
  'drag and drop': function(browser) {
    browser
      .url('http://example.com')
      .execute(dragAndDrop, ['#draggable', '#droppable'])
      .end();
  }
};

For WebdriverIO

var dragAndDrop = require('html-dnd').codeForSelectors;
var webdriverio = require('webdriverio');
var options = { desiredCapabilities: { browserName: 'chrome' } };
var client = webdriverio.remote(options);

client
  .init()
  .url('http://example.com')
  .execute(dragAndDrop, '#draggable', '#droppable');
  .end();

With Typescript

import {code as dragAndDrop} from 'html-dnd';

driver.executeScript(dragAndDrop, draggable, droppable);

Only Hover

In some scenarios a drag operation is not beeing ended with a drop, but rather reveals an element upon hovering above a trigger. If you only want to do a hover you can do so via

import {code as dragAndDrop} from 'html-dnd';

driver.executeScript(dragAndDrop, draggable, droppable, {onlyHover:true, hoverTime:1000});

See also

License

MIT (c) 2017 Kuniwak

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].