1

I need the javascript (nodejs) version of the following code (Python) using WebdriverIO:

from selenium import webdriver

with open("drag_and_drop_helper.js") as f:
js = f.read()

driver.execute_script(js + "$('#one').simulateDragDrop({ dropTarget: '#bin'});")

Here are the complete Python and Ruby implementations for further reference.

1 Answer 1

0

With a working webdriver you can use:

driver.actions().dragAndDrop(driver.findElement(webdriver.By.id('none')),driver.findElement(webdriver.By.id('bin'))).perform();

Sign up to request clarification or add additional context in comments.

1 Comment

@Raisus did you find a solution?

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.