html-dnd

WebJar for html-dnd

Лицензия

Лицензия

MIT
Категории

Категории

Github Инструменты разработки Контроль версий
Группа

Группа

org.webjars.npm
Идентификатор

Идентификатор

github-com-html-dnd-html-dnd
Последняя версия

Последняя версия

1.2.1
Дата

Дата

Тип

Тип

jar
Описание

Описание

html-dnd
WebJar for html-dnd
Ссылка на сайт

Ссылка на сайт

https://www.webjars.org
Система контроля версий

Система контроля версий

https://github.com/html-dnd/html-dnd

Скачать github-com-html-dnd-html-dnd

Как подключить последнюю версию

<!-- https://jarcasting.com/artifacts/org.webjars.npm/github-com-html-dnd-html-dnd/ -->
<dependency>
    <groupId>org.webjars.npm</groupId>
    <artifactId>github-com-html-dnd-html-dnd</artifactId>
    <version>1.2.1</version>
</dependency>
// https://jarcasting.com/artifacts/org.webjars.npm/github-com-html-dnd-html-dnd/
implementation 'org.webjars.npm:github-com-html-dnd-html-dnd:1.2.1'
// https://jarcasting.com/artifacts/org.webjars.npm/github-com-html-dnd-html-dnd/
implementation ("org.webjars.npm:github-com-html-dnd-html-dnd:1.2.1")
'org.webjars.npm:github-com-html-dnd-html-dnd:jar:1.2.1'
<dependency org="org.webjars.npm" name="github-com-html-dnd-html-dnd" rev="1.2.1">
  <artifact name="github-com-html-dnd-html-dnd" type="jar" />
</dependency>
@Grapes(
@Grab(group='org.webjars.npm', module='github-com-html-dnd-html-dnd', version='1.2.1')
)
libraryDependencies += "org.webjars.npm" % "github-com-html-dnd-html-dnd" % "1.2.1"
[org.webjars.npm/github-com-html-dnd-html-dnd "1.2.1"]

Зависимости

compile (1)

Идентификатор библиотеки Тип Версия
org.webjars.npm : multiline jar [1.0.2,2)

Модули Проекта

Данный проект не имеет модулей.

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

org.webjars.npm

Версии библиотеки

Версия
1.2.1