PDF report or Excel report download test is not working in headless execution

We have a page where we have to verify pdf report and excel reports. But while running as headless, reports are not getting downloaded.

Hi @sheena.ignacious,
Please view this answer from another topic as it should fit your case as well:

If it doesn’t work, try to use these capabilities:

{
  "goog:chromeOptions": {
    "experimentalOptions": {
      "prefs": {
        "download": {
          "default_directory": "C:\\Users\\Admin\\Downloads"
        }
      }
    }
  }
}