Anybody have idea how to test file download using cucumber?
On chrome I do it by opening the page: chrome://downloads
and then use the shadow dom to retrieve the downloaded files:
document
.querySelector('downloads-manager')
.shadowRoot.querySelector('#downloads-list')
.getElementsByTagName('downloads-item');
The downloaded files list also contain information such as file path and download date.