{"_id":"@acring/html-dnd","_rev":"2-a3e7ac3eb786bab14ffb50c638b0b29c","name":"@acring/html-dnd","dist-tags":{"latest":"1.2.2"},"versions":{"1.2.1":{"name":"@acring/html-dnd","version":"1.2.1","description":"HTML Drag and Drop Simulator for E2E testing","keywords":["drag","drop","dnd","test","webdriver"],"main":"lib/index.js","devDependencies":{"chai":"^3.5.0","dotenv":"^2.0.0","eslint":"^2.7.0","karma":"^0.13.22","karma-chai":"^0.1.0","karma-chrome-launcher":"^0.2.3","karma-cli":"^0.1.2","karma-coverage":"^0.5.5","karma-firefox-launcher":"^0.1.7","karma-mocha":"^0.2.2","karma-mocha-reporter":"^2.0.0","karma-sauce-launcher":"^0.3.1","lodash":"^4.10.0","mocha":"^2.4.5","nightwatch":"^0.8.18","npm-run-all":"^1.8.0","phantomjs-prebuilt":"^2.1.7","selenium-server-standalone-jar":"2.53.0","selenium-webdriver":"^2.53.1","tslint":"^3.8.1","typescript":"^1.8.10","typings":"^0.8.1"},"scripts":{"build":"npm-run-all build:*","build:typescript":"tsc","lint":"npm-run-all lint:*","lint:js":"eslint lib test","lint:typescript":"tslint src/**/*.ts","pretest":"npm-run-all lint build","test":"npm-run-all unit:* e2e:*","unit:node":"mocha test/unit/node/**/*.js","unit:browser":"karma start karma.conf.js","e2e:selenium-webdriver":"mocha test/e2e/selenium-webdriver/**/*.js","e2e:nightwatch":"nightwatch --config test/e2e/nightwatch/nightwatch.json","prepublish":"npm-run-all build"},"author":{"name":"Kuniwak"},"license":"MIT","dependencies":{"multiline":"^1.0.2"},"directories":{"test":"test"},"repository":{"type":"git","url":"git+https://github.com/Kuniwak/html-dnd.git"},"bugs":{"url":"https://github.com/Kuniwak/html-dnd/issues"},"typings":"html-dnd.d.ts","homepage":"https://github.com/Kuniwak/html-dnd#readme","gitHead":"4f46701063cad599947c3fee650b45feeacc51ad","_id":"@acring/html-dnd@1.2.1","_nodeVersion":"14.17.3","_npmVersion":"8.5.0","dist":{"integrity":"sha512-frv1331LRHAZkr2+6mEudykh0X6YFLuiErfNsVR8V/pJruw6VG5w+RztSYUQjK60CicjBSaz6E6nldpX8lXGhw==","shasum":"33f3b6edb36f0791003a0b1913e25203a7e31113","tarball":"https://registry.npmjs.org/@acring/html-dnd/-/html-dnd-1.2.1.tgz","fileCount":15,"unpackedSize":36156,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJiCcQZCRA9TVsSAnZWagAA5bAP/1Mdb7oS5MQ3BqddArd9\nZ4WFgEyr0ScSY3Qd0Ffc90pNa8b4eDZeI0Wcf4qw3Q6LRpeqy+lTIJzwezW0\n+ISiyE53eYfZ7VwI5bcqQ+DuQIyjgk0VsD73tAX5TP0CCtNVxtIyeOYLAf5d\np0jgfY1Sap+ZgRJMKNGchXApLls9GvK/qccnruAtlsTXPnJfbFJLtYY3umFv\nb7fv71Qy79T2YpGzx8Q3pdoUo30RvKv5j9KD///35r1WYZ8lKz8W21vciCMh\nNZtHhNz9wsKuI6hG2Pc0qu2TaJ9FJT1GFxeGWEve802QIvNs5ophF1obTQiF\npXDCRQ6RE06HjYXI6pglnXfo/ACQdfQ2n4NDzBiU+PWWS+E84c4p0YPDsND6\nFuesAErE6Sr0YrWT8E4oV2UchJBcwLDRjwm+l/BmWsKDTysQ/fipDDjSS2H8\nMsoNv8KR8On/k+iF4Nf9jPRz5dBtrigW8ZjKrnht+XpvqNVyh+hIG2zPhlMm\nK5jkeCGZfhPz37uIpR+rRRCcTarHC7dh4zP1V1uaIsloc0tMw/1H9U7eSP7G\nntye4mXBJ6NsXpGr+iDE3oDyoDNtlX/T2Sr/Y+8ZpVkFeJrmaVO9tqpN052m\nPowrqHaQCZqxyB/AF1alEX8Hi9ob40WShPWk+1RRSEvLcjF/ueFIc73wFxoB\nPS/y\r\n=0qfn\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIH71Bk0fofIVx/0MZpqXf0l+bhPhbowMNUTe4EzUYYKHAiBUHcM1Yo6pczjHshPF+d8EcbO45LZfTeHqIlLW1zQi8Q=="}]},"_npmUser":{"name":"acring","email":"392398434@qq.com"},"maintainers":[{"name":"acring","email":"392398434@qq.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/html-dnd_1.2.1_1644807193076_0.4743852546885192"},"_hasShrinkwrap":false},"1.2.2":{"name":"@acring/html-dnd","version":"1.2.2","description":"HTML Drag and Drop Simulator for E2E testing","keywords":["drag","drop","dnd","test","webdriver"],"main":"lib/index.js","devDependencies":{"chai":"^3.5.0","dotenv":"^2.0.0","eslint":"^2.7.0","karma":"^0.13.22","karma-chai":"^0.1.0","karma-chrome-launcher":"^0.2.3","karma-cli":"^0.1.2","karma-coverage":"^0.5.5","karma-firefox-launcher":"^0.1.7","karma-mocha":"^0.2.2","karma-mocha-reporter":"^2.0.0","karma-sauce-launcher":"^0.3.1","lodash":"^4.10.0","mocha":"^2.4.5","nightwatch":"^0.8.18","npm-run-all":"^1.8.0","phantomjs-prebuilt":"^2.1.7","selenium-server-standalone-jar":"2.53.0","selenium-webdriver":"^2.53.1","tslint":"^3.8.1","typescript":"^1.8.10","typings":"^0.8.1"},"scripts":{"build":"npm-run-all build:*","build:typescript":"tsc","lint":"npm-run-all lint:*","lint:js":"eslint lib test","lint:typescript":"tslint src/**/*.ts","pretest":"npm-run-all lint build","test":"npm-run-all unit:* e2e:*","unit:node":"mocha test/unit/node/**/*.js","unit:browser":"karma start karma.conf.js","e2e:selenium-webdriver":"mocha test/e2e/selenium-webdriver/**/*.js","e2e:nightwatch":"nightwatch --config test/e2e/nightwatch/nightwatch.json","prepublish":"npm-run-all build"},"author":{"name":"Kuniwak"},"license":"MIT","dependencies":{"multiline":"^1.0.2"},"directories":{"test":"test"},"repository":{"type":"git","url":"git+https://github.com/Kuniwak/html-dnd.git"},"bugs":{"url":"https://github.com/Kuniwak/html-dnd/issues"},"typings":"html-dnd.d.ts","homepage":"https://github.com/Kuniwak/html-dnd#readme","gitHead":"4f46701063cad599947c3fee650b45feeacc51ad","_id":"@acring/html-dnd@1.2.2","_nodeVersion":"14.17.3","_npmVersion":"8.5.0","dist":{"integrity":"sha512-csFODlymv7Z+a5ZcvwKpk171R6zd3YCS3SDwAbbeO6ztW0iEg5VPd6Fs4u/XpbpGjX/3k48YJyVztBBGGRuH0A==","shasum":"b0035ed3832982132f4d17b9eebbf0b52e89d840","tarball":"https://registry.npmjs.org/@acring/html-dnd/-/html-dnd-1.2.2.tgz","fileCount":17,"unpackedSize":39948,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJiCcRACRA9TVsSAnZWagAAgosP/iJuERR1+FtdEnjJ5lIp\nHjA8aQ12rZSjpcjA842WL4a1U4JR8UMHvFhzKFLG9kVM8G4NAiNhd1RcPUzc\nQc8BFTugklXYy6XsQt3cGGCUMHDot8c2RZAM4FcH/iScwu20QCWtngvFxnry\n7h2SX47CbAwBSKkEMt7M+oSiPtOdJq6jezyaATxuWirWLMlvJucSoIuWblRB\nRlhcRlWgHGRqgGM/JUIPot6cwpcnG0oB1sZCJmaysiAQOig9cSCXilxPK8+N\nB58Tnt8Qgj2r6aOOG4Samb20S5YBQe2mKVeltN1ijvtrbT3fk2ZP9CKCUgwn\nBxOlRmjmoYgv2Nh2MzZbVTkVro3uqbzWS1/eUf1P/SQ46ugLgZd4Hcxeteiy\nTgrMhddBCzbBk5sbcWu9oeYes6wySaG6q4U9GecVslorm25t6mzz+sUtp82h\nwww0rK2Zj/NBwYRQ/cGygIdMn0mEwEfgpzTp2F7swV3zdma/G4g5r3lm74rJ\nC8iIq0vjdusWXckpL2pyPx3UdPWa5TEZ12u6vKLZWM+n44/M/DBO5Jr7PBpX\nypDsrOfsA2q5POhTIyJdxkOm4CeE36splGuDgqvBUHcagwT8ZJ+HGOhY/nIM\nznW2ZtmEOX01bQajdIEys5+weJF4nzSSCWERoXYs75iT40Bg33fpTiH9zJ21\n656G\r\n=n5KZ\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIBeA/4HjGckwoFTzUdvpLHNzYxHQr8BmPaRPfVVwEkpuAiEA+d4km8UkOMZ4CGmRXleKSQXVamhKgUU0EJIEvql2xBU="}]},"_npmUser":{"name":"acring","email":"392398434@qq.com"},"maintainers":[{"name":"acring","email":"392398434@qq.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/html-dnd_1.2.2_1644807232854_0.5443369161036129"},"_hasShrinkwrap":false}},"time":{"created":"2022-02-14T02:53:13.021Z","1.2.1":"2022-02-14T02:53:13.224Z","modified":"2022-04-04T11:16:18.140Z","1.2.2":"2022-02-14T02:53:52.968Z"},"maintainers":[{"name":"acring","email":"392398434@qq.com"}],"description":"HTML Drag and Drop Simulator for E2E testing","homepage":"https://github.com/Kuniwak/html-dnd#readme","keywords":["drag","drop","dnd","test","webdriver"],"repository":{"type":"git","url":"git+https://github.com/Kuniwak/html-dnd.git"},"author":{"name":"Kuniwak"},"bugs":{"url":"https://github.com/Kuniwak/html-dnd/issues"},"license":"MIT","readme":"HTML Drag and Drop Simulator\n============================\n[![Circle CI](https://circleci.com/gh/Kuniwak/html-dnd.svg?style=shield)](https://circleci.com/gh/Kuniwak/html-dnd)\n[![npm version](https://badge.fury.io/js/html-dnd.svg)](http://badge.fury.io/js/html-dnd)\n\n[HTML Drag and Drop](https://html.spec.whatwg.org/multipage/interaction.html#dnd) Simulator for E2E testing.\n\nNow, [WebDriver](http://www.w3.org/TR/webdriver/) cannot handle HTML Drag and Drop.\nThis module can simulate the HTML Drag and Drop by using the [Execute Script command](http://www.w3.org/TR/webdriver/#execute-script).\n\nThis module is like [rcorreia/drag_and_drop_helper.js](https://gist.github.com/rcorreia/2362544), but it does not require jQuery.\n\n\nInstall\n-------\n```shell\nnpm install --save-dev html-dnd\n```\n\n\nCompatibility\n-------------\n[![Sauce Test Status](https://saucelabs.com/browser-matrix/html-dnd.svg)](https://saucelabs.com/u/html-dnd)\n\n\nUsage\n-----\n### For selenium-webdriver\n\n```javascript\nvar dragAndDrop = require('html-dnd').code;\nvar webdriver = require('selenium-webdriver');\nvar By = webdriver.By;\n\nvar driver = new webdriver.Builder()\n  .forBrowser('firefox')\n  .build();\n\ndriver.get('http://example.com');\n\nvar draggable = driver.findElement(By.id('draggable'));\nvar droppable = driver.findElement(By.id('droppable'));\n\ndriver.executeScript(dragAndDrop, draggable, droppable);\n\ndriver.quit();\n```\n\n\n### For Nightwatch.js\n\n```javascript\nvar dragAndDrop = require('html-dnd').codeForSelectors;\n\nmodule.exports = {\n  'drag and drop': function(browser) {\n    browser\n      .url('http://example.com')\n      .execute(dragAndDrop, ['#draggable', '#droppable'])\n      .end();\n  }\n};\n```\n\n\n### For WebdriverIO\n\n```javascript\nvar dragAndDrop = require('html-dnd').codeForSelectors;\nvar webdriverio = require('webdriverio');\nvar options = { desiredCapabilities: { browserName: 'chrome' } };\nvar client = webdriverio.remote(options);\n\nclient\n  .init()\n  .url('http://example.com')\n  .execute(dragAndDrop, '#draggable', '#droppable');\n  .end();\n```\n\n\n### With Typescript\n\n```typescript\nimport {code as dragAndDrop} from 'html-dnd';\n\ndriver.executeScript(dragAndDrop, draggable, droppable);\n```\n\n\n### Only Hover\n\nIn 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\n\n```typescript\nimport {code as dragAndDrop} from 'html-dnd';\n\ndriver.executeScript(dragAndDrop, draggable, droppable, {onlyHover:true, hoverTime:1000});\n```\n\nSee also\n--------\n\n- [Issue 3604: HTML5 Drag and Drop with Selenium Webdriver](https://code.google.com/p/selenium/issues/detail?id=3604)\n\n\nLicense\n-------\n\nMIT (c) 2017 Kuniwak\n","readmeFilename":"README.md"}