-1

I want to save download file in custom location the file using selenium java

ckbharti
  • 19
  • 3
  • I tried Stringselection strselection = new StringSelection("path"); ToolKit.getdeafulttoolkit.setcontents(strselection); Robot robot = new Robot(); and then copy pase. Sometimes it works and sometime not. – ckbharti Oct 03 '18 at 05:35
  • Please clarify your specific problem or add additional details to highlight exactly what you need. As it's currently written, it’s hard to tell exactly what you're asking. See the How to Ask page for help clarifying this question. – cruisepandey Oct 03 '18 at 06:06
  • suppose I clicked on the download button on web page. Its downloading some file and its getting saved at any default location, but before saving the file I want to put the custom path in the explorer to save downloaded file on custom path. – ckbharti Oct 04 '18 at 05:44

1 Answers1

0

For chrome you can set the default directory in capabilities

How to set default download directory in selenium Chrome Capabilities?

Didn't have enough reputation to put it as a comment. :)