You might want to use (binary) files in your browser checks. For example, you might want to upload a file to an upload form in your webapp. Or, you might want to validate some aspect of a file that is available for download on your app. Testing downloads with the download event and Download object Playwright has a download event that you can use to intercept downloads. You can also use the Download object to retrieve the contents and metadata of the downloaded file(s).