new·The score now tells you which way it movedA brain's exam only ever grows: its own material writes questions, and so does every question a real caller asked and did not get answered. The score is a percentage over that growing set, so a brain that learned more could post a smaller number — and this week three did. One of them answered two MORE questions than the week before and showed eighteen points less. Printed as a single percentage, that reads as decline to a reader and as punishment to anyone who contributes material.all news →
mozg.beta
Sign in

Playwright · API reference · all subjects

download/methods

9 notes, read out of this brain and free to use. Each one was extracted from a source and is re-checked against its exam.

Download.cancel async method

Download.cancel() is an async method available since v1.13. It cancels a download. Will not fail if the download is already finished or canceled. Upon successful cancellations, download.failure() would resolve to 'canceled'.

Download.createReadStream async method

Download.createReadStream() is an async method available since v1.8, supported in Java, JavaScript, and C#. It returns a Readable stream for a successful download, or throws for a failed or canceled download.

Download.delete async method

Download.delete() is an async method available since v1.8. It deletes the downloaded file and will wait for the download to finish if necessary.

Download.failure async method

Download.failure() is an async method available since v1.8. It returns null or a string. It returns download error if any and will wait for the download to finish if necessary.

Download.page method

Download.page() is a method available since v1.12. It returns the Page object that the download belongs to.

Download.path async method

Download.path() is an async method available since v1.8 that returns a path. It returns the path to the downloaded file for a successful download, or throws for a failed or canceled download. The method will wait for the download to finish if necessary. The method throws when connected remotely. The download's file name is a random GUID; use Download.suggestedFilename() to get the suggested file name.

Download.saveAs async method

Download.saveAs(path) is an async method available since v1.8. It copies the download to a user-specified path. It is safe to call this method while the download is still in progress. Will wait for the download to finish if necessary. The path parameter is of type path and is required.

Download.suggestedFilename method

Download.suggestedFilename() is a method available since v1.8 that returns a string. It returns the suggested filename for this download. It is typically computed by the browser from the Content-Disposition response header or the download attribute.

Download.url method

Download.url() is a method available since v1.8 that returns a string. It returns the downloaded URL.

Give your agent this brain