We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent b381185 commit 2910d5eCopy full SHA for 2910d5e
1 file changed
docs/src/api/class-page.md
@@ -4648,6 +4648,24 @@ Will throw an error if the page is closed before the download event is fired.
4648
* langs: python
4649
- returns: <[EventContextManager]<[Download]>>
4650
4651
+**Usage**
4652
+
4653
+```python async
4654
+async with page.expect_download() as download_info:
4655
+ await page.get_by_text("Download").click()
4656
4657
+download = await download_info.value
4658
+print(download.url)
4659
+```
4660
4661
+```python sync
4662
+with page.expect_download() as download_info:
4663
+ page.get_by_text("Download").click()
4664
4665
+download = download_info.value
4666
4667
4668
4669
### param: Page.waitForDownload.action = %%-csharp-wait-for-event-action-%%
4670
* since: v1.12
4671
0 commit comments