how can I drag and drop local file with selenium C#? It is possible?
Asked
Active
Viewed 506 times
2
-
1You could accomplish this with AutoIT. Selenium does not interact with windows objects. https://www.autoitscript.com/forum/topic/122881-files-drag-drop/ – Dazed Jan 20 '17 at 02:02
-
is there a browse button from which you can select the directory and select that file? – kkakroo Oct 29 '17 at 16:21
-
Selenium to my knowledge is to perform interactions on your browser alone so you will not be able to perform desktop environment interactions – Naveen Dennis May 09 '18 at 05:48
-
Possible duplicate of [Selenium: Drag and Drop from file system to webdriver?](https://stackoverflow.com/questions/38829153/selenium-drag-and-drop-from-file-system-to-webdriver) – Bradley Grainger Aug 21 '18 at 18:52
1 Answers
1
Yes it is possible in Selenium with C# for web element.you can use below code
Action.ClickAndHold(onElement);
Action.MoveToElement(toElement);
Action.Release(toElement);
Action.Build().Perform();

Bussller
- 1,961
- 6
- 36
- 50

Rakesh K singh
- 29
- 2