0

Without using test framework i have to write this test case to drag and drop to upload the image. please help me if any one know this stuff.If any framework is available also let me know please.

  • Please edit your post to give more information: we need to know what you've tried, what went wrong, and the source code of the website you are trying to automate. – Kate Paulk Jul 26 '18 at 11:27
  • use Sikuli to automate the desktop action as i guess you are dragging an image from desktop and uploading to web. or you can refer some new github.com/octalmage/robotjs – NarendraR Jul 26 '18 at 11:51
  • You want to write something without a test framework and then you're asking for a framework. Isn't this opposite of each other? – demouser123 Jul 26 '18 at 14:36
0

here is my code that i used to drag elements from one area to another, the only thing that you would need to do is figure out what you would define as 'elementDestination' which can be an area of another element or co-ordinates for the page.

driver.actions().mouseDown(elementID).perform();
    driver.actions(elementID).mouseMove(elementDestination).perform();
    driver.actions().mouseUp(elementID).perform();

I have defined my driver like so:

const webDriver = require ('selenium-webdriver'); 
const driver = new webDriver.Builder().forBrowser('chrome').build();

Let me know if this helps.

edit: just realised OP doesnt want to automate.. lol

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.