# Cannot download file when running chrome in headless

**URL:** <https://forum.robotframework.org/t/cannot-download-file-when-running-chrome-in-headless/7524>\
**Category:** SeleniumLibrary\
**Created:** [8 July 2024 08:24 UTC](https://forum.robotframework.org/t/cannot-download-file-when-running-chrome-in-headless/7524 "2024-07-08T08:24:07Z")\
**Posts on this page:** 1\
**Showing post:** 2

<div class="post-metadata">

**Author:** ![damies13](https://dub1.discourse-cdn.com/flex005/user_avatar/forum.robotframework.org/damies13/32/623_2.png) [@damies13](https://forum.robotframework.org/u/damies13)\
**Post date:** [8 July 2024 08:59 UTC](https://forum.robotframework.org/t/cannot-download-file-when-running-chrome-in-headless/7524/2 "2024-07-08T08:59:53Z")

</div>

Hi Ronald,

I’m no expert on this, however this thread might help:

> [@Print to PDF Question](https://forum.robotframework.org/t/print-to-pdf-question/6943/4):
>
> Hi, It’s not a keyword it’s chrome startup option. Found several issues on forums and all, but finally this worked for me : ${browser\_prefs} Create Dictionary download.default\_directory=\_yourfolder plugins.always\_open\_pdf\_externally=${True} ${chrome\_options}= Evaluate sys.modules['selenium.webdriver'].ChromeOptions() sys, selenium.webdriver Call Method ${chrome\_options} add\_argument --log-level\=3 Call Method ${chrome\_options} add\_experimental\_option pref…

Dave.

---

_[View the full topic](https://forum.robotframework.org/t/cannot-download-file-when-running-chrome-in-headless/7524)._
