Download files with goto in playwright-python

Viewed 39

Is there a way to download a file by going straight to its download link with goto in playwright-python?

async with page.expect_download(timeout=420000) as download_info:
        await page.goto(f'https://example.com/gateway/reports/{id}/file')

Download = await download_info.value
await Download.save_as(Download.suggested_filename)
0 Answers
Related