Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Unable to download a file when chromedriver is in headless mode. How to get it work?

During the test, a file (.html) will be downloaded from the web application & I have to verify that file by opening it on the browser. In the non-headless mode, my test is working fine. But whenever I'm going to headless mode, that file is not getting downloaded to the download path (i.e. pointed in the "user.dir"). My chrome driver version is 2.44.609538 & selenium version is 3.14.

like image 406
Rishi12 Avatar asked Oct 29 '25 08:10

Rishi12


1 Answers

Apparently this could help you

Shawn Button post the answer related with it.

Downloading with chrome headless and selenium

like image 195
Jerry Brian Osorio Alvarado Avatar answered Oct 31 '25 11:10

Jerry Brian Osorio Alvarado