Skip to content

Instantly share code, notes, and snippets.

View AshanthaLahiru's full-sized avatar
🎯
Focusing

Ashantha Lahiru AshanthaLahiru

🎯
Focusing
View GitHub Profile
@dok
dok / geckodriver.js
Created June 30, 2017 17:51
install, start, selenium-standalone with geckodriver
// npm install [email protected]
var selenium = require('selenium-standalone');
var webdriverio = require('webdriverio');
const version = '3.4.0';
const drivers = { chrome:
{ version: '2.30',
arch: 'x64',
@druska
druska / native_js_drag_and_drop_helper.js
Created August 26, 2015 03:56
Create the `simulateDragDrop` function which can be used to simulate clicking and dragging one DOM Node onto another
function simulateDragDrop(sourceNode, destinationNode) {
var EVENT_TYPES = {
DRAG_END: 'dragend',
DRAG_START: 'dragstart',
DROP: 'drop'
}
function createCustomEvent(type) {
var event = new CustomEvent("CustomEvent")
event.initCustomEvent(type, true, true, null)