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

5 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 class overview

Download objects are dispatched by page via the Page.download event. All downloaded files belonging to the browser context are deleted when the browser context is closed. Download event is emitted once the download starts. Download path becomes available once download completes.

Download example: JavaScript download handling

const downloadPromise = page.waitForEvent('download'); await page.getByText('Download file').click(); const download = await downloadPromise; await download.saveAs('/path/to/save/at/' + download.suggestedFilename());

Download example: Python sync download handling

with page.expect_download() as download_info: page.get_by_text('Download file').click() download = download_info.value download.save_as('/path/to/save/at/' + download.suggested_filename)

Download example: Java download handling

Download download = page.waitForDownload(() -> { page.getByText('Download file').click(); }); download.saveAs(Paths.get('/path/to/save/at/', download.suggestedFilename()));

Download example: C# download handling

var waitForDownloadTask = page.WaitForDownloadAsync(); await page.GetByText('Download file').ClickAsync(); var download = await waitForDownloadTask; await download.SaveAsAsync('/path/to/save/at/' + download.SuggestedFilename);

Give your agent this brain