3

I need to download a file (the url is a mp3 file) using selenium webdriver, using chrome. When I get that URL, the mp3 starts playing without downloading, is there any way to download? I need to download it through a proxy

Leo
  • 1,829
  • 4
  • 27
  • 51
Achintha
  • 51
  • 1
  • 6

1 Answers1

0

It could have been more helpful if you had provided the url. I believe it would be something like: https://www.website.com/records/filename.mp3

Remove the file name and reach the url: https://www.website.com/records/

Now there should be a webelement upon clicking which downloads the mp3. So you could perform a click action there.

Edit: In the URL, which leads directly to playing mp3 file, there should be a context click(right click) option from where you can save the file. You could automate the same in Selenium using 'Actions' class, move arrow down and click on the option to save it.

ashwinin
  • 81
  • 5