Unable to download a file when using in headless mode (selenium, chromedriver)
Reported by
w.derin...@gmail.com,
Dec 18
|
|||
Issue description
UserAgent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/71.0.3578.98 Safari/537.36
Steps to reproduce the problem:
ChromeDriver: u'2.45.615291'
Chrome: u'71.0.3578.98'
Selenium: 3.14.0
Programmatically using selenium in python.
1. Navigate to a webpage
2. Click on UI element responsible for downloading a image.
What is the expected behavior?
Image file does not download.
When executed exactly the same code not in headless, file downloads successfully.
What went wrong?
File does not download at all.
Did this work before? N/A
Chrome version: 71.0.3578.98 Channel: stable
OS Version: 10.0
Flash Version:
Tried few suggestion from SO and other sources i.e. added experimental options to disable prompt.
options = webdriver.ChromeOptions()
prefs = {"download.default_directory": download_folder,
"download.prompt_for_download": False,
"download.directory_upgrade": True,
"safebrowsing.enabled": True}
options.add_experimental_option("prefs", prefs)
options.add_argument("--headless") # jenkins requires this to be headless, no UI available there
driver = webdriver.Chrome(executable_path='chromedriver', options=options)
,
Dec 19
w.deringer@ Thanks for the issue. This issue is out of scope of triaging at TE end as this issue is related to Chrome Driver and Selenium. Hence adding 'TE-NeedsTriageHelp' label and requesting the appropriate team to look into the issue and help in further triaging. Thanks..
,
Dec 19
We're encountering the same problem on Windows, using the C# Selenium library. All subsequent requests to the browser after a file download is initiated will fail with "chrome not reachable". Note that our file download tests have been running without problems for some time and only started failing after Chrome was upgraded to version 71. This happened just before midnight local time, when no developers were pushing code or making any other changes. Our versions are the same as the original poster's: ChromeDriver: 2.45.615291. Chrome: 71.0.3578.98. Note that I suspect this StackOverflow issue may be related: https://stackoverflow.com/questions/53738473/protractor-test-cases-execution-fails-when-try-to-run-on-headless-chrome-v71
,
Dec 20
,
Jan 7
,
Jan 11
when can we expect this defect to be fixed?
,
Jan 17
(6 days ago)
will this be solved
,
Jan 17
(5 days ago)
We also encounter this issue, both on Windows and Linux. This regression is a blocker for running our automated test suite, since the first test with a download breaks all subsequent tests with a "chrome not reachable" error. On our CI server, our current workaround is to fixate Chrome to the previous version. But on our developer machines Chrome auto-updates itself, making headless test runs impossible. |
|||
►
Sign in to add a comment |
|||
Comment 1 by gov...@chromium.org
, Dec 19