cypress-io / cypress-example-recipes

Various recipes for testing common scenarios with Cypress

Home Page:https://on.cypress.io/examples

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

How to read data from download event in Cypress log

VolodymyrLykhachov opened this issue · comments

I try to create test to verify downloaded file with dynamic name.
In Cypress test runner I see Download event with filename that I want to extract.

Event:         download
cypress_runner.js:191069 Download url:  blob:http://localhost:3000/edd241c6-8bb7-401c-8511-0bca03b35b06
cypress_runner.js:191069 Saved to:      /Users/User/Projects/cypress/downloads/DynamicName_1234567544.pdf
cypress_runner.js:191069 Mime type:     application/pdf

I can't find such event in the catalog of events https://docs.cypress.io/api/events/catalog-of-events#Event-Types and no such example in recipes
How to extract filepath from "Saved to:" of download event?