angular / webdriver-manager

A binary manager for E2E testing
MIT License
224 stars 116 forks source link

Version 12.1.5 is not recognizing `sendChromiumCommand` API #395

Closed thomasbottonari closed 5 years ago

thomasbottonari commented 5 years ago

In order to enable downloading files in headless Chrome, you have to issue the following command:

await browser.driver.sendChromiumCommand('Page.setDownloadBehavior', {
    behavior: 'allow',
    downloadPath: folderPath
});

This was working fine for me in v12.1.4, however after updating to v12.1.5 I am seeing the following error. Was this API intentionally removed? I assume no, since this was a patch release and should be backward compatible.

[21:07:30] E/launcher - Error: UnsupportedOperationError: POST /session/17f52afb5b54b83baa46a1dc0a84b4cf/chromium/send_command
Build info: version: '3.141.59', revision: 'e82be7d358', time: '2018-11-14T08:25:53'
System info: host: '0b0437f2f149', ip: '172.18.0.3', os.name: 'Linux', os.arch: 'amd64', os.version: '4.9.125-linuxkit', java.version: '1.8.0_212'
Driver info: driver.version: unknown
    at process._tickCallback (internal/process/next_tick.js:68:7)
From: Task: Custom Command: sendChromiumCommand("Page.setDownloadBehavior", {"behavior":"allow","downloadPath":"/usr/src/app/projects/dashboard/e2e/downloads"})
cnishina commented 5 years ago

This is something that the Chromium / ChromeDriver team is responsible for. Here is a very similar issue https://bugs.chromium.org/p/chromedriver/issues/detail?id=2454&q=sendChromiumCommand&colspec=ID%20Status%20Pri%20Owner%20Summary

Closing this since webdriver-manager does not ensure APIs are consistently working. This project just is responsible for downloading and starting the server.