0

I found the following link

how to handle file downlaod for selenium webdriver for safari

where it is mentioned to use the following code:

dc.setCapability("safari.options.dataDir", "your folder path");

This code needs to give the path in advance.

What should I do if I want the option to prompt the user to input the file path everytime while downloading file?

My path can change for each and every file to be downloaded.

Community
  • 1
  • 1
Anirban Saha
  • 51
  • 1
  • 14
  • Selenium does not provide facilities for this. You have to use whatever means the OS and your GUI toolkits provide to you. It could be a text prompt in a command line window or a full-featured file selector. The list of possibilities is huge. – Louis Mar 05 '15 at 12:09
  • I found the following thing in the preferences of Safari (a) Save downloaded files to (b) Always prompt before downloading. But even if the user keep it like this, it won't ask for location every time. Instead of prompting the user for the location every time, it'll just save the file to that particular location. – Anirban Saha Mar 05 '15 at 16:05

0 Answers0