Qucs-S S-parameter Viewer & RF Synthesis Tools
Loading...
Searching...
No Matches
Public Member Functions | List of all members
playwright.sync_api._generated.Download Class Reference
Inheritance diagram for playwright.sync_api._generated.Download:
Inheritance graph
[legend]
Collaboration diagram for playwright.sync_api._generated.Download:
Collaboration graph
[legend]

Public Member Functions

"Page" page (self)
 
str url (self)
 
str suggested_filename (self)
 
None delete (self)
 
typing.Optional[str] failure (self)
 
pathlib.Path path (self)
 
None save_as (self, typing.Union[str, pathlib.Path] path)
 
None cancel (self)
 
- Public Member Functions inherited from playwright._impl._sync_base.SyncBase
None __init__ (self, Any impl_obj)
 
str __str__ (self)
 
None on (self, Any event, Any f)
 
None once (self, Any event, Any f)
 
None remove_listener (self, Any event, Any f)
 
- Public Member Functions inherited from playwright._impl._impl_to_api_mapping.ImplWrapper
str __repr__ (self)
 

Additional Inherited Members

- Protected Member Functions inherited from playwright._impl._sync_base.SyncBase
Any _sync (self, Union[Coroutine[Any, Any, Any], Generator[Any, Any, Any]] coro)
 
Callable[..., None] _wrap_handler (self, Union[Callable[..., Any], Any] handler)
 
- Protected Attributes inherited from playwright._impl._sync_base.SyncBase
 _dispatcher_fiber
 
 _loop
 
- Protected Attributes inherited from playwright._impl._impl_to_api_mapping.ImplWrapper
 _impl_obj
 

Member Function Documentation

◆ cancel()

None playwright.sync_api._generated.Download.cancel (   self)
Download.cancel

Cancels a download. Will not fail if the download is already finished or canceled. Upon successful cancellations,
`download.failure()` would resolve to `'canceled'`.

◆ delete()

None playwright.sync_api._generated.Download.delete (   self)
Download.delete

Deletes the downloaded file. Will wait for the download to finish if necessary.

◆ failure()

typing.Optional[str] playwright.sync_api._generated.Download.failure (   self)
Download.failure

Returns download error if any. Will wait for the download to finish if necessary.

Returns
-------
Union[str, None]

◆ page()

"Page" playwright.sync_api._generated.Download.page (   self)
Download.page

Get the page that the download belongs to.

Returns
-------
Page

◆ path()

pathlib.Path playwright.sync_api._generated.Download.path (   self)
Download.path

Returns path to the downloaded file for a successful download, or throws for a failed/canceled download. The method
will wait for the download to finish if necessary. The method throws when connected remotely.

Note that the download's file name is a random GUID, use `download.suggested_filename()` to get suggested
file name.

Returns
-------
pathlib.Path

◆ save_as()

None playwright.sync_api._generated.Download.save_as (   self,
typing.Union[str, pathlib.Path]  path 
)
Download.save_as

Copy 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.

**Usage**

```py
download.save_as(\"/path/to/save/at/\" + download.suggested_filename)
```

Parameters
----------
path : Union[pathlib.Path, str]
    Path where the download should be copied.

◆ suggested_filename()

str playwright.sync_api._generated.Download.suggested_filename (   self)
Download.suggested_filename

Returns suggested filename for this download. It is typically computed by the browser from the
[`Content-Disposition`](https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Content-Disposition) response
header or the `download` attribute. See the spec on [whatwg](https://html.spec.whatwg.org/#downloading-resources).
Different browsers can use different logic for computing it.

Returns
-------
str

◆ url()

str playwright.sync_api._generated.Download.url (   self)
Download.url

Returns downloaded url.

Returns
-------
str

The documentation for this class was generated from the following file: