2

I do acceptance testing with Codeception using WebDriver. I have a button on my page which I can click to download a file. How do I then see the content of the downloads directory? I haven't found any configuration parameter to set up the downloads directory, or a method to access files from the downloads directory. Is it even available in Codeception?

gvlasov
  • 18,638
  • 21
  • 74
  • 110

2 Answers2

2

For Chrome, you can set the download directory in your acceptance.suite.yml:

modules:
    enabled:
        - WebDriver:
            browser: chrome
            capabilities:
                chromeOptions:
                    prefs:
                        download.default_directory: "C:/download"

Haven't tried for Firefox.

Thomas Landauer
  • 7,857
  • 10
  • 47
  • 99
0

Path to downloads directory is configured with Selenium, it is not Codeception's job to provide access to downloaded files.

gvlasov
  • 18,638
  • 21
  • 74
  • 110