
    Yh                    
   S SK r S SKrS SKrS SKJr  S SKJr  S SKJrJ	r	J
r
JrJrJrJrJrJrJrJrJrJrJrJrJrJrJrJr  S SKJr  S SKJr  S SKJ r!  S SK"J#r#J$r$J%r%J&r&  S S	K'J(r)  S S
K*J+r,  S SK-J.r/  S SK0J1r2  S SK3J4r5  S SK6J7r8  S SK9J:r;  S SK<J=r>  S SK?J@rA  S SKBJCrC  S SKDJErF  S SKDJGrH  S SKDJIrJ  S SKKJLrM  S SKNJOrP  S SKQJRrS  S SKQJTrU  S SKQJVrW  S SKXJYrZ  S SK[J\r]  S SK[J^r_  S SK`Jarb  S SK`Jcrd  S S K`Jerf  S S!K`Jgrh  S S"K`Jirj  S S#KkJlrm  S S$KkJnro  S S%KpJqrr  S S&KsJtru  S S'KvJwrx  S S(KyJzr{  S S)K|J}r~   " S* S+\#5      ra\&R                  " \b\a5         " S, S-\#5      rc\&R                  " \d\c5         " S. S/\#5      re\&R                  " \f\e5         " S0 S1\#5      rg\&R                  " \h\g5         " S2 S3\#5      ri\&R                  " \j\i5         " S4 S5\#5      rR\&R                  " \S\R5         " S6 S7\#5      rT\&R                  " \U\T5         " S8 S9\#5      rV\&R                  " \W\V5         " S: S;\#5      rY\&R                  " \Z\Y5         " S< S=\Y5      r@\&R                  " \A\@5         " S> S?\#5      r\&R                  " \\5         " S@ SA\#5      rL\&R                  " \M\L5         " SB SC\#5      rO\&R                  " \P\O5         " SD SE\#5      r\\&R                  " \]\\5         " SF SG\#5      rn\&R                  " \o\n5         " SH SI\#5      rt\&R                  " \u\t5         " SJ SK\#5      r4\&R                  " \5\45         " SL SM\#5      r7\&R                  " \8\75         " SN SO\#5      r:\&R                  " \;\:5         " SP SQ\#5      r=\&R                  " \>\=5         " SR SS\#5      rz\&R                  " \{\z5         " ST SU\$5      rl\&R                  " \m\l5         " SV SW\#5      r}\&R                  " \~\}5         " SX SY\$5      r+\&R                  " \,\+5         " SZ S[\#5      r1\&R                  " \2\15         " S\ S]\$5      r(\&R                  " \)\(5         " S^ S_\#5      r.\&R                  " \/\.5         " S` Sa\#5      rq\&R                  " \r\q5         " Sb Sc\#5      rw\&R                  " \x\w5         " Sd Se\#5      r^\&R                  " \_\^5         " Sf Sg\#5      rI\&R                  " \J\I5         " Sh Si\#5      rG\&R                  " \H\G5         " Sj Sk\#5      rE\&R                  " \F\E5         " Sl Sm\#5      r \&R                  " \!\ 5         " Sn So\#5      r\&R                  " \\5         " Sp Sq\#5      r\&R                  " \\5        g)r    N)Literal)Accessibility)ClientCertificateCookieFilePayload	FloatRectGeolocationHttpCredentials	NameValue
PdfMarginsPositionProxySettings
RemoteAddrRequestSizesResourceTimingSecurityDetailsSetCookieParamSourceLocationStorageStateTracingGroupLocationViewportSize)APIResponseAssertions)LocatorAssertions)PageAssertions)	AsyncBaseAsyncContextManagerAsyncEventContextManagermapping)Browser)BrowserContext)BrowserType)
CDPSession)Clock)ConsoleMessage)Dialog)Download)ElementHandle)Error)
APIRequest)APIRequestContext)APIResponse)FileChooser)Frame)Keyboard)Mouse)Touchscreen)JSHandle)FrameLocator)Locator)Request)Response)Route)	WebSocket)WebSocketRoute)Page)Worker)
Playwright)	Selectors)Tracing)Video)WebErrorc                      \ rS rSr\S\4S j5       r\S\4S j5       r\S\4S j5       r\S\	R                  \   4S j5       r\S\	R                  \	R                     4S j5       r\S\	R                  \   4S j5       r\SS	 j5       r\S\	R                  S    4S
 j5       r\S\	R                  S    4S j5       r\S\	R                  \   4S j5       r\S\4S j5       r\S\	R,                  \\4   4S j5       rS\4S jrS\	R                  S   4S jrS\4S jrS\	R,                  \\4   4S jrS\	R<                  \   4S jr S\S\	R                  \   4S jr!Sr"g)r4   Y   returnc                 V    [         R                  " U R                  R                  5      $ )z6Request.url

URL of the request.

Returns
-------
str
r   from_maybe_impl	_impl_objurlselfs    Q/var/www/html/env/lib/python3.13/site-packages/playwright/async_api/_generated.pyrG   Request.url[        &&t~~'9'9::    c                 V    [         R                  " U R                  R                  5      $ )a5  Request.resource_type

Contains the request's resource type as it was perceived by the rendering engine. ResourceType will be one of the
following: `document`, `stylesheet`, `image`, `media`, `font`, `script`, `texttrack`, `xhr`, `fetch`,
`eventsource`, `websocket`, `manifest`, `other`.

Returns
-------
str
)r   rE   rF   resource_typerH   s    rJ   rO   Request.resource_typeg   s     &&t~~'C'CDDrM   c                 V    [         R                  " U R                  R                  5      $ )zHRequest.method

Request's method (GET, POST, etc.)

Returns
-------
str
)r   rE   rF   methodrH   s    rJ   rR   Request.methodu        &&t~~'<'<==rM   c                 V    [         R                  " U R                  R                  5      $ )zRRequest.post_data

Request's post body, if any.

Returns
-------
Union[str, None]
)r   rE   rF   	post_datarH   s    rJ   rV   Request.post_data   s     &&t~~'?'?@@rM   c                 V    [         R                  " U R                  R                  5      $ )a$  Request.post_data_json

Returns parsed request's body for `form-urlencoded` and JSON as a fallback if any.

When the response is `application/x-www-form-urlencoded` then a key/value object of the values will be returned.
Otherwise it will be parsed as JSON.

Returns
-------
Union[Any, None]
)r   rE   rF   post_data_jsonrH   s    rJ   rY   Request.post_data_json   s     &&t~~'D'DEErM   c                 V    [         R                  " U R                  R                  5      $ )zlRequest.post_data_buffer

Request's post body in a binary form, if any.

Returns
-------
Union[bytes, None]
)r   rE   rF   post_data_bufferrH   s    rJ   r\   Request.post_data_buffer   s     &&t~~'F'FGGrM   c                 V    [         R                  " U R                  R                  5      $ )a  Request.frame

Returns the `Frame` that initiated this request.

**Usage**

```py
frame_url = request.frame.url
```

**Details**

Note that in some cases the frame is not available, and this method will throw.
- When request originates in the Service Worker. You can use `request.serviceWorker()` to check that.
- When navigation request is issued before the corresponding frame is created. You can use
  `request.is_navigation_request()` to check that.

Here is an example that handles all the cases:

Returns
-------
Frame
r   	from_implrF   framerH   s    rJ   ra   Request.frame   s    2   !5!566rM   c                 V    [         R                  " U R                  R                  5      $ )a5  Request.redirected_from

Request that was redirected by the server to this one, if any.

When the server responds with a redirect, Playwright creates a new `Request` object. The two requests are connected
by `redirectedFrom()` and `redirectedTo()` methods. When multiple server redirects has happened, it is possible to
construct the whole redirect chain by repeatedly calling `redirectedFrom()`.

**Usage**

For example, if the website `http://example.com` redirects to `https://example.com`:

```py
response = await page.goto("http://example.com")
print(response.request.redirected_from.url) # "http://example.com"
```

If the website `https://google.com` has no redirects:

```py
response = await page.goto("https://google.com")
print(response.request.redirected_from) # None
```

Returns
-------
Union[Request, None]
)r   from_impl_nullablerF   redirected_fromrH   s    rJ   re   Request.redirected_from   s    < ))$..*H*HIIrM   c                 V    [         R                  " U R                  R                  5      $ )a  Request.redirected_to

New request issued by the browser if the server responded with redirect.

**Usage**

This method is the opposite of `request.redirected_from()`:

```py
assert request.redirected_from.redirected_to == request
```

Returns
-------
Union[Request, None]
)r   rd   rF   redirected_torH   s    rJ   rh   Request.redirected_to   s    $ ))$..*F*FGGrM   c                 V    [         R                  " U R                  R                  5      $ )a.  Request.failure

The method returns `null` unless this request has failed, as reported by `requestfailed` event.

**Usage**

Example of logging of all the failed requests:

```py
page.on("requestfailed", lambda request: print(request.url + " " + request.failure))
```

Returns
-------
Union[str, None]
r   rE   rF   failurerH   s    rJ   rl   Request.failure   s    $ &&t~~'='=>>rM   c                 V    [         R                  " U R                  R                  5      $ )a  Request.timing

Returns resource timing information for given request. Most of the timing values become available upon the
response, `responseEnd` becomes available when request finishes. Find more information at
[Resource Timing API](https://developer.mozilla.org/en-US/docs/Web/API/PerformanceResourceTiming).

**Usage**

```py
async with page.expect_event("requestfinished") as request_info:
    await page.goto("http://example.com")
request = await request_info.value
print(request.timing)
```

Returns
-------
{startTime: float, domainLookupStart: float, domainLookupEnd: float, connectStart: float, secureConnectionStart: float, connectEnd: float, requestStart: float, responseStart: float, responseEnd: float}
)r   r`   rF   timingrH   s    rJ   ro   Request.timing  s    *   !6!677rM   c                 V    [         R                  " U R                  R                  5      $ )a?  Request.headers

An object with the request HTTP headers. The header names are lower-cased. Note that this method does not return
security-related headers, including cookie-related ones. You can use `request.all_headers()` for complete
list of headers that include `cookie` information.

Returns
-------
Dict[str, str]
r   rE   rF   headersrH   s    rJ   rs   Request.headers"       &&t~~'='=>>rM   c                 z   #    [         R                  " U R                  R                  5       I Sh  vN 5      $  N7f)zRequest.sizes

Returns resource size information for given request.

Returns
-------
{requestBodySize: int, requestHeadersSize: int, responseBodySize: int, responseHeadersSize: int}
N)r   r`   rF   sizesrH   s    rJ   rw   Request.sizes0  s+        t~~';';'=!=>>!=   .;9	;r5   c                 z   #    [         R                  " U R                  R                  5       I Sh  vN 5      $  N7f)zRequest.response

Returns the matching `Response` object, or `null` if the response was not received due to error.

Returns
-------
Union[Response, None]
N)r   rd   rF   responserH   s    rJ   r{   Request.response<  s+      ))0G0G0I*IJJ*Iry   c                 ^    [         R                  " U R                  R                  5       5      $ )zRequest.is_navigation_request

Whether this request is driving frame's navigation.

Some navigation requests are issued before the corresponding frame is created, and therefore do not have
`request.frame()` available.

Returns
-------
bool
)r   rE   rF   is_navigation_requestrH   s    rJ   r~   Request.is_navigation_requestH  s"     &&t~~'K'K'MNNrM   c                 z   #    [         R                  " U R                  R                  5       I Sh  vN 5      $  N7f)zRequest.all_headers

An object with all the request HTTP headers associated with this request. The header names are lower-cased.

Returns
-------
Dict[str, str]
Nr   rE   rF   all_headersrH   s    rJ   r   Request.all_headersW  +      &&T^^-G-G-I'IJJ'Iry   c                 z   #    [         R                  " U R                  R                  5       I Sh  vN 5      $  N7f)a*  Request.headers_array

An array with all the request HTTP headers associated with this request. Unlike `request.all_headers()`,
header names are NOT lower-cased. Headers with multiple entries, such as `Set-Cookie`, appear in the array multiple
times.

Returns
-------
List[{name: str, value: str}]
Nr   from_impl_listrF   headers_arrayrH   s    rJ   r   Request.headers_arrayc  +      %%DNN,H,H,J&JKK&Jry   namec                 x   #    [         R                  " U R                  R                  US9I Sh  vN 5      $  N7f)zRequest.header_value

Returns the value of the header matching the name. The name is case-insensitive.

Parameters
----------
name : str
    Name of the header.

Returns
-------
Union[str, None]
r   Nr   rE   rF   header_valuerI   r   s     rJ   r   Request.header_valueq  s0      &&T^^-H-Hd-H-S'STT'S   -:8	: NrB   r-   )#__name__
__module____qualname____firstlineno__propertystrrG   rO   rR   typingOptionalrV   AnyrY   bytesr\   ra   re   rh   rl   r   ro   Dictrs   r   rw   r{   boolr~   r   Listr   r   r   __static_attributes__r   rM   rJ   r4   r4   Y   s   	;S 	; 	; Es E E 	> 	> 	> 	A6??3/ 	A 	A F

 ; F F 	H&//%"8 	H 	H 7 74 J!; J J> Hvy9 H H& ?- ? ?& 8 8 8, ?S#X. ? ?
?\ 
?
K
 ; 
KOt O
K6;;sCx#8 
KLV[[%; LUs Uvs/C UrM   r4   c                   .   \ rS rSr\S\4S j5       r\S\4S j5       r\S\	4S j5       r
\S\4S j5       r\S\R                  \\4   4S j5       r\S\4S j5       r\SS	 j5       r\SS
 j5       rS\R                  \\4   4S jrS\R&                  \   4S jrS\S\R,                  \   4S jrS\S\R&                  \   4S jrS\R,                  \   4S jrS\R,                  \   4S jrSS jrS\4S jrS\4S jr S\RB                  4S jr"Sr#g)r5   i  rB   c                 V    [         R                  " U R                  R                  5      $ )zEResponse.url

Contains the URL of the response.

Returns
-------
str
rD   rH   s    rJ   rG   Response.url  rL   rM   c                 V    [         R                  " U R                  R                  5      $ )zResponse.ok

Contains a boolean stating whether the response was successful (status in the range 200-299) or not.

Returns
-------
bool
r   rE   rF   okrH   s    rJ   r   Response.ok       &&t~~'8'899rM   c                 V    [         R                  " U R                  R                  5      $ )zjResponse.status

Contains the status code of the response (e.g., 200 for a success).

Returns
-------
int
r   rE   rF   statusrH   s    rJ   r   Response.status  rT   rM   c                 V    [         R                  " U R                  R                  5      $ )zzResponse.status_text

Contains the status text of the response (e.g. usually an "OK" for a success).

Returns
-------
str
r   rE   rF   status_textrH   s    rJ   r   Response.status_text       &&t~~'A'ABBrM   c                 V    [         R                  " U R                  R                  5      $ )aB  Response.headers

An object with the response HTTP headers. The header names are lower-cased. Note that this method does not return
security-related headers, including cookie-related ones. You can use `response.all_headers()` for complete
list of headers that include `cookie` information.

Returns
-------
Dict[str, str]
rr   rH   s    rJ   rs   Response.headers  ru   rM   c                 V    [         R                  " U R                  R                  5      $ )zResponse.from_service_worker

Indicates whether this Response was fulfilled by a Service Worker's Fetch Handler (i.e. via
[FetchEvent.respondWith](https://developer.mozilla.org/en-US/docs/Web/API/FetchEvent/respondWith)).

Returns
-------
bool
)r   rE   rF   from_service_workerrH   s    rJ   r   Response.from_service_worker  s     &&t~~'I'IJJrM   c                 V    [         R                  " U R                  R                  5      $ )zRResponse.request

Returns the matching `Request` object.

Returns
-------
Request
r   r`   rF   requestrH   s    rJ   r   Response.request         !7!788rM   c                 V    [         R                  " U R                  R                  5      $ )zYResponse.frame

Returns the `Frame` that initiated this response.

Returns
-------
Frame
r_   rH   s    rJ   ra   Response.frame         !5!566rM   c                 z   #    [         R                  " U R                  R                  5       I Sh  vN 5      $  N7f)zResponse.all_headers

An object with all the response HTTP headers associated with this response.

Returns
-------
Dict[str, str]
Nr   rH   s    rJ   r   Response.all_headers  r   ry   c                 z   #    [         R                  " U R                  R                  5       I Sh  vN 5      $  N7f)a-  Response.headers_array

An array with all the request HTTP headers associated with this response. Unlike `response.all_headers()`,
header names are NOT lower-cased. Headers with multiple entries, such as `Set-Cookie`, appear in the array multiple
times.

Returns
-------
List[{name: str, value: str}]
Nr   rH   s    rJ   r   Response.headers_array  r   ry   r   c                 x   #    [         R                  " U R                  R                  US9I Sh  vN 5      $  N7f)a  Response.header_value

Returns the value of the header matching the name. The name is case-insensitive. If multiple headers have the same
name (except `set-cookie`), they are returned as a list separated by `, `. For `set-cookie`, the `\n` separator is
used. If no headers are found, `null` is returned.

Parameters
----------
name : str
    Name of the header.

Returns
-------
Union[str, None]
r   Nr   r   s     rJ   r   Response.header_value  s0     " &&T^^-H-Hd-H-S'STT'Sr   c                 x   #    [         R                  " U R                  R                  US9I Sh  vN 5      $  N7f)zResponse.header_values

Returns all values of the headers matching the name, for example `set-cookie`. The name is case-insensitive.

Parameters
----------
name : str
    Name of the header.

Returns
-------
List[str]
r   N)r   rE   rF   header_valuesr   s     rJ   r   Response.header_values  0      &&T^^-I-It-I-T'TUU'Tr   c                 z   #    [         R                  " U R                  R                  5       I Sh  vN 5      $  N7f)zResponse.server_addr

Returns the IP address and port of the server.

Returns
-------
Union[{ipAddress: str, port: int}, None]
N)r   rd   rF   server_addrrH   s    rJ   r   Response.server_addr)  +      ))0J0J0L*LMM*Lry   c                 z   #    [         R                  " U R                  R                  5       I Sh  vN 5      $  N7f)zResponse.security_details

Returns SSL and other security information.

Returns
-------
Union[{issuer: Union[str, None], protocol: Union[str, None], subjectName: Union[str, None], validFrom: Union[float, None], validTo: Union[float, None]}, None]
N)r   rd   rF   security_detailsrH   s    rJ   r   Response.security_details5  s+      ))0O0O0Q*QRR*Qry   Nc                 z   #    [         R                  " U R                  R                  5       I Sh  vN 5      $  N7f)zMResponse.finished

Waits for this response to finish, returns always `null`.
N)r   rE   rF   finishedrH   s    rJ   r   Response.finishedA  s+      &&T^^-D-D-F'FGG'Fry   c                 z   #    [         R                  " U R                  R                  5       I Sh  vN 5      $  N7f)zMResponse.body

Returns the buffer with response body.

Returns
-------
bytes
Nr   rE   rF   bodyrH   s    rJ   r   Response.bodyI  +      &&T^^-@-@-B'BCC'Bry   c                 z   #    [         R                  " U R                  R                  5       I Sh  vN 5      $  N7f)zVResponse.text

Returns the text representation of response body.

Returns
-------
str
Nr   rE   rF   textrH   s    rJ   r   Response.textU  r   ry   c                 z   #    [         R                  " U R                  R                  5       I Sh  vN 5      $  N7f)zResponse.json

Returns the JSON representation of response body.

This method will throw if the response body is not parsable via `JSON.parse`.

Returns
-------
Any
Nr   rE   rF   jsonrH   s    rJ   r   Response.jsona  +      &&T^^-@-@-B'BCC'Bry   r   rB   r4   r   rB   N)$r   r   r   r   r   r   rG   r   r   intr   r   r   r   rs   r   r   ra   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   rM   rJ   r5   r5     s   	;S 	; 	; 	:D 	: 	: 	> 	> 	> 	CS 	C 	C ?S#X. ? ? 
KT 
K 
K 	9 	9 	7 	7
K6;;sCx#8 
KLV[[%; LUs Uvs/C U&V VC0@ V"
N6??:#> 
N
S(H 
SH
DE 
D
DC 
DDFJJ DrM   r5   c                      \ rS rSr\SS j5       rSS\R                  \   SS4S jjr	SSSSSSSS.S\R                  \
   S	\R                  \R                  \\4      S
\R                  \R                  \\4      S\R                  \R                     S\R                  \R                  \\R                   4      S\R                  \   S\R                  S   SS4S jjrSSSSSSSS.S\R                  \   S\R                  \   S	\R                  \R                  \\4      S\R                  \R                  \R                  \\4      S\R                  \
   S\R                  \
   S\R                  \   SS4S jjrSSSSS.S\R                  \   S\R                  \   S	\R                  \R                  \\4      S\R                  \R                  \R                  \\4      SS4
S jjrSSSSS.S\R                  \   S\R                  \   S	\R                  \R                  \\4      S\R                  \R                  \R                  \\4      SS4
S jjrSrg)r6   is  rB   c                 V    [         R                  " U R                  R                  5      $ )z@Route.request

A request to be routed.

Returns
-------
Request
r   rH   s    rJ   r   Route.requestu  r   rM   N
error_codec                 x   #    [         R                  " U R                  R                  US9I Sh  vN 5      $  N7f)a^  Route.abort

Aborts the route's request.

Parameters
----------
error_code : Union[str, None]
    Optional error code. Defaults to `failed`, could be one of the following:
    - `'aborted'` - An operation was aborted (due to user action)
    - `'accessdenied'` - Permission to access a resource, other than the network, was denied
    - `'addressunreachable'` - The IP address is unreachable. This usually means that there is no route to the
      specified host or network.
    - `'blockedbyclient'` - The client chose to block the request.
    - `'blockedbyresponse'` - The request failed because the response was delivered along with requirements which are
      not met ('X-Frame-Options' and 'Content-Security-Policy' ancestor checks, for instance).
    - `'connectionaborted'` - A connection timed out as a result of not receiving an ACK for data sent.
    - `'connectionclosed'` - A connection was closed (corresponding to a TCP FIN).
    - `'connectionfailed'` - A connection attempt failed.
    - `'connectionrefused'` - A connection attempt was refused.
    - `'connectionreset'` - A connection was reset (corresponding to a TCP RST).
    - `'internetdisconnected'` - The Internet connection has been lost.
    - `'namenotresolved'` - The host name could not be resolved.
    - `'timedout'` - An operation timed out.
    - `'failed'` - A generic failure occurred.
)	errorCodeN)r   rE   rF   abort)rI   r   s     rJ   r   Route.abort  s0     6 &&T^^-A-AJ-A-W'WXX'Wr   )r   rs   r   r   pathcontent_typer{   r   rs   r   r   r   r   r{   r+   c                   #    [         R                  " U R                  R                  U[         R                  " U5      U[         R                  " U5      UUU(       a  UR                  OSS9I Sh  vN 5      $  N7f)a  Route.fulfill

Fulfills route's request with given response.

**Usage**

An example of fulfilling all requests with 404 responses:

```py
await page.route("**/*", lambda route: route.fulfill(
    status=404,
    content_type="text/plain",
    body="not found!"))
```

An example of serving static file:

```py
await page.route("**/xhr_endpoint", lambda route: route.fulfill(path="mock_data.json"))
```

Parameters
----------
status : Union[int, None]
    Response status code, defaults to `200`.
headers : Union[Dict[str, str], None]
    Response headers. Header values will be converted to a string.
body : Union[bytes, str, None]
    Response body.
json : Union[Any, None]
    JSON response. This method will set the content type to `application/json` if not set.
path : Union[pathlib.Path, str, None]
    File path to respond with. The content type will be inferred from file extension. If `path` is a relative path,
    then it is resolved relative to the current working directory.
content_type : Union[str, None]
    If set, equals to setting `Content-Type` response header.
response : Union[APIResponse, None]
    `APIResponse` to fulfill route's request with. Individual fields of the response (such as headers) can be
    overridden using fulfill options.
N)r   rs   r   r   r   contentTyper{   )r   rE   rF   fulfillto_impl)rI   r   rs   r   r   r   r   r{   s           rJ   r   Route.fulfill  sm     h &&..((0__T*(/7++T )  

 
	
s   A.A;0A91	A;)rG   rR   rs   rV   max_redirectsmax_retriestimeoutrG   rR   rV   r   r   r   c                   #    [         R                  " U R                  R                  UU[         R                  " U5      [         R                  " U5      UUUS9I Sh  vN 5      $  N7f)a  Route.fetch

Performs the request and fetches result without fulfilling it, so that the response could be modified and then
fulfilled.

**Usage**

```py
async def handle(route):
    response = await route.fetch()
    json = await response.json()
    json["message"]["big_red_dog"] = []
    await route.fulfill(response=response, json=json)

await page.route("https://dog.ceo/api/breeds/list/all", handle)
```

**Details**

Note that `headers` option will apply to the fetched request as well as any redirects initiated by it. If you want
to only apply `headers` to the original request, but not to redirects, look into `route.continue_()`
instead.

Parameters
----------
url : Union[str, None]
    If set changes the request URL. New URL must have same protocol as original one.
method : Union[str, None]
    If set changes the request method (e.g. GET or POST).
headers : Union[Dict[str, str], None]
    If set changes the request HTTP headers. Header values will be converted to a string.
post_data : Union[Any, bytes, str, None]
    Allows to set post data of the request. If the data parameter is an object, it will be serialized to json string
    and `content-type` header will be set to `application/json` if not explicitly set. Otherwise the `content-type`
    header will be set to `application/octet-stream` if not explicitly set.
max_redirects : Union[int, None]
    Maximum number of request redirects that will be followed automatically. An error will be thrown if the number is
    exceeded. Defaults to `20`. Pass `0` to not follow redirects.
max_retries : Union[int, None]
    Maximum number of times network errors should be retried. Currently only `ECONNRESET` error is retried. Does not
    retry based on HTTP response codes. An error will be thrown if the limit is exceeded. Defaults to `0` - no retries.
timeout : Union[float, None]
    Request timeout in milliseconds. Defaults to `30000` (30 seconds). Pass `0` to disable timeout.

Returns
-------
APIResponse
)rG   rR   rs   postDatamaxRedirects
maxRetriesr   Nr   r`   rF   fetchr   )rI   rG   rR   rs   rV   r   r   r   s           rJ   r   Route.fetch  sc     x   ..&&0 3*& '  

 
	
s   AA(A&	A()rG   rR   rs   rV   c          
         #    [         R                  " U R                  R                  UU[         R                  " U5      [         R                  " U5      S9I Sh  vN 5      $  N7f)a	  Route.fallback

Continues route's request with optional overrides. The method is similar to `route.continue_()` with the
difference that other matching handlers will be invoked before sending the request.

**Usage**

When several routes match the given pattern, they run in the order opposite to their registration. That way the
last registered route can always override all the previous ones. In the example below, request will be handled by
the bottom-most handler first, then it'll fall back to the previous one and in the end will be aborted by the first
registered route.

```py
await page.route("**/*", lambda route: route.abort())  # Runs last.
await page.route("**/*", lambda route: route.fallback())  # Runs second.
await page.route("**/*", lambda route: route.fallback())  # Runs first.
```

Registering multiple routes is useful when you want separate handlers to handle different kinds of requests, for
example API calls vs page resources or GET requests vs POST requests as in the example below.

```py
# Handle GET requests.
async def handle_get(route):
    if route.request.method != "GET":
        await route.fallback()
        return
  # Handling GET only.
  # ...

# Handle POST requests.
async def handle_post(route):
    if route.request.method != "POST":
        await route.fallback()
        return
  # Handling POST only.
  # ...

await page.route("**/*", handle_get)
await page.route("**/*", handle_post)
```

One can also modify request while falling back to the subsequent handler, that way intermediate route handler can
modify url, method, headers and postData of the request.

```py
async def handle(route, request):
    # override headers
    headers = {
        **request.headers,
        "foo": "foo-value", # set "foo" header
        "bar": None # remove "bar" header
    }
    await route.fallback(headers=headers)

await page.route("**/*", handle)
```

Use `route.continue_()` to immediately send the request to the network, other matching handlers won't be
invoked in that case.

Parameters
----------
url : Union[str, None]
    If set changes the request URL. New URL must have same protocol as original one. Changing the URL won't affect the
    route matching, all the routes are matched using the original request URL.
method : Union[str, None]
    If set changes the request method (e.g. GET or POST).
headers : Union[Dict[str, str], None]
    If set changes the request HTTP headers. Header values will be converted to a string.
post_data : Union[Any, bytes, str, None]
    If set changes the post data of request.
rG   rR   rs   r   N)r   rE   rF   fallbackr   rI   rG   rR   rs   rV   s        rJ   r  Route.fallback&  sZ     d &&..))0 3	 *  
 	
   AA%A#	A%c          
         #    [         R                  " U R                  R                  UU[         R                  " U5      [         R                  " U5      S9I Sh  vN 5      $  N7f)a  Route.continue_

Sends route's request to the network with optional overrides.

**Usage**

```py
async def handle(route, request):
    # override headers
    headers = {
        **request.headers,
        "foo": "foo-value", # set "foo" header
        "bar": None # remove "bar" header
    }
    await route.continue_(headers=headers)

await page.route("**/*", handle)
```

**Details**

The `headers` option applies to both the routed request and any redirects it initiates. However, `url`, `method`,
and `postData` only apply to the original request and are not carried over to redirected requests.

`route.continue_()` will immediately send the request to the network, other matching handlers won't be
invoked. Use `route.fallback()` If you want next matching handler in the chain to be invoked.

**NOTE** The `Cookie` header cannot be overridden using this method. If a value is provided, it will be ignored,
and the cookie will be loaded from the browser's cookie store. To set custom cookies, use
`browser_context.add_cookies()`.

Parameters
----------
url : Union[str, None]
    If set changes the request URL. New URL must have same protocol as original one.
method : Union[str, None]
    If set changes the request method (e.g. GET or POST).
headers : Union[Dict[str, str], None]
    If set changes the request HTTP headers. Header values will be converted to a string.
post_data : Union[Any, bytes, str, None]
    If set changes the post data of request.
r   N)r   rE   rF   	continue_r   r  s        rJ   r  Route.continue_  sZ     f &&..**0 3	 +  
 	
r  r   r   N)r   r   r   r   r   r   r   r   r   r   r   r   Unionr   r   pathlibPathr   floatr   r  r  r   r   rM   rJ   r6   r6   s  s   	9 	9Yfooc&: Yd Y@ (,:>:>,0AE-137>
 $>
 S#X!67	>

 oofll3:67>
 oofjj)>
 oofll3+<=>>
 ooc*>
 //-0>
 
>
F %)'+:>KO.2,0*.F
 __S!F
 $	F

 S#X!67F
 ??6<<

C0F#GHF
 s+F
 __S)F
 'F
 
F
V %)'+:>KOY
 __S!Y
 $	Y

 S#X!67Y
 ??6<<

C0F#GHY
 
Y
| %)'+:>KO:
 __S!:
 $	:

 S#X!67:
 ??6<<

C0F#GH:
 
:
 :
rM   r6   c            
         ^  \ rS rSr\R
                  S\S   S\R                  S /S4   SS4S j5       r\R
                  S\S	   S\R                  S
/S4   SS4S j5       r\R
                  S\S   S\R                  S
/S4   SS4S j5       r\R
                  S\S   S\R                  S/S4   SS4S j5       rS\	S\R                  S\R                  \R                  S   S4   4   SS4U 4S jjr\R
                  S\S   S\R                  S /S4   SS4S j5       r\R
                  S\S	   S\R                  S
/S4   SS4S j5       r\R
                  S\S   S\R                  S
/S4   SS4S j5       r\R
                  S\S   S\R                  S/S4   SS4S j5       rS\	S\R                  S\R                  \R                  S   S4   4   SS4U 4S jjr\S\	4S j5       r S SS.S\	S\R                  \R                     S\R                  \   S\4S jjjr S SS.S\	S\R                  \R                     S\R                  \   S\R&                  4S jjjrS\4S jrSrU =r$ )!r7   i  eventclosef*typing.Union[typing.Awaitable[None], None]rB   Nc                     gz!
Fired when the websocket closes.Nr   rI   r  r  s      rJ   onWebSocket.on      rM   framereceivedztyping.Union[bytes, str]c                     gz+
Fired when the websocket receives a frame.Nr   r  s      rJ   r  r    r  rM   	framesentc                     gz(
Fired when the websocket sends a frame.Nr   r  s      rJ   r  r    r  rM   socketerrorr   c                     gz'
Fired when the websocket has an error.Nr   r  s      rJ   r  r    r  rM   .c                    > [         TU ]  XS9$ Nr  r  superr  rI   r  r  	__class__s      rJ   r  r        
 wzz++rM   c                     gr  r   r  s      rJ   onceWebSocket.once  r  rM   c                     gr  r   r  s      rJ   r*  r+    r  rM   c                     gr  r   r  s      rJ   r*  r+    r  rM   c                     gr   r   r  s      rJ   r*  r+    r  rM   c                    > [         TU ]  XS9$ r"  r%  r*  r&  s      rJ   r*  r+        
 w|%|--rM   c                 V    [         R                  " U R                  R                  5      $ )zGWebSocket.url

Contains the URL of the WebSocket.

Returns
-------
str
rD   rH   s    rJ   rG   WebSocket.url!  rL   rM   r   	predicater   c                z    [        U R                  R                  XR                  U5      US9R                  5      $ )a  WebSocket.expect_event

Waits for event to fire and passes its value into the predicate function. Returns when the predicate returns truthy
value. Will throw an error if the webSocket is closed before the event is fired. Returns the event data value.

Parameters
----------
event : str
    Event name, same one would pass into `webSocket.on(event)`.
predicate : Union[Callable, None]
    Receives the event data and resolves to truthy value when the waiting should resolve.
timeout : Union[float, None]
    Maximum time to wait for in milliseconds. Defaults to `30000` (30 seconds). Pass `0` to disable timeout. The
    default value can be changed by using the `browser_context.set_default_timeout()`.

Returns
-------
EventContextManager
r  r5  r   r   rF   expect_event_wrap_handlerfuturerI   r  r5  r   s       rJ   r9  WebSocket.expect_event-  s=    6 (NN'''9'9)'Dg ( f
 	
rM   c                   #    [         R                  " U R                  R                  XR	                  U5      US9I Sh  vN 5      $  N7f)a+  WebSocket.wait_for_event

**NOTE** In most cases, you should use `web_socket.expect_event()`.

Waits for given `event` to fire. If predicate is provided, it passes event's value into the `predicate` function
and waits for `predicate(event)` to return a truthy value. Will throw an error if the socket is closed before the
`event` is fired.

Parameters
----------
event : str
    Event name, same one typically passed into `*.on(event)`.
predicate : Union[Callable, None]
    Receives the event data and resolves to truthy value when the waiting should resolve.
timeout : Union[float, None]
    Maximum time to wait for in milliseconds. Defaults to `30000` (30 seconds). Pass `0` to disable timeout. The
    default value can be changed by using the `browser_context.set_default_timeout()`.

Returns
-------
Any
r7  Nr   rE   rF   wait_for_eventr:  r<  s       rJ   r@  WebSocket.wait_for_eventN  K     < &&..//'9'9)'Dg 0  
 	
   =A
A 	A
c                 ^    [         R                  " U R                  R                  5       5      $ )zZWebSocket.is_closed

Indicates that the web socket has been closed.

Returns
-------
bool
r   rE   rF   	is_closedrH   s    rJ   rF  WebSocket.is_closedr  "     &&t~~'?'?'ABBrM   r   r  )r   r   r   r   r   overloadr   Callabler  r   r	  	Awaitabler*  r   rG   r   r  r   r9  r   r@  r   rF  r   __classcell__r'  s   @rJ   r7   r7     s   __,w, ??K=*VVW, 
	, , __6'6 ??'(*VV
6 
6 6 __3{#3 ??'(*VV
3 
3 3 __2}%2 ??E7$PPQ2 
	2 2,, ??3V-=-=d-CT-I JJK, 
	, __,w, ??K=*VVW, 
	, , __6'6 ??'(*VV
6 
6 6 __3{#3 ??'(*VV
3 
3 3 __2}%2 ??E7$PPQ2 
	2 2.. ??3V-=-=d-CT-I JJK. 
	. 	;S 	; 	; 7;

 +/

 ??6??3

 '
 
"
H 7;"

 +/"
"
 ??6??3"

 '"
 
"
H
C4 
C 
CrM   r7   c                      \ rS rSr\S\4S j5       rSSS.S\R                  \	   S\R                  \   SS4S jjr
SS	 jrS
\R                  \\4   SS4S jrS\R                  \R                  \\4   /\R                   4   SS4S jrS\R                  \R                  \	   \R                  \   /\R                   4   SS4S jrSrg)r8   i  rB   c                 V    [         R                  " U R                  R                  5      $ )zSWebSocketRoute.url

URL of the WebSocket created in the page.

Returns
-------
str
rD   rH   s    rJ   rG   WebSocketRoute.url  rL   rM   NcodereasonrR  rS  c                x   #    [         R                  " U R                  R                  XS9I Sh  vN 5      $  N7f)aT  WebSocketRoute.close

Closes one side of the WebSocket connection.

Parameters
----------
code : Union[int, None]
    Optional [close code](https://developer.mozilla.org/en-US/docs/Web/API/WebSocket/close#code).
reason : Union[str, None]
    Optional [close reason](https://developer.mozilla.org/en-US/docs/Web/API/WebSocket/close#reason).
rQ  Nr   rE   rF   r  )rI   rR  rS  s      rJ   r  WebSocketRoute.close  s5      &&..&&D&@@
 	
@r   c                 ^    [         R                  " U R                  R                  5       5      $ )al  WebSocketRoute.connect_to_server

By default, routed WebSocket does not connect to the server, so you can mock entire WebSocket communication. This
method connects to the actual WebSocket server, and returns the server-side `WebSocketRoute` instance, giving the
ability to send and receive messages from the server.

Once connected to the server:
- Messages received from the server will be **automatically forwarded** to the WebSocket in the page, unless
  `web_socket_route.on_message()` is called on the server-side `WebSocketRoute`.
- Messages sent by the [`WebSocket.send()`](https://developer.mozilla.org/en-US/docs/Web/API/WebSocket/send) call
  in the page will be **automatically forwarded** to the server, unless `web_socket_route.on_message()` is
  called on the original `WebSocketRoute`.

See examples at the top for more details.

Returns
-------
WebSocketRoute
)r   r`   rF   connect_to_serverrH   s    rJ   rX   WebSocketRoute.connect_to_server  s"    *   !A!A!CDDrM   messagec                 \    [         R                  " U R                  R                  US95      $ )aU  WebSocketRoute.send

Sends a message to the WebSocket. When called on the original WebSocket, sends the message to the page. When called
on the result of `web_socket_route.connect_to_server()`, sends the message to the server. See examples at the
top for more details.

Parameters
----------
message : Union[bytes, str]
    Message to send.
)rZ  )r   rE   rF   send)rI   rZ  s     rJ   r\  WebSocketRoute.send  s'     &&t~~':':7':'KLLrM   handlerc                 z    [         R                  " U R                  R                  U R	                  U5      S95      $ )a5  WebSocketRoute.on_message

This method allows to handle messages that are sent by the WebSocket, either from the page or from the server.

When called on the original WebSocket route, this method handles messages sent from the page. You can handle this
messages by responding to them with `web_socket_route.send()`, forwarding them to the server-side connection
returned by `web_socket_route.connect_to_server()` or do something else.

Once this method is called, messages are not automatically forwarded to the server or to the page - you should do
that manually by calling `web_socket_route.send()`. See examples at the top for more details.

Calling this method again will override the handler with a new one.

Parameters
----------
handler : Callable[[Union[bytes, str]], Any]
    Function that will handle messages.
r^  )r   rE   rF   
on_messager:  rI   r^  s     rJ   ra  WebSocketRoute.on_message  s7    , &&NN%%d.@.@.I%J
 	
rM   c                 z    [         R                  " U R                  R                  U R	                  U5      S95      $ )a  WebSocketRoute.on_close

Allows to handle [`WebSocket.close`](https://developer.mozilla.org/en-US/docs/Web/API/WebSocket/close).

By default, closing one side of the connection, either in the page or on the server, will close the other side.
However, when `web_socket_route.on_close()` handler is set up, the default forwarding of closure is disabled,
and handler should take care of it.

Parameters
----------
handler : Callable[[Union[int, None], Union[str, None]], Any]
    Function that will handle WebSocket closure. Received an optional
    [close code](https://developer.mozilla.org/en-US/docs/Web/API/WebSocket/close#code) and an optional
    [close reason](https://developer.mozilla.org/en-US/docs/Web/API/WebSocket/close#reason).
r`  )r   rE   rF   on_closer:  rb  s     rJ   re  WebSocketRoute.on_close  s7    , &&NN##D,>,>w,G#H
 	
rM   r   )rB   r8   )r   r   r   r   r   r   rG   r   r   r   r  rX  r	  r   r\  rJ  r   ra  re  r   r   rM   rJ   r8   r8     s    	;S 	; 	; /3SW
s+
<BOOC<P
	
&E.MFLLe4 M M
S%Z(@'A6::'MN
	
4
__S!6??3#78&**D


 

rM   r8   c                       \ rS rSrS\SS4S jrS\SS4S jrS\SS4S jrSS	.S\S
\R                  \
   SS4S jjrSS	.S\S
\R                  \
   SS4S jjrSrg)r.   i  keyrB   Nc                 x   #    [         R                  " U R                  R                  US9I Sh  vN 5      $  N7f)an  Keyboard.down

Dispatches a `keydown` event.

`key` can specify the intended
[keyboardEvent.key](https://developer.mozilla.org/en-US/docs/Web/API/KeyboardEvent/key) value or a single character
to generate the text for. A superset of the `key` values can be found
[here](https://developer.mozilla.org/en-US/docs/Web/API/KeyboardEvent/key/Key_Values). Examples of the keys are:

`F1` - `F12`, `Digit0`- `Digit9`, `KeyA`- `KeyZ`, `Backquote`, `Minus`, `Equal`, `Backslash`, `Backspace`, `Tab`,
`Delete`, `Escape`, `ArrowDown`, `End`, `Enter`, `Home`, `Insert`, `PageDown`, `PageUp`, `ArrowRight`, `ArrowUp`,
etc.

Following modification shortcuts are also supported: `Shift`, `Control`, `Alt`, `Meta`, `ShiftLeft`,
`ControlOrMeta`. `ControlOrMeta` resolves to `Control` on Windows and Linux and to `Meta` on macOS.

Holding down `Shift` will type the text that corresponds to the `key` in the upper case.

If `key` is a single character, it is case-sensitive, so the values `a` and `A` will generate different respective
texts.

If `key` is a modifier key, `Shift`, `Meta`, `Control`, or `Alt`, subsequent key presses will be sent with that
modifier active. To release the modifier key, use `keyboard.up()`.

After the key is pressed once, subsequent calls to `keyboard.down()` will have
[repeat](https://developer.mozilla.org/en-US/docs/Web/API/KeyboardEvent/repeat) set to true. To release the key,
use `keyboard.up()`.

**NOTE** Modifier keys DO influence `keyboard.down`. Holding down `Shift` will type the text in upper case.

Parameters
----------
key : str
    Name of the key to press or a character to generate, such as `ArrowLeft` or `a`.
rh  Nr   rE   rF   downrI   rh  s     rJ   rl  Keyboard.down  s1     J &&T^^-@-@S-@-I'IJJ'Ir   c                 x   #    [         R                  " U R                  R                  US9I Sh  vN 5      $  N7f)zKeyboard.up

Dispatches a `keyup` event.

Parameters
----------
key : str
    Name of the key to press or a character to generate, such as `ArrowLeft` or `a`.
rj  Nr   rE   rF   uprm  s     rJ   rq  Keyboard.up*  s0      &&T^^->->3->-G'GHH'Gr   r   c                 x   #    [         R                  " U R                  R                  US9I Sh  vN 5      $  N7f)us  Keyboard.insert_text

Dispatches only `input` event, does not emit the `keydown`, `keyup` or `keypress` events.

**Usage**

```py
await page.keyboard.insert_text("嗨")
```

**NOTE** Modifier keys DO NOT effect `keyboard.insertText`. Holding down `Shift` will not type the text in upper
case.

Parameters
----------
text : str
    Sets input to the specified text value.
)r   N)r   rE   rF   insert_text)rI   r   s     rJ   rt  Keyboard.insert_text7  s0     ( &&T^^-G-GT-G-R'RSS'Rr   )delayrv  c                x   #    [         R                  " U R                  R                  XS9I Sh  vN 5      $  N7f)a  Keyboard.type

**NOTE** In most cases, you should use `locator.fill()` instead. You only need to press keys one by one if
there is special keyboard handling on the page - in this case use `locator.press_sequentially()`.

Sends a `keydown`, `keypress`/`input`, and `keyup` event for each character in the text.

To press a special key, like `Control` or `ArrowDown`, use `keyboard.press()`.

**Usage**

```py
await page.keyboard.type("Hello") # types instantly
await page.keyboard.type("World", delay=100) # types slower, like a user
```

**NOTE** Modifier keys DO NOT effect `keyboard.type`. Holding down `Shift` will not type the text in upper case.

**NOTE** For characters that are not on a US keyboard, only an `input` event will be sent.

Parameters
----------
text : str
    A text to type into a focused element.
delay : Union[float, None]
    Time to wait between key presses in milliseconds. Defaults to 0.
)r   rv  Nr   rE   rF   type)rI   r   rv  s      rJ   ry  Keyboard.typeM  s5     : &&..%%4%==
 	
=r   c                x   #    [         R                  " U R                  R                  XS9I Sh  vN 5      $  N7f)ak  Keyboard.press

**NOTE** In most cases, you should use `locator.press()` instead.

`key` can specify the intended
[keyboardEvent.key](https://developer.mozilla.org/en-US/docs/Web/API/KeyboardEvent/key) value or a single character
to generate the text for. A superset of the `key` values can be found
[here](https://developer.mozilla.org/en-US/docs/Web/API/KeyboardEvent/key/Key_Values). Examples of the keys are:

`F1` - `F12`, `Digit0`- `Digit9`, `KeyA`- `KeyZ`, `Backquote`, `Minus`, `Equal`, `Backslash`, `Backspace`, `Tab`,
`Delete`, `Escape`, `ArrowDown`, `End`, `Enter`, `Home`, `Insert`, `PageDown`, `PageUp`, `ArrowRight`, `ArrowUp`,
etc.

Following modification shortcuts are also supported: `Shift`, `Control`, `Alt`, `Meta`, `ShiftLeft`,
`ControlOrMeta`. `ControlOrMeta` resolves to `Control` on Windows and Linux and to `Meta` on macOS.

Holding down `Shift` will type the text that corresponds to the `key` in the upper case.

If `key` is a single character, it is case-sensitive, so the values `a` and `A` will generate different respective
texts.

Shortcuts such as `key: "Control+o"`, `key: "Control++` or `key: "Control+Shift+T"` are supported as well. When
specified with the modifier, modifier is pressed and being held while the subsequent key is being pressed.

**Usage**

```py
page = await browser.new_page()
await page.goto("https://keycode.info")
await page.keyboard.press("a")
await page.screenshot(path="a.png")
await page.keyboard.press("ArrowLeft")
await page.screenshot(path="arrow_left.png")
await page.keyboard.press("Shift+O")
await page.screenshot(path="o.png")
await browser.close()
```

Shortcut for `keyboard.down()` and `keyboard.up()`.

Parameters
----------
key : str
    Name of the key to press or a character to generate, such as `ArrowLeft` or `a`.
delay : Union[float, None]
    Time to wait between `keydown` and `keyup` in milliseconds. Defaults to 0.
)rh  rv  Nr   rE   rF   press)rI   rh  rv  s      rJ   r}  Keyboard.pressn  s1     b &&T^^-A-Ac-A-W'WXX'Wr   r   )r   r   r   r   r   rl  rq  rt  r   r   r  ry  r}  r   r   rM   rJ   r.   r.     s    %Kc %Kd %KNIC ID ITc Td T, HL 
s 
fooe.D 
PT 
B HL 1Ys 1Yfooe.D 1YPT 1Y 1YrM   r.   c                      \ rS rSrSS.S\S\S\R                  \   SS4S jjrSSS	.S
\R                  \	S      S\R                  \   SS4S jjr
SSS	.S
\R                  \	S      S\R                  \   SS4S jjrSSSS.S\S\S\R                  \   S
\R                  \	S      S\R                  \   SS4S jjrSSS.S\S\S\R                  \   S
\R                  \	S      SS4
S jjrS\S\SS4S jrSrg)r/   i  N)stepsxyr  rB   c                z   #    [         R                  " U R                  R                  XUS9I Sh  vN 5      $  N7f)a6  Mouse.move

Dispatches a `mousemove` event.

Parameters
----------
x : float
    X coordinate relative to the main frame's viewport in CSS pixels.
y : float
    Y coordinate relative to the main frame's viewport in CSS pixels.
steps : Union[int, None]
    Defaults to 1. Sends intermediate `mousemove` events.
)r  r  r  N)r   rE   rF   move)rI   r  r  r  s       rJ   r  
Mouse.move  s3     " &&T^^-@-@1QV-@-W'WXX'Wry   )buttonclick_countr  leftmiddlerightr  c                x   #    [         R                  " U R                  R                  XS9I Sh  vN 5      $  N7f)zMouse.down

Dispatches a `mousedown` event.

Parameters
----------
button : Union["left", "middle", "right", None]
    Defaults to `left`.
click_count : Union[int, None]
    defaults to 1. See [UIEvent.detail].
r  
clickCountNrk  rI   r  r  s      rJ   rl  
Mouse.down  s5     $ &&..%%V%LL
 	
Lr   c                x   #    [         R                  " U R                  R                  XS9I Sh  vN 5      $  N7f)zMouse.up

Dispatches a `mouseup` event.

Parameters
----------
button : Union["left", "middle", "right", None]
    Defaults to `left`.
click_count : Union[int, None]
    defaults to 1. See [UIEvent.detail].
r  Nrp  r  s      rJ   rq  Mouse.up  s5     $ &&..##6#JJ
 	
Jr   )rv  r  r  rv  c          
      |   #    [         R                  " U R                  R                  XX4US9I Sh  vN 5      $  N7f)a  Mouse.click

Shortcut for `mouse.move()`, `mouse.down()`, `mouse.up()`.

Parameters
----------
x : float
    X coordinate relative to the main frame's viewport in CSS pixels.
y : float
    Y coordinate relative to the main frame's viewport in CSS pixels.
delay : Union[float, None]
    Time to wait between `mousedown` and `mouseup` in milliseconds. Defaults to 0.
button : Union["left", "middle", "right", None]
    Defaults to `left`.
click_count : Union[int, None]
    defaults to 1. See [UIEvent.detail].
)r  r  rv  r  r  N)r   rE   rF   click)rI   r  r  rv  r  r  s         rJ   r  Mouse.click  sB     6 &&..&& '  
 	
   /<:	<)rv  r  c          	      z   #    [         R                  " U R                  R                  XX4S9I Sh  vN 5      $  N7f)a  Mouse.dblclick

Shortcut for `mouse.move()`, `mouse.down()`, `mouse.up()`, `mouse.down()` and
`mouse.up()`.

Parameters
----------
x : float
    X coordinate relative to the main frame's viewport in CSS pixels.
y : float
    Y coordinate relative to the main frame's viewport in CSS pixels.
delay : Union[float, None]
    Time to wait between `mousedown` and `mouseup` in milliseconds. Defaults to 0.
button : Union["left", "middle", "right", None]
    Defaults to `left`.
)r  r  rv  r  N)r   rE   rF   dblclick)rI   r  r  rv  r  s        rJ   r  Mouse.dblclick  s7     2 &&..))A%)OO
 	
Ory   delta_xdelta_yc                 x   #    [         R                  " U R                  R                  XS9I Sh  vN 5      $  N7f)a  Mouse.wheel

Dispatches a `wheel` event. This method is usually used to manually scroll the page. See
[scrolling](https://playwright.dev/python/docs/input#scrolling) for alternative ways to scroll.

**NOTE** Wheel events may cause scrolling if they are not handled, and this method does not wait for the scrolling
to finish before returning.

Parameters
----------
delta_x : float
    Pixels to scroll horizontally.
delta_y : float
    Pixels to scroll vertically.
)deltaXdeltaYN)r   rE   rF   wheel)rI   r  r  s      rJ   r  Mouse.wheel$  s5     " &&..&&g&FF
 	
Fr   r   )r   r   r   r   r  r   r   r   r  r   rl  rq  r  r  r  r   r   rM   rJ   r/   r/     s    DHYY Y,2OOC,@Y	Y, GK,0	
 (A BC
 __S)	

 

2 GK,0	
 (A BC
 __S)	

 

6 )-FJ,0

 

 u%
 (A BC
 __S)
 

L )-FJ

 

 u%
 (A BC
 

:
5 
5 
T 
rM   r/   c                   *    \ rS rSrS\S\SS4S jrSrg)r0   i=  r  r  rB   Nc                 x   #    [         R                  " U R                  R                  XS9I Sh  vN 5      $  N7f)a  Touchscreen.tap

Dispatches a `touchstart` and `touchend` event with a single touch at the position (`x`,`y`).

**NOTE** `page.tap()` the method will throw if `hasTouch` option of the browser context is false.

Parameters
----------
x : float
    X coordinate relative to the main frame's viewport in CSS pixels.
y : float
    Y coordinate relative to the main frame's viewport in CSS pixels.
)r  r  N)r   rE   rF   tap)rI   r  r  s      rJ   r  Touchscreen.tap?  s0      &&T^^-?-?!-?-I'IJJ'Ir   r   )r   r   r   r   r  r  r   r   rM   rJ   r0   r0   =  s     K5 KU Kt KrM   r0   c                   N   \ rS rSr SS\S\R                  \R                     S\R                  4S jjr SS\S\R                  \R                     SS 4S jjr	S\SS 4S	 jr
S\R                  \S 4   4S
 jrS\R                  S   4S jrSS jrS\R                  4S jrSrg)r1   iT  N
expressionargrB   c                    #    [         R                  " U R                  R                  U[         R                  " U5      S9I Sh  vN 5      $  N7f)a  JSHandle.evaluate

Returns the return value of `expression`.

This method passes this handle as the first argument to `expression`.

If `expression` returns a [Promise], then `handle.evaluate` would wait for the promise to resolve and return its
value.

**Usage**

```py
tweet_handle = await page.query_selector(".tweet .retweets")
assert await tweet_handle.evaluate("node => node.innerText") == "10 retweets"
```

Parameters
----------
expression : str
    JavaScript expression to be evaluated in the browser context. If the expression evaluates to a function, the
    function is automatically invoked.
arg : Union[Any, None]
    Optional argument to pass to `expression`.

Returns
-------
Any
r  r  Nr   rE   rF   evaluater   rI   r  r  s      rJ   r  JSHandle.evaluateV  sJ     @ &&..))%7??3+? *  
 	
   AAA	Ac                    #    [         R                  " U R                  R                  U[         R                  " U5      S9I Sh  vN 5      $  N7f)a  JSHandle.evaluate_handle

Returns the return value of `expression` as a `JSHandle`.

This method passes this handle as the first argument to `expression`.

The only difference between `jsHandle.evaluate` and `jsHandle.evaluateHandle` is that `jsHandle.evaluateHandle`
returns `JSHandle`.

If the function passed to the `jsHandle.evaluateHandle` returns a [Promise], then `jsHandle.evaluateHandle` would
wait for the promise to resolve and return its value.

See `page.evaluate_handle()` for more details.

Parameters
----------
expression : str
    JavaScript expression to be evaluated in the browser context. If the expression evaluates to a function, the
    function is automatically invoked.
arg : Union[Any, None]
    Optional argument to pass to `expression`.

Returns
-------
JSHandle
r  Nr   r`   rF   evaluate_handler   r  s      rJ   r  JSHandle.evaluate_handle|  sI     <   ..00%7??3+? 1  
 	
r  property_namec                 x   #    [         R                  " U R                  R                  US9I Sh  vN 5      $  N7f)zJSHandle.get_property

Fetches a single property from the referenced object.

Parameters
----------
property_name : str
    property to get

Returns
-------
JSHandle
)propertyNameN)r   r`   rF   get_property)rI   r  s     rJ   r  JSHandle.get_property  s5        ..--=-II
 	
Ir   c                 z   #    [         R                  " U R                  R                  5       I Sh  vN 5      $  N7f)a  JSHandle.get_properties

The method returns a map with **own property names** as keys and JSHandle instances for the property values.

**Usage**

```py
handle = await page.evaluate_handle("({ window, document })")
properties = await handle.get_properties()
window_handle = properties.get("window")
document_handle = properties.get("document")
await handle.dispose()
```

Returns
-------
Dict[str, JSHandle]
N)r   from_impl_dictrF   get_propertiesrH   s    rJ   r  JSHandle.get_properties  s+     ( %%DNN,I,I,K&KLL&Kry   r'   c                 ^    [         R                  " U R                  R                  5       5      $ )zJSHandle.as_element

Returns either `null` or the object handle itself, if the object handle is an instance of `ElementHandle`.

Returns
-------
Union[ElementHandle, None]
r   rd   rF   
as_elementrH   s    rJ   r  JSHandle.as_element  "     ))$..*C*C*EFFrM   c                 z   #    [         R                  " U R                  R                  5       I Sh  vN 5      $  N7f)zVJSHandle.dispose

The `jsHandle.dispose` method stops referencing the element handle.
Nr   rE   rF   disposerH   s    rJ   r  JSHandle.dispose  +      &&T^^-C-C-E'EFF'Ery   c                 z   #    [         R                  " U R                  R                  5       I Sh  vN 5      $  N7f)a<  JSHandle.json_value

Returns a JSON representation of the object. If the object has a `toJSON` function, it **will not be called**.

**NOTE** The method will return an empty JSON object if the referenced object is not stringifiable. It will throw
an error if the object has circular references.

Returns
-------
Any
N)r   rE   rF   
json_valuerH   s    rJ   r  JSHandle.json_value  s+      &&T^^-F-F-H'HII'Hry   r   r  r   )r   r   r   r   r   r   r   r   r  r  r  r   r  r  r  r  r   r   rM   rJ   r1   r1   T  s     CG$
$
$*OOFJJ$?$
	$
N CG"
"
$*OOFJJ$?"
	"
H
 

 
&Mfkk#z/&B M,
GFOOO< 
GGJ&** JrM   r1   c                   >   \ rS rSrS\R
                  S    4S jrS\R
                  S   4S jrS\R
                  S   4S jrS\	S\R
                  \	   4S jr
S\R
                  \	   4S	 jrS\	4S
 jrS\	4S jrS\4S jrS\4S jrS\4S jrS\4S jrS\4S jrS\4S jr SdS\	S\R
                  \R*                     SS4S jjrSS.S\R
                  \   SS4S jjrSSSSSSS.S\R
                  \R2                  \S         S\R
                  \   S\R
                  \   S\R
                  \   S\R
                  \   S\R
                  \   SS4S  jjrSSSSSSSSSS!.	S\R
                  \R2                  \S         S\R
                  \   S"\R
                  \   S#\R
                  \S$      S%\R
                  \   S\R
                  \   S\R
                  \   S\R
                  \   S\R
                  \   SS4S& jjrSSSSSSSSS'.S\R
                  \R2                  \S         S\R
                  \   S"\R
                  \   S#\R
                  \S$      S\R
                  \   S\R
                  \   S\R
                  \   S\R
                  \   SS4S( jjr SdSSSSSSS).S*\R
                  \R@                  \	\R2                  \	   4      S+\R
                  \R@                  \\R2                  \   4      S,\R
                  \R@                  \	\R2                  \	   4      S-\R
                  \R@                  S \R2                  S    4      S\R
                  \   S\R
                  \   S\R
                  \   S\RB                  \	   4S. jjjr"SSSSSSS/.S\R
                  \R2                  \S         S\R
                  \   S\R
                  \   S\R
                  \   S\R
                  \   S\R
                  \   SS4S0 jjr#SSSS1.S*\	S\R
                  \   S\R
                  \   S\R
                  \   SS4
S2 jjr$SSS3.S\R
                  \   S\R
                  \   SS4S4 jjr%SS.S\R
                  \   S\	4S5 jjr&SSS6.S7\R@                  \	\'RP                  \)\R2                  \R@                  \	\'RP                  4      \R2                  \)   4   S\R
                  \   S\R
                  \   SS4S8 jjr*SeS9 jr+SSSS:.S;\	S"\R
                  \   S\R
                  \   S\R
                  \   SS4
S< jjr,SSSS:.S=\	S"\R
                  \   S\R
                  \   S\R
                  \   SS4
S> jjr-SSSSSS?.S@\S\R
                  \   S\R
                  \   S\R
                  \   S\R
                  \   S\R
                  \   SS4SA jjr.SSSSSS?.S\R
                  \   S\R
                  \   S\R
                  \   S\R
                  \   S\R
                  \   SS4SB jjr/SSSSSS?.S\R
                  \   S\R
                  \   S\R
                  \   S\R
                  \   S\R
                  \   SS4SC jjr0S\R
                  \1   4SD jr2SSSSSSSSSSSSE.S\R
                  \   S\R
                  \SF      SG\R
                  \R@                  \	\'RP                  4      SH\R
                  \   SI\R
                  \   SJ\R
                  \SK      SL\R
                  \SM      SN\R
                  \SO      SP\R
                  \R2                  SQ      SR\R
                  \	   SS\R
                  \	   S\34ST jjr4SU\	S\R
                  S    4SV jr5SU\	S\RB                  S    4SW jr6 SdSU\	SX\	SY\R
                  \Rn                     S\Rn                  4SZ jjr8 SdSU\	SX\	SY\R
                  \Rn                     S\Rn                  4S[ jjr9SS.S\\S]   S\R
                  \   SS4S^ jjr:SSSS_.SU\	S\\R
                  \S`      S\R
                  \   Sa\R
                  \   S\R
                  S    4
Sb jjr;Scr<g)fr'   i  rB   c                 ^    [         R                  " U R                  R                  5       5      $ )zElementHandle.as_element

Returns either `null` or the object handle itself, if the object handle is an instance of `ElementHandle`.

Returns
-------
Union[ElementHandle, None]
r  rH   s    rJ   r  ElementHandle.as_element  r  rM   r-   c                 z   #    [         R                  " U R                  R                  5       I Sh  vN 5      $  N7f)zoElementHandle.owner_frame

Returns the frame containing the given element.

Returns
-------
Union[Frame, None]
N)r   rd   rF   owner_framerH   s    rJ   r  ElementHandle.owner_frame  r   ry   c                 z   #    [         R                  " U R                  R                  5       I Sh  vN 5      $  N7f)zElementHandle.content_frame

Returns the content frame for element handles referencing iframe nodes, or `null` otherwise

Returns
-------
Union[Frame, None]
N)r   rd   rF   content_framerH   s    rJ   r  ElementHandle.content_frame
  s+      ))0L0L0N*NOO*Nry   r   c                 x   #    [         R                  " U R                  R                  US9I Sh  vN 5      $  N7f)zElementHandle.get_attribute

Returns element attribute value.

Parameters
----------
name : str
    Attribute name to get the value for.

Returns
-------
Union[str, None]
r   Nr   rE   rF   get_attributer   s     rJ   r  ElementHandle.get_attribute  r   r   c                 z   #    [         R                  " U R                  R                  5       I Sh  vN 5      $  N7f)z^ElementHandle.text_content

Returns the `node.textContent`.

Returns
-------
Union[str, None]
Nr   rE   rF   text_contentrH   s    rJ   r  ElementHandle.text_content'  s+      &&T^^-H-H-J'JKK'Jry   c                 z   #    [         R                  " U R                  R                  5       I Sh  vN 5      $  N7f)zPElementHandle.inner_text

Returns the `element.innerText`.

Returns
-------
str
Nr   rE   rF   
inner_textrH   s    rJ   r  ElementHandle.inner_text3  +      &&T^^-F-F-H'HII'Hry   c                 z   #    [         R                  " U R                  R                  5       I Sh  vN 5      $  N7f)zPElementHandle.inner_html

Returns the `element.innerHTML`.

Returns
-------
str
Nr   rE   rF   
inner_htmlrH   s    rJ   r  ElementHandle.inner_html?  r  ry   c                 z   #    [         R                  " U R                  R                  5       I Sh  vN 5      $  N7f)zElementHandle.is_checked

Returns whether the element is checked. Throws if the element is not a checkbox or radio input.

Returns
-------
bool
Nr   rE   rF   
is_checkedrH   s    rJ   r  ElementHandle.is_checkedK  r  ry   c                 z   #    [         R                  " U R                  R                  5       I Sh  vN 5      $  N7f)zElementHandle.is_disabled

Returns whether the element is disabled, the opposite of [enabled](https://playwright.dev/python/docs/actionability#enabled).

Returns
-------
bool
Nr   rE   rF   is_disabledrH   s    rJ   r  ElementHandle.is_disabledW  r   ry   c                 z   #    [         R                  " U R                  R                  5       I Sh  vN 5      $  N7f)zElementHandle.is_editable

Returns whether the element is [editable](https://playwright.dev/python/docs/actionability#editable).

Returns
-------
bool
Nr   rE   rF   is_editablerH   s    rJ   r  ElementHandle.is_editablec  r   ry   c                 z   #    [         R                  " U R                  R                  5       I Sh  vN 5      $  N7f)zElementHandle.is_enabled

Returns whether the element is [enabled](https://playwright.dev/python/docs/actionability#enabled).

Returns
-------
bool
Nr   rE   rF   
is_enabledrH   s    rJ   r  ElementHandle.is_enabledo  r  ry   c                 z   #    [         R                  " U R                  R                  5       I Sh  vN 5      $  N7f)zElementHandle.is_hidden

Returns whether the element is hidden, the opposite of [visible](https://playwright.dev/python/docs/actionability#visible).

Returns
-------
bool
Nr   rE   rF   	is_hiddenrH   s    rJ   r  ElementHandle.is_hidden{  s+      &&T^^-E-E-G'GHH'Gry   c                 z   #    [         R                  " U R                  R                  5       I Sh  vN 5      $  N7f)zElementHandle.is_visible

Returns whether the element is [visible](https://playwright.dev/python/docs/actionability#visible).

Returns
-------
bool
Nr   rE   rF   
is_visiblerH   s    rJ   r  ElementHandle.is_visible  r  ry   Nry  
event_initc                    #    [         R                  " U R                  R                  U[         R                  " U5      S9I Sh  vN 5      $  N7f)aH  ElementHandle.dispatch_event

The snippet below dispatches the `click` event on the element. Regardless of the visibility state of the element,
`click` is dispatched. This is equivalent to calling
[element.click()](https://developer.mozilla.org/en-US/docs/Web/API/HTMLElement/click).

**Usage**

```py
await element_handle.dispatch_event("click")
```

Under the hood, it creates an instance of an event based on the given `type`, initializes it with `eventInit`
properties and dispatches it on the element. Events are `composed`, `cancelable` and bubble by default.

Since `eventInit` is event-specific, please refer to the events documentation for the lists of initial properties:
- [DeviceMotionEvent](https://developer.mozilla.org/en-US/docs/Web/API/DeviceMotionEvent/DeviceMotionEvent)
- [DeviceOrientationEvent](https://developer.mozilla.org/en-US/docs/Web/API/DeviceOrientationEvent/DeviceOrientationEvent)
- [DragEvent](https://developer.mozilla.org/en-US/docs/Web/API/DragEvent/DragEvent)
- [Event](https://developer.mozilla.org/en-US/docs/Web/API/Event/Event)
- [FocusEvent](https://developer.mozilla.org/en-US/docs/Web/API/FocusEvent/FocusEvent)
- [KeyboardEvent](https://developer.mozilla.org/en-US/docs/Web/API/KeyboardEvent/KeyboardEvent)
- [MouseEvent](https://developer.mozilla.org/en-US/docs/Web/API/MouseEvent/MouseEvent)
- [PointerEvent](https://developer.mozilla.org/en-US/docs/Web/API/PointerEvent/PointerEvent)
- [TouchEvent](https://developer.mozilla.org/en-US/docs/Web/API/TouchEvent/TouchEvent)
- [WheelEvent](https://developer.mozilla.org/en-US/docs/Web/API/WheelEvent/WheelEvent)

You can also specify `JSHandle` as the property value if you want live objects to be passed into the event:

```py
# note you can only create data_transfer in chromium and firefox
data_transfer = await page.evaluate_handle("new DataTransfer()")
await element_handle.dispatch_event("#source", "dragstart", {"dataTransfer": data_transfer})
```

Parameters
----------
type : str
    DOM event type: `"click"`, `"dragstart"`, etc.
event_init : Union[Dict, None]
    Optional event-specific initialization properties.
)ry  	eventInitNr   rE   rF   dispatch_eventr   )rI   ry  r  s      rJ   r  ElementHandle.dispatch_event  sJ     \ &&..//W__Z%@ 0  
 	
r  r4  r   c                x   #    [         R                  " U R                  R                  US9I Sh  vN 5      $  N7f)as  ElementHandle.scroll_into_view_if_needed

This method waits for [actionability](https://playwright.dev/python/docs/actionability) checks, then tries to scroll element into view, unless
it is completely visible as defined by
[IntersectionObserver](https://developer.mozilla.org/en-US/docs/Web/API/Intersection_Observer_API)'s `ratio`.

Throws when `elementHandle` does not point to an element
[connected](https://developer.mozilla.org/en-US/docs/Web/API/Node/isConnected) to a Document or a ShadowRoot.

See [scrolling](https://playwright.dev/python/docs/input#scrolling) for alternative ways to scroll.

Parameters
----------
timeout : Union[float, None]
    Maximum time in milliseconds. Defaults to `30000` (30 seconds). Pass `0` to disable timeout. The default value can
    be changed by using the `browser_context.set_default_timeout()` or `page.set_default_timeout()` methods.
r4  Nr   rE   rF   scroll_into_view_if_neededrI   r   s     rJ   r  (ElementHandle.scroll_into_view_if_needed  s5     * &&..;;G;LL
 	
Lr   	modifierspositionr   no_wait_afterforcetrialr  AltControlControlOrMetaMetaShiftr  r	  r
  r  c                   #    [         R                  " U R                  R                  [         R                  " U5      UUUUUS9I Sh  vN 5      $  N7f)aq  ElementHandle.hover

This method hovers over the element by performing the following steps:
1. Wait for [actionability](https://playwright.dev/python/docs/actionability) checks on the element, unless `force` option is set.
1. Scroll the element into view if needed.
1. Use `page.mouse` to hover over the center of the element, or the specified `position`.

If the element is detached from the DOM at any moment during the action, this method throws.

When all steps combined have not finished during the specified `timeout`, this method throws a `TimeoutError`.
Passing zero timeout disables this.

Parameters
----------
modifiers : Union[Sequence[Union["Alt", "Control", "ControlOrMeta", "Meta", "Shift"]], None]
    Modifier keys to press. Ensures that only these modifiers are pressed during the operation, and then restores
    current modifiers back. If not specified, currently pressed modifiers are used. "ControlOrMeta" resolves to
    "Control" on Windows and Linux and to "Meta" on macOS.
position : Union[{x: float, y: float}, None]
    A point to use relative to the top-left corner of element padding box. If not specified, uses some visible point of
    the element.
timeout : Union[float, None]
    Maximum time in milliseconds. Defaults to `30000` (30 seconds). Pass `0` to disable timeout. The default value can
    be changed by using the `browser_context.set_default_timeout()` or `page.set_default_timeout()` methods.
no_wait_after : Union[bool, None]
    This option has no effect.
    Deprecated: This option has no effect.
force : Union[bool, None]
    Whether to bypass the [actionability](../actionability.md) checks. Defaults to `false`.
trial : Union[bool, None]
    When set, this method only performs the [actionability](../actionability.md) checks and skips the action. Defaults
    to `false`. Useful to wait until the element is ready for the action without performing it.
r  r  r   noWaitAfterr
  r  Nr   rE   rF   hoverr   rI   r  r  r   r	  r
  r  s          rJ   r  ElementHandle.hover  sW     \ &&..&&!//)4!) '  	
 		
   AAA		A	r  r  rv  r  r  r   r
  r	  r  rv  r  r  r  c       	            #    [         R                  " U R                  R                  [         R                  " U5      UUUUUUUU	S9	I Sh  vN 5      $  N7f)a	  ElementHandle.click

This method clicks the element by performing the following steps:
1. Wait for [actionability](https://playwright.dev/python/docs/actionability) checks on the element, unless `force` option is set.
1. Scroll the element into view if needed.
1. Use `page.mouse` to click in the center of the element, or the specified `position`.
1. Wait for initiated navigations to either succeed or fail, unless `noWaitAfter` option is set.

If the element is detached from the DOM at any moment during the action, this method throws.

When all steps combined have not finished during the specified `timeout`, this method throws a `TimeoutError`.
Passing zero timeout disables this.

Parameters
----------
modifiers : Union[Sequence[Union["Alt", "Control", "ControlOrMeta", "Meta", "Shift"]], None]
    Modifier keys to press. Ensures that only these modifiers are pressed during the operation, and then restores
    current modifiers back. If not specified, currently pressed modifiers are used. "ControlOrMeta" resolves to
    "Control" on Windows and Linux and to "Meta" on macOS.
position : Union[{x: float, y: float}, None]
    A point to use relative to the top-left corner of element padding box. If not specified, uses some visible point of
    the element.
delay : Union[float, None]
    Time to wait between `mousedown` and `mouseup` in milliseconds. Defaults to 0.
button : Union["left", "middle", "right", None]
    Defaults to `left`.
click_count : Union[int, None]
    defaults to 1. See [UIEvent.detail].
timeout : Union[float, None]
    Maximum time in milliseconds. Defaults to `30000` (30 seconds). Pass `0` to disable timeout. The default value can
    be changed by using the `browser_context.set_default_timeout()` or `page.set_default_timeout()` methods.
force : Union[bool, None]
    Whether to bypass the [actionability](../actionability.md) checks. Defaults to `false`.
no_wait_after : Union[bool, None]
    Actions that initiate navigations are waiting for these navigations to happen and for pages to start loading. You
    can opt out of waiting via setting this flag. You would only need this option in the exceptional cases such as
    navigating to inaccessible pages. Defaults to `false`.
    Deprecated: This option will default to `true` in the future.
trial : Union[bool, None]
    When set, this method only performs the [actionability](../actionability.md) checks and skips the action. Defaults
    to `false`. Useful to wait until the element is ready for the action without performing it.
	r  r  rv  r  r  r   r
  r  r  Nr   rE   rF   r  r   
rI   r  r  rv  r  r  r   r
  r	  r  s
             rJ   r  ElementHandle.click  s`     t &&..&&!//)4!&) ' 
 

 	

   A	AA	Ar  r  rv  r  r   r
  r	  r  c                   #    [         R                  " U R                  R                  [         R                  " U5      UUUUUUUS9I Sh  vN 5      $  N7f)a  ElementHandle.dblclick

This method double clicks the element by performing the following steps:
1. Wait for [actionability](https://playwright.dev/python/docs/actionability) checks on the element, unless `force` option is set.
1. Scroll the element into view if needed.
1. Use `page.mouse` to double click in the center of the element, or the specified `position`.

If the element is detached from the DOM at any moment during the action, this method throws.

When all steps combined have not finished during the specified `timeout`, this method throws a `TimeoutError`.
Passing zero timeout disables this.

**NOTE** `elementHandle.dblclick()` dispatches two `click` events and a single `dblclick` event.

Parameters
----------
modifiers : Union[Sequence[Union["Alt", "Control", "ControlOrMeta", "Meta", "Shift"]], None]
    Modifier keys to press. Ensures that only these modifiers are pressed during the operation, and then restores
    current modifiers back. If not specified, currently pressed modifiers are used. "ControlOrMeta" resolves to
    "Control" on Windows and Linux and to "Meta" on macOS.
position : Union[{x: float, y: float}, None]
    A point to use relative to the top-left corner of element padding box. If not specified, uses some visible point of
    the element.
delay : Union[float, None]
    Time to wait between `mousedown` and `mouseup` in milliseconds. Defaults to 0.
button : Union["left", "middle", "right", None]
    Defaults to `left`.
timeout : Union[float, None]
    Maximum time in milliseconds. Defaults to `30000` (30 seconds). Pass `0` to disable timeout. The default value can
    be changed by using the `browser_context.set_default_timeout()` or `page.set_default_timeout()` methods.
force : Union[bool, None]
    Whether to bypass the [actionability](../actionability.md) checks. Defaults to `false`.
no_wait_after : Union[bool, None]
    This option has no effect.
    Deprecated: This option has no effect.
trial : Union[bool, None]
    When set, this method only performs the [actionability](../actionability.md) checks and skips the action. Defaults
    to `false`. Useful to wait until the element is ready for the action without performing it.
r  r  rv  r  r   r
  r  r  Nr   rE   rF   r  r   	rI   r  r  rv  r  r   r
  r	  r  s	            rJ   r  ElementHandle.dblclicka  s]     l &&..))!//)4!) * 	 	
 	
	   AA
A	A)indexlabelelementr   r
  r	  valuer(  r)  r*  c                $  #    [         R                  " U R                  R                  [         R                  " U5      [         R                  " U5      [         R                  " U5      [         R                  " U5      UUUS9I Sh  vN 5      $  N7f)a\  ElementHandle.select_option

This method waits for [actionability](https://playwright.dev/python/docs/actionability) checks, waits until all specified options are present in
the `<select>` element and selects these options.

If the target element is not a `<select>` element, this method throws an error. However, if the element is inside
the `<label>` element that has an associated
[control](https://developer.mozilla.org/en-US/docs/Web/API/HTMLLabelElement/control), the control will be used
instead.

Returns the array of option values that have been successfully selected.

Triggers a `change` and `input` event once all the provided options have been selected.

**Usage**

```py
# Single selection matching the value or label
await handle.select_option("blue")
# single selection matching the label
await handle.select_option(label="blue")
# multiple selection
await handle.select_option(value=["red", "green", "blue"])
```

Parameters
----------
value : Union[Sequence[str], str, None]
    Options to select by value. If the `<select>` has the `multiple` attribute, all given options are selected,
    otherwise only the first option matching one of the passed options is selected. Optional.
index : Union[Sequence[int], int, None]
    Options to select by index. Optional.
label : Union[Sequence[str], str, None]
    Options to select by label. If the `<select>` has the `multiple` attribute, all given options are selected,
    otherwise only the first option matching one of the passed options is selected. Optional.
element : Union[ElementHandle, Sequence[ElementHandle], None]
    Option elements to select. Optional.
timeout : Union[float, None]
    Maximum time in milliseconds. Defaults to `30000` (30 seconds). Pass `0` to disable timeout. The default value can
    be changed by using the `browser_context.set_default_timeout()` or `page.set_default_timeout()` methods.
force : Union[bool, None]
    Whether to bypass the [actionability](../actionability.md) checks. Defaults to `false`.
no_wait_after : Union[bool, None]
    This option has no effect.
    Deprecated: This option has no effect.

Returns
-------
List[str]
)r+  r(  r)  r*  r   r
  r  Nr   rE   rF   select_optionr   )rI   r+  r(  r)  r*  r   r
  r	  s           rJ   r.  ElementHandle.select_option  su     @ &&....ooe,ooe,ooe,0) /  

 
	
   BBB	Br  r  r   r
  r	  r  c                   #    [         R                  " U R                  R                  [         R                  " U5      UUUUUS9I Sh  vN 5      $  N7f)a  ElementHandle.tap

This method taps the element by performing the following steps:
1. Wait for [actionability](https://playwright.dev/python/docs/actionability) checks on the element, unless `force` option is set.
1. Scroll the element into view if needed.
1. Use `page.touchscreen` to tap the center of the element, or the specified `position`.

If the element is detached from the DOM at any moment during the action, this method throws.

When all steps combined have not finished during the specified `timeout`, this method throws a `TimeoutError`.
Passing zero timeout disables this.

**NOTE** `elementHandle.tap()` requires that the `hasTouch` option of the browser context be set to true.

Parameters
----------
modifiers : Union[Sequence[Union["Alt", "Control", "ControlOrMeta", "Meta", "Shift"]], None]
    Modifier keys to press. Ensures that only these modifiers are pressed during the operation, and then restores
    current modifiers back. If not specified, currently pressed modifiers are used. "ControlOrMeta" resolves to
    "Control" on Windows and Linux and to "Meta" on macOS.
position : Union[{x: float, y: float}, None]
    A point to use relative to the top-left corner of element padding box. If not specified, uses some visible point of
    the element.
timeout : Union[float, None]
    Maximum time in milliseconds. Defaults to `30000` (30 seconds). Pass `0` to disable timeout. The default value can
    be changed by using the `browser_context.set_default_timeout()` or `page.set_default_timeout()` methods.
force : Union[bool, None]
    Whether to bypass the [actionability](../actionability.md) checks. Defaults to `false`.
no_wait_after : Union[bool, None]
    This option has no effect.
    Deprecated: This option has no effect.
trial : Union[bool, None]
    When set, this method only performs the [actionability](../actionability.md) checks and skips the action. Defaults
    to `false`. Useful to wait until the element is ready for the action without performing it.
r  r  r   r
  r  r  Nr   rE   rF   r  r   rI   r  r  r   r
  r	  r  s          rJ   r  ElementHandle.tap  sW     ` &&..$$!//)4!) %  	
 		
r  r   r	  r
  c          	      z   #    [         R                  " U R                  R                  XX4S9I Sh  vN 5      $  N7f)a  ElementHandle.fill

This method waits for [actionability](https://playwright.dev/python/docs/actionability) checks, focuses the element, fills it and triggers an
`input` event after filling. Note that you can pass an empty string to clear the input field.

If the target element is not an `<input>`, `<textarea>` or `[contenteditable]` element, this method throws an
error. However, if the element is inside the `<label>` element that has an associated
[control](https://developer.mozilla.org/en-US/docs/Web/API/HTMLLabelElement/control), the control will be filled
instead.

To send fine-grained keyboard events, use `locator.press_sequentially()`.

Parameters
----------
value : str
    Value to set for the `<input>`, `<textarea>` or `[contenteditable]` element.
timeout : Union[float, None]
    Maximum time in milliseconds. Defaults to `30000` (30 seconds). Pass `0` to disable timeout. The default value can
    be changed by using the `browser_context.set_default_timeout()` or `page.set_default_timeout()` methods.
no_wait_after : Union[bool, None]
    This option has no effect.
    Deprecated: This option has no effect.
force : Union[bool, None]
    Whether to bypass the [actionability](../actionability.md) checks. Defaults to `false`.
r+  r   r  r
  Nr   rE   rF   fillrI   r+  r   r	  r
  s        rJ   r;  ElementHandle.fill+	  sA     D &&..%%- &  
 	
ry   r
  r   c                x   #    [         R                  " U R                  R                  XS9I Sh  vN 5      $  N7f)a  ElementHandle.select_text

This method waits for [actionability](https://playwright.dev/python/docs/actionability) checks, then focuses the element and selects all its
text content.

If the element is inside the `<label>` element that has an associated
[control](https://developer.mozilla.org/en-US/docs/Web/API/HTMLLabelElement/control), focuses and selects text in
the control instead.

Parameters
----------
force : Union[bool, None]
    Whether to bypass the [actionability](../actionability.md) checks. Defaults to `false`.
timeout : Union[float, None]
    Maximum time in milliseconds. Defaults to `30000` (30 seconds). Pass `0` to disable timeout. The default value can
    be changed by using the `browser_context.set_default_timeout()` or `page.set_default_timeout()` methods.
r>  Nr   rE   rF   select_textrI   r
  r   s      rJ   rA  ElementHandle.select_textS	  5     0 &&..,,5,JJ
 	
Jr   c                x   #    [         R                  " U R                  R                  US9I Sh  vN 5      $  N7f)a  ElementHandle.input_value

Returns `input.value` for the selected `<input>` or `<textarea>` or `<select>` element.

Throws for non-input elements. However, if the element is inside the `<label>` element that has an associated
[control](https://developer.mozilla.org/en-US/docs/Web/API/HTMLLabelElement/control), returns the value of the
control.

Parameters
----------
timeout : Union[float, None]
    Maximum time in milliseconds. Defaults to `30000` (30 seconds). Pass `0` to disable timeout. The default value can
    be changed by using the `browser_context.set_default_timeout()` or `page.set_default_timeout()` methods.

Returns
-------
str
r4  Nr   rE   rF   input_valuer  s     rJ   rG  ElementHandle.input_valueo	  s5     ( &&..,,W,==
 	
=r   r   r	  filesc                   #    [         R                  " U R                  R                  [         R                  " U5      X#S9I Sh  vN 5      $  N7f)a  ElementHandle.set_input_files

Sets the value of the file input to these file paths or files. If some of the `filePaths` are relative paths, then
they are resolved relative to the current working directory. For empty array, clears the selected files. For inputs
with a `[webkitdirectory]` attribute, only a single directory path is supported.

This method expects `ElementHandle` to point to an
[input element](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input). However, if the element is inside
the `<label>` element that has an associated
[control](https://developer.mozilla.org/en-US/docs/Web/API/HTMLLabelElement/control), targets the control instead.

Parameters
----------
files : Union[Sequence[Union[pathlib.Path, str]], Sequence[{name: str, mimeType: str, buffer: bytes}], pathlib.Path, str, {name: str, mimeType: str, buffer: bytes}]
timeout : Union[float, None]
    Maximum time in milliseconds. Defaults to `30000` (30 seconds). Pass `0` to disable timeout. The default value can
    be changed by using the `browser_context.set_default_timeout()` or `page.set_default_timeout()` methods.
no_wait_after : Union[bool, None]
    This option has no effect.
    Deprecated: This option has no effect.
rJ  r   r  Nr   rE   rF   set_input_filesr   rI   rJ  r   r	  s       rJ   rN  ElementHandle.set_input_files	  sJ     F &&..00ooe,g 1  
 	
r  c                 z   #    [         R                  " U R                  R                  5       I Sh  vN 5      $  N7f)zwElementHandle.focus

Calls [focus](https://developer.mozilla.org/en-US/docs/Web/API/HTMLElement/focus) on the element.
Nr   rE   rF   focusrH   s    rJ   rS  ElementHandle.focus	  s+      &&T^^-A-A-C'CDD'Cry   rv  r   r	  r   c          	      z   #    [         R                  " U R                  R                  XX4S9I Sh  vN 5      $  N7f)a  ElementHandle.type

Focuses the element, and then sends a `keydown`, `keypress`/`input`, and `keyup` event for each character in the
text.

To press a special key, like `Control` or `ArrowDown`, use `element_handle.press()`.

**Usage**

Parameters
----------
text : str
    A text to type into a focused element.
delay : Union[float, None]
    Time to wait between key presses in milliseconds. Defaults to 0.
timeout : Union[float, None]
    Maximum time in milliseconds. Defaults to `30000` (30 seconds). Pass `0` to disable timeout. The default value can
    be changed by using the `browser_context.set_default_timeout()` or `page.set_default_timeout()` methods.
no_wait_after : Union[bool, None]
    This option has no effect.
    Deprecated: This option has no effect.
r   rv  r   r  Nrx  rI   r   rv  r   r	  s        rJ   ry  ElementHandle.type	  @     > &&..%% &  
 	
ry   rh  c          	      z   #    [         R                  " U R                  R                  XX4S9I Sh  vN 5      $  N7f)a%  ElementHandle.press

Focuses the element, and then uses `keyboard.down()` and `keyboard.up()`.

`key` can specify the intended
[keyboardEvent.key](https://developer.mozilla.org/en-US/docs/Web/API/KeyboardEvent/key) value or a single character
to generate the text for. A superset of the `key` values can be found
[here](https://developer.mozilla.org/en-US/docs/Web/API/KeyboardEvent/key/Key_Values). Examples of the keys are:

`F1` - `F12`, `Digit0`- `Digit9`, `KeyA`- `KeyZ`, `Backquote`, `Minus`, `Equal`, `Backslash`, `Backspace`, `Tab`,
`Delete`, `Escape`, `ArrowDown`, `End`, `Enter`, `Home`, `Insert`, `PageDown`, `PageUp`, `ArrowRight`, `ArrowUp`,
etc.

Following modification shortcuts are also supported: `Shift`, `Control`, `Alt`, `Meta`, `ShiftLeft`,
`ControlOrMeta`.

Holding down `Shift` will type the text that corresponds to the `key` in the upper case.

If `key` is a single character, it is case-sensitive, so the values `a` and `A` will generate different respective
texts.

Shortcuts such as `key: "Control+o"`, `key: "Control++` or `key: "Control+Shift+T"` are supported as well. When
specified with the modifier, modifier is pressed and being held while the subsequent key is being pressed.

Parameters
----------
key : str
    Name of the key to press or a character to generate, such as `ArrowLeft` or `a`.
delay : Union[float, None]
    Time to wait between `keydown` and `keyup` in milliseconds. Defaults to 0.
timeout : Union[float, None]
    Maximum time in milliseconds. Defaults to `30000` (30 seconds). Pass `0` to disable timeout. The default value can
    be changed by using the `browser_context.set_default_timeout()` or `page.set_default_timeout()` methods.
no_wait_after : Union[bool, None]
    Actions that initiate navigations are waiting for these navigations to happen and for pages to start loading. You
    can opt out of waiting via setting this flag. You would only need this option in the exceptional cases such as
    navigating to inaccessible pages. Defaults to `false`.
    Deprecated: This option will default to `true` in the future.
rh  rv  r   r  Nr|  rI   rh  rv  r   r	  s        rJ   r}  ElementHandle.press	  sA     ` &&..&&g '  
 	
ry   r  r   r
  r	  r  checkedc                   #    [         R                  " U R                  R                  UUUUUUS9I Sh  vN 5      $  N7f)a  ElementHandle.set_checked

This method checks or unchecks an element by performing the following steps:
1. Ensure that element is a checkbox or a radio input. If not, this method throws.
1. If the element already has the right checked state, this method returns immediately.
1. Wait for [actionability](https://playwright.dev/python/docs/actionability) checks on the matched element, unless `force` option is set. If
   the element is detached during the checks, the whole action is retried.
1. Scroll the element into view if needed.
1. Use `page.mouse` to click in the center of the element.
1. Ensure that the element is now checked or unchecked. If not, this method throws.

When all steps combined have not finished during the specified `timeout`, this method throws a `TimeoutError`.
Passing zero timeout disables this.

Parameters
----------
checked : bool
    Whether to check or uncheck the checkbox.
position : Union[{x: float, y: float}, None]
    A point to use relative to the top-left corner of element padding box. If not specified, uses some visible point of
    the element.
timeout : Union[float, None]
    Maximum time in milliseconds. Defaults to `30000` (30 seconds). Pass `0` to disable timeout. The default value can
    be changed by using the `browser_context.set_default_timeout()` or `page.set_default_timeout()` methods.
force : Union[bool, None]
    Whether to bypass the [actionability](../actionability.md) checks. Defaults to `false`.
no_wait_after : Union[bool, None]
    This option has no effect.
    Deprecated: This option has no effect.
trial : Union[bool, None]
    When set, this method only performs the [actionability](../actionability.md) checks and skips the action. Defaults
    to `false`. Useful to wait until the element is ready for the action without performing it.
r`  r  r   r
  r  r  Nr   rE   rF   set_checkedrI   r`  r  r   r
  r	  r  s          rJ   rd  ElementHandle.set_checked
  sN     X &&..,,!) -  	
 		
   2?=	?c          
         #    [         R                  " U R                  R                  UUUUUS9I Sh  vN 5      $  N7f)a  ElementHandle.check

This method checks the element by performing the following steps:
1. Ensure that element is a checkbox or a radio input. If not, this method throws. If the element is already
   checked, this method returns immediately.
1. Wait for [actionability](https://playwright.dev/python/docs/actionability) checks on the element, unless `force` option is set.
1. Scroll the element into view if needed.
1. Use `page.mouse` to click in the center of the element.
1. Ensure that the element is now checked. If not, this method throws.

If the element is detached from the DOM at any moment during the action, this method throws.

When all steps combined have not finished during the specified `timeout`, this method throws a `TimeoutError`.
Passing zero timeout disables this.

Parameters
----------
position : Union[{x: float, y: float}, None]
    A point to use relative to the top-left corner of element padding box. If not specified, uses some visible point of
    the element.
timeout : Union[float, None]
    Maximum time in milliseconds. Defaults to `30000` (30 seconds). Pass `0` to disable timeout. The default value can
    be changed by using the `browser_context.set_default_timeout()` or `page.set_default_timeout()` methods.
force : Union[bool, None]
    Whether to bypass the [actionability](../actionability.md) checks. Defaults to `false`.
no_wait_after : Union[bool, None]
    This option has no effect.
    Deprecated: This option has no effect.
trial : Union[bool, None]
    When set, this method only performs the [actionability](../actionability.md) checks and skips the action. Defaults
    to `false`. Useful to wait until the element is ready for the action without performing it.
r  r   r
  r  r  Nr   rE   rF   checkrI   r  r   r
  r	  r  s         rJ   rk  ElementHandle.checkJ
  sK     T &&..&&!) '  
 	
   1><	>c          
         #    [         R                  " U R                  R                  UUUUUS9I Sh  vN 5      $  N7f)a  ElementHandle.uncheck

This method checks the element by performing the following steps:
1. Ensure that element is a checkbox or a radio input. If not, this method throws. If the element is already
   unchecked, this method returns immediately.
1. Wait for [actionability](https://playwright.dev/python/docs/actionability) checks on the element, unless `force` option is set.
1. Scroll the element into view if needed.
1. Use `page.mouse` to click in the center of the element.
1. Ensure that the element is now unchecked. If not, this method throws.

If the element is detached from the DOM at any moment during the action, this method throws.

When all steps combined have not finished during the specified `timeout`, this method throws a `TimeoutError`.
Passing zero timeout disables this.

Parameters
----------
position : Union[{x: float, y: float}, None]
    A point to use relative to the top-left corner of element padding box. If not specified, uses some visible point of
    the element.
timeout : Union[float, None]
    Maximum time in milliseconds. Defaults to `30000` (30 seconds). Pass `0` to disable timeout. The default value can
    be changed by using the `browser_context.set_default_timeout()` or `page.set_default_timeout()` methods.
force : Union[bool, None]
    Whether to bypass the [actionability](../actionability.md) checks. Defaults to `false`.
no_wait_after : Union[bool, None]
    This option has no effect.
    Deprecated: This option has no effect.
trial : Union[bool, None]
    When set, this method only performs the [actionability](../actionability.md) checks and skips the action. Defaults
    to `false`. Useful to wait until the element is ready for the action without performing it.
ri  Nr   rE   rF   uncheckrl  s         rJ   rq  ElementHandle.uncheck~
  sK     T &&..((!) )  
 	
rn  c                 z   #    [         R                  " U R                  R                  5       I Sh  vN 5      $  N7f)a  ElementHandle.bounding_box

This method returns the bounding box of the element, or `null` if the element is not visible. The bounding box is
calculated relative to the main frame viewport - which is usually the same as the browser window.

Scrolling affects the returned bounding box, similarly to
[Element.getBoundingClientRect](https://developer.mozilla.org/en-US/docs/Web/API/Element/getBoundingClientRect).
That means `x` and/or `y` may be negative.

Elements from child frames return the bounding box relative to the main frame, unlike the
[Element.getBoundingClientRect](https://developer.mozilla.org/en-US/docs/Web/API/Element/getBoundingClientRect).

Assuming the page is static, it is safe to use bounding box coordinates to perform input. For example, the
following snippet should click the center of the element.

**Usage**

```py
box = await element_handle.bounding_box()
await page.mouse.click(box["x"] + box["width"] / 2, box["y"] + box["height"] / 2)
```

Returns
-------
Union[{x: float, y: float, width: float, height: float}, None]
Nr   rd   rF   bounding_boxrH   s    rJ   ru  ElementHandle.bounding_box
  s+     8 ))0K0K0M*MNN*Mry   r   ry  r   qualityomit_background
animationscaretscalemask
mask_colorstylejpegpngr   rx  ry  rz  allowdisabledr{  hideinitialr|  cssdevicer}  r3   r~  r  c                   #    [         R                  " U R                  R                  UUUUUUUU[         R                  " U	5      U
US9I Sh  vN 5      $  N7f)a  ElementHandle.screenshot

This method captures a screenshot of the page, clipped to the size and position of this particular element. If the
element is covered by other elements, it will not be actually visible on the screenshot. If the element is a
scrollable container, only the currently scrolled content will be visible on the screenshot.

This method waits for the [actionability](https://playwright.dev/python/docs/actionability) checks, then scrolls element into view before taking
a screenshot. If the element is detached from DOM, the method throws an error.

Returns the buffer with the captured screenshot.

Parameters
----------
timeout : Union[float, None]
    Maximum time in milliseconds. Defaults to `30000` (30 seconds). Pass `0` to disable timeout. The default value can
    be changed by using the `browser_context.set_default_timeout()` or `page.set_default_timeout()` methods.
type : Union["jpeg", "png", None]
    Specify screenshot type, defaults to `png`.
path : Union[pathlib.Path, str, None]
    The file path to save the image to. The screenshot type will be inferred from file extension. If `path` is a
    relative path, then it is resolved relative to the current working directory. If no path is provided, the image
    won't be saved to the disk.
quality : Union[int, None]
    The quality of the image, between 0-100. Not applicable to `png` images.
omit_background : Union[bool, None]
    Hides default white background and allows capturing screenshots with transparency. Not applicable to `jpeg` images.
    Defaults to `false`.
animations : Union["allow", "disabled", None]
    When set to `"disabled"`, stops CSS animations, CSS transitions and Web Animations. Animations get different
    treatment depending on their duration:
    - finite animations are fast-forwarded to completion, so they'll fire `transitionend` event.
    - infinite animations are canceled to initial state, and then played over after the screenshot.

    Defaults to `"allow"` that leaves animations untouched.
caret : Union["hide", "initial", None]
    When set to `"hide"`, screenshot will hide text caret. When set to `"initial"`, text caret behavior will not be
    changed.  Defaults to `"hide"`.
scale : Union["css", "device", None]
    When set to `"css"`, screenshot will have a single pixel per each css pixel on the page. For high-dpi devices, this
    will keep screenshots small. Using `"device"` option will produce a single pixel per each device pixel, so
    screenshots of high-dpi devices will be twice as large or even larger.

    Defaults to `"device"`.
mask : Union[Sequence[Locator], None]
    Specify locators that should be masked when the screenshot is taken. Masked elements will be overlaid with a pink
    box `#FF00FF` (customized by `maskColor`) that completely covers its bounding box. The mask is also applied to
    invisible elements, see [Matching only visible elements](../locators.md#matching-only-visible-elements) to disable
    that.
mask_color : Union[str, None]
    Specify the color of the overlay box for masked elements, in
    [CSS color format](https://developer.mozilla.org/en-US/docs/Web/CSS/color_value). Default color is pink `#FF00FF`.
style : Union[str, None]
    Text of the stylesheet to apply while making the screenshot. This is where you can hide dynamic elements, make
    elements invisible or change their properties to help you creating repeatable screenshots. This stylesheet pierces
    the Shadow DOM and applies to the inner frames.

Returns
-------
bytes
r   ry  r   rx  omitBackgroundrz  r{  r|  r}  	maskColorr  Nr   rE   rF   
screenshotr   rI   r   ry  r   rx  ry  rz  r{  r|  r}  r~  r  s               rJ   r  ElementHandle.screenshot
  sf     X &&..++.%__T*$ ,  
 	
   AAA	Aselectorc                 x   #    [         R                  " U R                  R                  US9I Sh  vN 5      $  N7f)a  ElementHandle.query_selector

The method finds an element matching the specified selector in the `ElementHandle`'s subtree. If no elements match
the selector, returns `null`.

Parameters
----------
selector : str
    A selector to query for.

Returns
-------
Union[ElementHandle, None]
r  Nr   rd   rF   query_selectorrI   r  s     rJ   r  ElementHandle.query_selector,  s5       ))..///BB
 	
Br   c                 x   #    [         R                  " U R                  R                  US9I Sh  vN 5      $  N7f)a!  ElementHandle.query_selector_all

The method finds all elements matching the specified selector in the `ElementHandle`s subtree. If no elements match
the selector, returns empty array.

Parameters
----------
selector : str
    A selector to query for.

Returns
-------
List[ElementHandle]
r  Nr   r   rF   query_selector_allr  s     rJ   r   ElementHandle.query_selector_all@  5       %%..33X3FF
 	
Fr   r  r  c           	         #    [         R                  " U R                  R                  X[         R                  " U5      S9I Sh  vN 5      $  N7f)a  ElementHandle.eval_on_selector

Returns the return value of `expression`.

The method finds an element matching the specified selector in the `ElementHandle`s subtree and passes it as a
first argument to `expression`. If no elements match the selector, the method throws an error.

If `expression` returns a [Promise], then `element_handle.eval_on_selector()` would wait for the promise to
resolve and return its value.

**Usage**

```py
tweet_handle = await page.query_selector(".tweet")
assert await tweet_handle.eval_on_selector(".like", "node => node.innerText") == "100"
assert await tweet_handle.eval_on_selector(".retweets", "node => node.innerText") == "10"
```

Parameters
----------
selector : str
    A selector to query for.
expression : str
    JavaScript expression to be evaluated in the browser context. If the expression evaluates to a function, the
    function is automatically invoked.
arg : Union[Any, None]
    Optional argument to pass to `expression`.

Returns
-------
Any
r  r  r  Nr   rE   rF   eval_on_selectorr   rI   r  r  r  s       rJ   r  ElementHandle.eval_on_selectorT  sJ     H &&..11!gooc>R 2  
 	
r  c           	         #    [         R                  " U R                  R                  X[         R                  " U5      S9I Sh  vN 5      $  N7f)a  ElementHandle.eval_on_selector_all

Returns the return value of `expression`.

The method finds all elements matching the specified selector in the `ElementHandle`'s subtree and passes an array
of matched elements as a first argument to `expression`.

If `expression` returns a [Promise], then `element_handle.eval_on_selector_all()` would wait for the promise to
resolve and return its value.

**Usage**

```html
<div class="feed">
  <div class="tweet">Hello!</div>
  <div class="tweet">Hi!</div>
</div>
```

```py
feed_handle = await page.query_selector(".feed")
assert await feed_handle.eval_on_selector_all(".tweet", "nodes => nodes.map(n => n.innerText)") == ["hello!", "hi!"]
```

Parameters
----------
selector : str
    A selector to query for.
expression : str
    JavaScript expression to be evaluated in the browser context. If the expression evaluates to a function, the
    function is automatically invoked.
arg : Union[Any, None]
    Optional argument to pass to `expression`.

Returns
-------
Any
r  Nr   rE   rF   eval_on_selector_allr   r  s       rJ   r  "ElementHandle.eval_on_selector_all~  sJ     T &&..55!gooc>R 6  
 	
r  state)r  editableenabledhiddenstablevisiblec                x   #    [         R                  " U R                  R                  XS9I Sh  vN 5      $  N7f)a  ElementHandle.wait_for_element_state

Returns when the element satisfies the `state`.

Depending on the `state` parameter, this method waits for one of the [actionability](https://playwright.dev/python/docs/actionability) checks to
pass. This method throws when the element is detached while waiting, unless waiting for the `"hidden"` state.
- `"visible"` Wait until the element is [visible](https://playwright.dev/python/docs/actionability#visible).
- `"hidden"` Wait until the element is [not visible](https://playwright.dev/python/docs/actionability#visible) or not attached. Note that
  waiting for hidden does not throw when the element detaches.
- `"stable"` Wait until the element is both [visible](https://playwright.dev/python/docs/actionability#visible) and
  [stable](https://playwright.dev/python/docs/actionability#stable).
- `"enabled"` Wait until the element is [enabled](https://playwright.dev/python/docs/actionability#enabled).
- `"disabled"` Wait until the element is [not enabled](https://playwright.dev/python/docs/actionability#enabled).
- `"editable"` Wait until the element is [editable](https://playwright.dev/python/docs/actionability#editable).

If the element does not satisfy the condition for the `timeout` milliseconds, this method will throw.

Parameters
----------
state : Union["disabled", "editable", "enabled", "hidden", "stable", "visible"]
    A state to wait for, see below for more details.
timeout : Union[float, None]
    Maximum time in milliseconds. Defaults to `30000` (30 seconds). Pass `0` to disable timeout. The default value can
    be changed by using the `browser_context.set_default_timeout()` or `page.set_default_timeout()` methods.
r  r   N)r   rE   rF   wait_for_element_staterI   r  r   s      rJ   r  $ElementHandle.wait_for_element_state  s6     D &&..77e7UU
 	
Ur   )r  r   strictattacheddetachedr  r  r  c          	      z   #    [         R                  " U R                  R                  XX4S9I Sh  vN 5      $  N7f)a  ElementHandle.wait_for_selector

Returns element specified by selector when it satisfies `state` option. Returns `null` if waiting for `hidden` or
`detached`.

Wait for the `selector` relative to the element handle to satisfy `state` option (either appear/disappear from dom,
or become visible/hidden). If at the moment of calling the method `selector` already satisfies the condition, the
method will return immediately. If the selector doesn't satisfy the condition for the `timeout` milliseconds, the
function will throw.

**Usage**

```py
await page.set_content("<div><span></span></div>")
div = await page.query_selector("div")
# waiting for the "span" selector relative to the div.
span = await div.wait_for_selector("span", state="attached")
```

**NOTE** This method does not work across navigations, use `page.wait_for_selector()` instead.

Parameters
----------
selector : str
    A selector to query for.
state : Union["attached", "detached", "hidden", "visible", None]
    Defaults to `'visible'`. Can be either:
    - `'attached'` - wait for element to be present in DOM.
    - `'detached'` - wait for element to not be present in DOM.
    - `'visible'` - wait for element to have non-empty bounding box and no `visibility:hidden`. Note that element
      without any content or with `display:none` has an empty bounding box and is not considered visible.
    - `'hidden'` - wait for element to be either detached from DOM, or have an empty bounding box or
      `visibility:hidden`. This is opposite to the `'visible'` option.
timeout : Union[float, None]
    Maximum time in milliseconds. Defaults to `30000` (30 seconds). Pass `0` to disable timeout. The default value can
    be changed by using the `browser_context.set_default_timeout()` or `page.set_default_timeout()` methods.
strict : Union[bool, None]
    When true, the call requires selector to resolve to a single element. If given selector resolves to more than one
    element, the call throws an exception.

Returns
-------
Union[ElementHandle, None]
)r  r  r   r  Nr   rd   rF   wait_for_selector)rI   r  r  r   r  s        rJ   r  ElementHandle.wait_for_selector  sA     n ))..22! 3  
 	
ry   r   r  r   )=r   r   r   r   r   r   r  r  r  r   r  r  r  r  r   r  r  r  r  r  r  r   r  r  r  Sequencer   r   r  r   r  r  r	  r   r.  r  r;  rA  rG  r
  r  r   rN  rS  ry  r}  rd  rk  rq  r   ru  r   r  r  r  r   r  r  r  r  r   r   rM   rJ   r'   r'     s   
GFOOO< 
G
N6??7#; 
N
PV__W%= 
PV V0D V"
LFOOC$8 
L
J# 
J
J# 
J
J$ 
J
K4 
K
K4 
K
J$ 
J
I 
I
J$ 
J EI2
2
%+__V[[%A2
	2
j 48
 //%0
	
< .2*./3'+'+7
 ??OOG$VWX
7
 //(+7
 '7
 t,7
 t$7
 t$7
 
7
| .2(,FJ,0*.'+/3'+F
 ??OOG$VWX
F
 //(+F
 u%F
 (A BCF
 __S)F
 'F
 t$F
 t,F
 t$F
 
F
Z .2(,FJ*.'+/3'+A
 ??OOG$VWX
A
 //(+A
 u%A
 (A BCA
 'A
 t$A
 t,A
 t$A
 
A
J KOJ
 KOJN *.'+/3J
v||C1E,EFGJ
 v||C1E,EFG	J

 v||C1E,EFGJ
 LL&///*JJK
J
 'J
 t$J
 t,J
 
S	J
b .2*.'+/3'+9
 ??OOG$VWX
9
 //(+9
 '9
 t$9
 t,9
 t$9
 
9
~ +//3'+&
&
 '	&

 t,&
 t$&
 
&
V (,*.	
 t$
 '	

 

8 FJ 
FOOE,B 
c 
D +//3'
||LLOOFLLgll):;<OOK(	*
'
 ''
 t,'
 
'
RE )-*./3#
#
 u%	#

 '#
 t,#
 
#
R )-*./34
4
 u%	4

 '4
 t,4
 
4
t /3*.'+/3'+5
5
 //(+	5

 '5
 t$5
 t,5
 t$5
 
5
t /3*.'+/3'+2
 //(+2
 '	2

 t$2
 t,2
 t$2
 
2
n /3*.'+/3'+2
 //(+2
 '	2

 t$2
 t,2
 t$2
 
2
hOFOOI$> OB +/8<AE(,15DH=A;?<@+/&*Z
 'Z
 oogm45	Z

 oofll3+<=>Z
 %Z
  .Z
 OOG,?$@AZ
 w'89:Z
 w78Z
 oofooi89Z
 OOC(Z
 s#Z
 
Z
x
S 
V___5U 
(
 
_9U 
* RV(
(
),(
39??6::3N(
	(
V RV.
.
),.
39??6::3N.
	.
l +/$
L
$
 '$
 
$
X *.(,;
;
 ?@
	;
 ';
 %;
 
	);
 ;
rM   r'   c                       \ rS rSrSSS.S\R
                  \   S\R
                  S   S\R
                  \R                     4S jjrS	r	g)
r   i  N)interesting_onlyrootr  r  r'   rB   c                   #    [         R                  " U R                  R                  U[         R                  " U5      S9I Sh  vN 5      $  N7f)a  Accessibility.snapshot

Captures the current state of the accessibility tree. The returned object represents the root accessible node of
the page.

**NOTE** The Chromium accessibility tree contains nodes that go unused on most platforms and by most screen
readers. Playwright will discard them as well for an easier to process tree, unless `interestingOnly` is set to
`false`.

**Usage**

An example of dumping the entire accessibility tree:

```py
snapshot = await page.accessibility.snapshot()
print(snapshot)
```

An example of logging the focused node's name:

```py
def find_focused_node(node):
    if node.get("focused"):
        return node
    for child in (node.get("children") or []):
        found_node = find_focused_node(child)
        if found_node:
            return found_node
    return None

snapshot = await page.accessibility.snapshot()
node = find_focused_node(snapshot)
if node:
    print(node["name"])
```

Parameters
----------
interesting_only : Union[bool, None]
    Prune uninteresting nodes from the tree. Defaults to `true`.
root : Union[ElementHandle, None]
    The root DOM element for the snapshot. Defaults to the whole page.

Returns
-------
Union[Dict, None]
)interestingOnlyr  N)r   rE   rF   snapshotr   )rI   r  r  s      rJ   r  Accessibility.snapshot  sJ     l &&..)) 0wt7L *  
 	
r  r   )
r   r   r   r   r   r   r   r   r  r   r   rM   rJ   r   r     sQ    
 3715	:
 !//$/:
 ooo.	:

 
	%:
 :
rM   r   c            
       @   \ rS rSr\SS j5       r\SS j5       rS\4S jrSSS.S\	R                  \\R                  \\	R                  \	R                  \\R                  4      \	R                  \   4   S	\	R                   \   S
\	R                   \   SS4S jjrSrg)r,   iW  rB   c                 V    [         R                  " U R                  R                  5      $ )zSFileChooser.page

Returns page this file chooser belongs to.

Returns
-------
Page
r   r`   rF   pagerH   s    rJ   r  FileChooser.pageY         !4!455rM   c                 V    [         R                  " U R                  R                  5      $ )zmFileChooser.element

Returns input element associated with this file chooser.

Returns
-------
ElementHandle
)r   r`   rF   r*  rH   s    rJ   r*  FileChooser.elemente  r   rM   c                 ^    [         R                  " U R                  R                  5       5      $ )ziFileChooser.is_multiple

Returns whether this file chooser accepts multiple files.

Returns
-------
bool
)r   rE   rF   is_multiplerH   s    rJ   r  FileChooser.is_multipleq  "     &&t~~'A'A'CDDrM   NrI  rJ  r   r	  c                   #    [         R                  " U R                  R                  [         R                  " U5      X#S9I Sh  vN 5      $  N7f)a  FileChooser.set_files

Sets the value of the file input this chooser is associated with. If some of the `filePaths` are relative paths,
then they are resolved relative to the current working directory. For empty array, clears the selected files.

Parameters
----------
files : Union[Sequence[Union[pathlib.Path, str]], Sequence[{name: str, mimeType: str, buffer: bytes}], pathlib.Path, str, {name: str, mimeType: str, buffer: bytes}]
timeout : Union[float, None]
    Maximum time in milliseconds. Defaults to `30000` (30 seconds). Pass `0` to disable timeout. The default value can
    be changed by using the `browser_context.set_default_timeout()` or `page.set_default_timeout()` methods.
no_wait_after : Union[bool, None]
    This option has no effect.
    Deprecated: This option has no effect.
rL  N)r   rE   rF   	set_filesr   rO  s       rJ   r  FileChooser.set_files}  sI     : &&..**ooe,g +  
 	
r  r   rB   r9   rB   r'   )r   r   r   r   r   r  r*  r   r  r   r	  r   r
  r  r   r  r   r  r  r   r   rM   rJ   r,   r,   W  s    	6 	6 	9 	9
ET 
E, +//3!
||LLOOFLLgll):;<OOK(	*
!
 '!
 t,!
 
!
 !
rM   r,   c                   :    \ rS rSr\SS j5       r\S\4S j5       r\S\4S j5       r\S\	R                  S    4S j5       r\S\	R                  S    4S j5       rSSSS	.S
\S\	R                  \   S\	R                  \S      S\	R                  \   S\	R                  S   4
S jjrSSSS.S
\	R                  \	R"                  \\	R$                  \   \	R&                  \/\4   4      S\	R                  \S      S\	R                  \   S\S   4S jjrSSS.S
\	R"                  \\	R$                  \   \	R&                  \/\4   4   S\	R                  \S      S\	R                  \   SS4S jjr SSS.S\	R                  \S      S\	R                  \   SS4S jjjrSS jr SS\S\	R                  \	R4                     S\	R4                  4S jjr SS\S\	R                  \	R4                     SS4S jjrSS .S!\S"\	R                  \   S\	R                  S   4S# jjrS!\S\	R                  S   4S$ jrSSSS%.S!\S"\	R                  \   S\	R                  \   S\	R                  \S&      S\	R                  S   4
S' jjrSSS(.S!\S"\	R                  \   S\	R                  \   S\4S) jjr SSS(.S!\S"\	R                  \   S\	R                  \   S\4S* jjr!SSS(.S!\S"\	R                  \   S\	R                  \   S\4S+ jjr"SSS(.S!\S"\	R                  \   S\	R                  \   S\4S, jjr#SSS(.S!\S"\	R                  \   S\	R                  \   S\4S- jjr$SSS(.S!\S"\	R                  \   S\	R                  \   S\4S. jjr% SSSS(.S!\S/\S0\	R                  \	RL                     S"\	R                  \   S\	R                  \   SS4S1 jjjr' SSS .S!\S\S\	R                  \	R4                     S"\	R                  \   S\	R4                  4
S2 jjjr( SS!\S\S\	R                  \	R4                     S\	R4                  4S3 jjr)S\4S4 jr*SSS5.S6\S\	R                  \   S\	R                  \S      SS4S7 jjr+S\4S8 jr,SSSSS9.S
\	R                  \   S:\	R                  \	R"                  \\-R\                  4      S;\	R                  \   S/\	R                  \   SS4
S< jjr/SSSS=.S
\	R                  \   S:\	R                  \	R"                  \\-R\                  4      S;\	R                  \   SS4S> jjr0SSSSSSSSSSS?.
S!\S@\	R                  \	Rb                  \SA         SB\	R                  \2   SC\	R                  \   SD\	R                  \SE      SF\	R                  \3   S\	R                  \   SG\	R                  \   SH\	R                  \   S"\	R                  \   SI\	R                  \   SS4SJ jjr4SSSSSSSSSSK.	S!\S@\	R                  \	Rb                  \SA         SB\	R                  \2   SC\	R                  \   SD\	R                  \SE      S\	R                  \   SG\	R                  \   SH\	R                  \   S"\	R                  \   SI\	R                  \   SS4SL jjr5SSSSSSSSM.S!\S@\	R                  \	Rb                  \SA         SB\	R                  \2   S\	R                  \   SG\	R                  \   SH\	R                  \   S"\	R                  \   SI\	R                  \   SS4SN jjr6SSSSSO.S!\SP\S\	R                  \   SH\	R                  \   S"\	R                  \   SG\	R                  \   SS4SQ jjr7SSSSSR.S!\SS\	R                  \	R"                  \\	R$                  \   4      ST\	R                  \	R"                  \\	R$                  \   4      SU\	R                  SV   SW\	R                  SV   SSV4SX jjr8SSY.SZ\	R"                  \\	R$                  \   4   S[\	R                  \   SSV4S\ jjr9SSY.SZ\	R"                  \\	R$                  \   4   S[\	R                  \   SSV4S] jjr:SSY.SZ\	R"                  \\	R$                  \   4   S[\	R                  \   SSV4S^ jjr;SSSSSSSSSS_.	S`\Sa   Sb\	R                  \   Sc\	R                  \   Sd\	R                  \   Se\	R                  \   Sf\	R                  \3   Sg\	R                  \	R"                  \\	R$                  \   4      Sh\	R                  \   Si\	R                  \   S[\	R                  \   SSV4Sj jjr<Sk\	R"                  \\	R$                  \   4   SSV4Sl jr=SSY.SZ\	R"                  \\	R$                  \   4   S[\	R                  \   SSV4Sm jjr>SSY.SZ\	R"                  \\	R$                  \   4   S[\	R                  \   SSV4Sn jjr?S!\SSo4Sp jr@SSS(.S!\S"\	R                  \   S\	R                  \   SS4Sq jjrASSS(.S!\S"\	R                  \   S\	R                  \   S\	R                  \   4Sr jjrBSSS(.S!\S"\	R                  \   S\	R                  \   S\4Ss jjrCSSS(.S!\S"\	R                  \   S\	R                  \   S\4St jjrDSSS(.S!\Sg\S"\	R                  \   S\	R                  \   S\	R                  \   4
Su jjrESSSSSSSSv.S!\S@\	R                  \	Rb                  \SA         SB\	R                  \2   S\	R                  \   SH\	R                  \   SG\	R                  \   S"\	R                  \   SI\	R                  \   SS4Sw jjrFSSSSSSSSx.Sy\Sz\S{\	R                  \2   S|\	R                  \2   SG\	R                  \   SH\	R                  \   S"\	R                  \   S\	R                  \   SI\	R                  \   SS4S} jjrG SSSSSSSSS~.S!\SP\	R                  \	R"                  \\	Rb                  \   4      S\	R                  \	R"                  \3\	Rb                  \3   4      S\	R                  \	R"                  \\	Rb                  \   4      S\	R                  \	R"                  S\	Rb                  S   4      S\	R                  \   SH\	R                  \   S"\	R                  \   SG\	R                  \   S\	R                  \   4S jjjrHSSS(.S!\S"\	R                  \   S\	R                  \   S\4S jjrISSSS.S!\S\	R"                  \\-R\                  \J\	Rb                  \	R"                  \\-R\                  4      \	Rb                  \J   4   S"\	R                  \   S\	R                  \   SH\	R                  \   SS4S jjrKSSSSS.S!\SZ\SC\	R                  \   S"\	R                  \   S\	R                  \   SH\	R                  \   SS4S jjrLSSSSS.S!\S\SC\	R                  \   S"\	R                  \   S\	R                  \   SH\	R                  \   SS4S jjrMSSSSSSS.S!\SB\	R                  \2   S\	R                  \   SG\	R                  \   SH\	R                  \   S"\	R                  \   SI\	R                  \   SS4S jjrNSSSSSSS.S!\SB\	R                  \2   S\	R                  \   SG\	R                  \   SH\	R                  \   S"\	R                  \   SI\	R                  \   SS4S jjrOS\SS4S jrPSSSS.S\S\	R                  \	R4                     S\	R                  \   S\	R                  \	R"                  \\S   4      SS4
S jjrQS\4S jrRSSSSSSS.S!\Sb\SB\	R                  \2   S\	R                  \   SG\	R                  \   SH\	R                  \   S"\	R                  \   SI\	R                  \   SS4S jjrSSrTg)r-   i  rB   c                 V    [         R                  " U R                  R                  5      $ )zJFrame.page

Returns the page containing this frame.

Returns
-------
Page
r  rH   s    rJ   r  
Frame.page  r  rM   c                 V    [         R                  " U R                  R                  5      $ )a  Frame.name

Returns frame's name attribute as specified in the tag.

If the name is empty, returns the id attribute instead.

**NOTE** This value is calculated once when the frame is created, and will not update if the attribute is changed
later.

Returns
-------
str
r   rE   rF   r   rH   s    rJ   r   
Frame.name  s     &&t~~':':;;rM   c                 V    [         R                  " U R                  R                  5      $ )z5Frame.url

Returns frame's url.

Returns
-------
str
rD   rH   s    rJ   rG   	Frame.url  rL   rM   c                 V    [         R                  " U R                  R                  5      $ )z}Frame.parent_frame

Parent frame, if any. Detached frames and main frames return `null`.

Returns
-------
Union[Frame, None]
)r   rd   rF   parent_framerH   s    rJ   r  Frame.parent_frame  s     ))$..*E*EFFrM   c                 V    [         R                  " U R                  R                  5      $ )z0Frame.child_frames

Returns
-------
List[Frame]
)r   r   rF   child_framesrH   s    rJ   r  Frame.child_frames  s     %%dnn&A&ABBrM   Nr   
wait_untilrefererrG   r   r  commitdomcontentloadedloadnetworkidler  r5   c          	      z   #    [         R                  " U R                  R                  XX4S9I Sh  vN 5      $  N7f)au	  Frame.goto

Returns the main resource response. In case of multiple redirects, the navigation will resolve with the response of
the last redirect.

The method will throw an error if:
- there's an SSL error (e.g. in case of self-signed certificates).
- target URL is invalid.
- the `timeout` is exceeded during navigation.
- the remote server does not respond or is unreachable.
- the main resource failed to load.

The method will not throw an error when any valid HTTP status code is returned by the remote server, including 404
"Not Found" and 500 "Internal Server Error".  The status code for such responses can be retrieved by calling
`response.status()`.

**NOTE** The method either throws an error or returns a main resource response. The only exceptions are navigation
to `about:blank` or navigation to the same URL with a different hash, which would succeed and return `null`.

**NOTE** Headless mode doesn't support navigation to a PDF document. See the
[upstream issue](https://bugs.chromium.org/p/chromium/issues/detail?id=761295).

Parameters
----------
url : str
    URL to navigate frame to. The url should include scheme, e.g. `https://`.
timeout : Union[float, None]
    Maximum operation time in milliseconds, defaults to 30 seconds, pass `0` to disable timeout. The default value can
    be changed by using the `browser_context.set_default_navigation_timeout()`,
    `browser_context.set_default_timeout()`, `page.set_default_navigation_timeout()` or
    `page.set_default_timeout()` methods.
wait_until : Union["commit", "domcontentloaded", "load", "networkidle", None]
    When to consider operation succeeded, defaults to `load`. Events can be either:
    - `'domcontentloaded'` - consider operation to be finished when the `DOMContentLoaded` event is fired.
    - `'load'` - consider operation to be finished when the `load` event is fired.
    - `'networkidle'` - **DISCOURAGED** consider operation to be finished when there are no network connections for
      at least `500` ms. Don't use this method for testing, rely on web assertions to assess readiness instead.
    - `'commit'` - consider operation to be finished when network response is received and the document started
      loading.
referer : Union[str, None]
    Referer header value. If provided it will take preference over the referer header value set by
    `page.set_extra_http_headers()`.

Returns
-------
Union[Response, None]
rG   r   	waitUntilr  Nr   rd   rF   gotorI   rG   r   r  r  s        rJ   r  
Frame.goto  sA     t ))..%%J &  
 	
ry   rG   r  r   c                z    [        U R                  R                  U R                  U5      X#S9R                  5      $ )a  Frame.expect_navigation

Waits for the frame navigation and returns the main resource response. In case of multiple redirects, the
navigation will resolve with the response of the last redirect. In case of navigation to a different anchor or
navigation due to History API usage, the navigation will resolve with `null`.

**Usage**

This method waits for the frame to navigate to a new URL. It is useful for when you run code which will indirectly
cause the frame to navigate. Consider this example:

```py
async with frame.expect_navigation():
    await frame.click("a.delayed-navigation") # clicking the link will indirectly cause a navigation
# Resolves after navigation has finished
```

**NOTE** Usage of the [History API](https://developer.mozilla.org/en-US/docs/Web/API/History_API) to change the URL
is considered a navigation.

Parameters
----------
url : Union[Callable[[str], bool], Pattern[str], str, None]
    A glob pattern, regex pattern or predicate receiving [URL] to match while waiting for the navigation. Note that if
    the parameter is a string without wildcard characters, the method will wait for navigation to URL that is exactly
    equal to the string.
wait_until : Union["commit", "domcontentloaded", "load", "networkidle", None]
    When to consider operation succeeded, defaults to `load`. Events can be either:
    - `'domcontentloaded'` - consider operation to be finished when the `DOMContentLoaded` event is fired.
    - `'load'` - consider operation to be finished when the `load` event is fired.
    - `'networkidle'` - **DISCOURAGED** consider operation to be finished when there are no network connections for
      at least `500` ms. Don't use this method for testing, rely on web assertions to assess readiness instead.
    - `'commit'` - consider operation to be finished when network response is received and the document started
      loading.
timeout : Union[float, None]
    Maximum operation time in milliseconds, defaults to 30 seconds, pass `0` to disable timeout. The default value can
    be changed by using the `browser_context.set_default_navigation_timeout()`,
    `browser_context.set_default_timeout()`, `page.set_default_navigation_timeout()` or
    `page.set_default_timeout()` methods.

Returns
-------
EventContextManager[Response]
rG   r  r   r   rF   expect_navigationr:  r;  rI   rG   r  r   s       rJ   r  Frame.expect_navigation%  s>    p (NN,,&&s+z - f
 	
rM   r  r   c                   #    [         R                  " U R                  R                  U R	                  U5      X#S9I Sh  vN 5      $  N7f)ad  Frame.wait_for_url

Waits for the frame to navigate to the given URL.

**Usage**

```py
await frame.click("a.delayed-navigation") # clicking the link will indirectly cause a navigation
await frame.wait_for_url("**/target.html")
```

Parameters
----------
url : Union[Callable[[str], bool], Pattern[str], str]
    A glob pattern, regex pattern or predicate receiving [URL] to match while waiting for the navigation. Note that if
    the parameter is a string without wildcard characters, the method will wait for navigation to URL that is exactly
    equal to the string.
wait_until : Union["commit", "domcontentloaded", "load", "networkidle", None]
    When to consider operation succeeded, defaults to `load`. Events can be either:
    - `'domcontentloaded'` - consider operation to be finished when the `DOMContentLoaded` event is fired.
    - `'load'` - consider operation to be finished when the `load` event is fired.
    - `'networkidle'` - **DISCOURAGED** consider operation to be finished when there are no network connections for
      at least `500` ms. Don't use this method for testing, rely on web assertions to assess readiness instead.
    - `'commit'` - consider operation to be finished when network response is received and the document started
      loading.
timeout : Union[float, None]
    Maximum operation time in milliseconds, defaults to 30 seconds, pass `0` to disable timeout. The default value can
    be changed by using the `browser_context.set_default_navigation_timeout()`,
    `browser_context.set_default_timeout()`, `page.set_default_navigation_timeout()` or
    `page.set_default_timeout()` methods.
r  Nr   rE   rF   wait_for_urlr:  r  s       rJ   r  Frame.wait_for_urlc  L     R &&..--&&s+z .  
 	
rC  r4  r  r  r  r  c                x   #    [         R                  " U R                  R                  XS9I Sh  vN 5      $  N7f)a)  Frame.wait_for_load_state

Waits for the required load state to be reached.

This returns when the frame reaches a required load state, `load` by default. The navigation must have been
committed when this method is called. If current document has already reached the required state, resolves
immediately.

**NOTE** Most of the time, this method is not needed because Playwright
[auto-waits before every action](https://playwright.dev/python/docs/actionability).

**Usage**

```py
await frame.click("button") # click triggers navigation.
await frame.wait_for_load_state() # the promise resolves after "load" event.
```

Parameters
----------
state : Union["domcontentloaded", "load", "networkidle", None]
    Optional load state to wait for, defaults to `load`. If the state has been already reached while loading current
    document, the method resolves immediately. Can be one of:
    - `'load'` - wait for the `load` event to be fired.
    - `'domcontentloaded'` - wait for the `DOMContentLoaded` event to be fired.
    - `'networkidle'` - **DISCOURAGED** wait until there are no network connections for at least `500` ms. Don't use
      this method for testing, rely on web assertions to assess readiness instead.
timeout : Union[float, None]
    Maximum operation time in milliseconds, defaults to 30 seconds, pass `0` to disable timeout. The default value can
    be changed by using the `browser_context.set_default_navigation_timeout()`,
    `browser_context.set_default_timeout()`, `page.set_default_navigation_timeout()` or
    `page.set_default_timeout()` methods.
r  Nr   rE   rF   wait_for_load_stater  s      rJ   r  Frame.wait_for_load_state  s6     T &&..4454RR
 	
Rr   r'   c                 z   #    [         R                  " U R                  R                  5       I Sh  vN 5      $  N7f)a  Frame.frame_element

Returns the `frame` or `iframe` element handle which corresponds to this frame.

This is an inverse of `element_handle.content_frame()`. Note that returned handle actually belongs to the
parent frame.

This method throws an error if the frame has been detached before `frameElement()` returns.

**Usage**

```py
frame_element = await frame.frame_element()
content_frame = await frame_element.content_frame()
assert frame == content_frame
```

Returns
-------
ElementHandle
N)r   r`   rF   frame_elementrH   s    rJ   r  Frame.frame_element  s+     .   t~~'C'C'E!EFF!Ery   r  r  c                    #    [         R                  " U R                  R                  U[         R                  " U5      S9I Sh  vN 5      $  N7f)a;  Frame.evaluate

Returns the return value of `expression`.

If the function passed to the `frame.evaluate()` returns a [Promise], then `frame.evaluate()` would
wait for the promise to resolve and return its value.

If the function passed to the `frame.evaluate()` returns a non-[Serializable] value, then
`frame.evaluate()` returns `undefined`. Playwright also supports transferring some additional values that
are not serializable by `JSON`: `-0`, `NaN`, `Infinity`, `-Infinity`.

**Usage**

```py
result = await frame.evaluate("([x, y]) => Promise.resolve(x * y)", [7, 8])
print(result) # prints "56"
```

A string can also be passed in instead of a function.

```py
print(await frame.evaluate("1 + 2")) # prints "3"
x = 10
print(await frame.evaluate(f"1 + {x}")) # prints "11"
```

`ElementHandle` instances can be passed as an argument to the `frame.evaluate()`:

```py
body_handle = await frame.evaluate("document.body")
html = await frame.evaluate("([body, suffix]) => body.innerHTML + suffix", [body_handle, "hello"])
await body_handle.dispose()
```

Parameters
----------
expression : str
    JavaScript expression to be evaluated in the browser context. If the expression evaluates to a function, the
    function is automatically invoked.
arg : Union[Any, None]
    Optional argument to pass to `expression`.

Returns
-------
Any
r  Nr  r  s      rJ   r  Frame.evaluate  sJ     d &&..))%7??3+? *  
 	
r  r1   c                    #    [         R                  " U R                  R                  U[         R                  " U5      S9I Sh  vN 5      $  N7f)a  Frame.evaluate_handle

Returns the return value of `expression` as a `JSHandle`.

The only difference between `frame.evaluate()` and `frame.evaluate_handle()` is that
`frame.evaluate_handle()` returns `JSHandle`.

If the function, passed to the `frame.evaluate_handle()`, returns a [Promise], then
`frame.evaluate_handle()` would wait for the promise to resolve and return its value.

**Usage**

```py
a_window_handle = await frame.evaluate_handle("Promise.resolve(window)")
a_window_handle # handle for the window object.
```

A string can also be passed in instead of a function.

```py
a_handle = await page.evaluate_handle("document") # handle for the "document"
```

`JSHandle` instances can be passed as an argument to the `frame.evaluate_handle()`:

```py
a_handle = await page.evaluate_handle("document.body")
result_handle = await page.evaluate_handle("body => body.innerHTML", a_handle)
print(await result_handle.json_value())
await result_handle.dispose()
```

Parameters
----------
expression : str
    JavaScript expression to be evaluated in the browser context. If the expression evaluates to a function, the
    function is automatically invoked.
arg : Union[Any, None]
    Optional argument to pass to `expression`.

Returns
-------
JSHandle
r  Nr  r  s      rJ   r  Frame.evaluate_handle  J     `   ..00%7??3+? 1  
 	
r  r  r  r  c                x   #    [         R                  " U R                  R                  XS9I Sh  vN 5      $  N7f)ai  Frame.query_selector

Returns the ElementHandle pointing to the frame element.

**NOTE** The use of `ElementHandle` is discouraged, use `Locator` objects and web-first assertions instead.

The method finds an element matching the specified selector within the frame. If no elements match the selector,
returns `null`.

Parameters
----------
selector : str
    A selector to query for.
strict : Union[bool, None]
    When true, the call requires selector to resolve to a single element. If given selector resolves to more than one
    element, the call throws an exception.

Returns
-------
Union[ElementHandle, None]
r  r  Nr  rI   r  r  s      rJ   r  Frame.query_selectorG  s5     2 ))..///QQ
 	
Qr   c                 x   #    [         R                  " U R                  R                  US9I Sh  vN 5      $  N7f)a  Frame.query_selector_all

Returns the ElementHandles pointing to the frame elements.

**NOTE** The use of `ElementHandle` is discouraged, use `Locator` objects instead.

The method finds all elements matching the specified selector within the frame. If no elements match the selector,
returns empty array.

Parameters
----------
selector : str
    A selector to query for.

Returns
-------
List[ElementHandle]
r  Nr  r  s     rJ   r  Frame.query_selector_alld  s5     ( %%..33X3FF
 	
Fr   )r  r   r  r  c          	      z   #    [         R                  " U R                  R                  XX4S9I Sh  vN 5      $  N7f)a	  Frame.wait_for_selector

Returns when element specified by selector satisfies `state` option. Returns `null` if waiting for `hidden` or
`detached`.

**NOTE** Playwright automatically waits for element to be ready before performing an action. Using `Locator`
objects and web-first assertions make the code wait-for-selector-free.

Wait for the `selector` to satisfy `state` option (either appear/disappear from dom, or become visible/hidden). If
at the moment of calling the method `selector` already satisfies the condition, the method will return immediately.
If the selector doesn't satisfy the condition for the `timeout` milliseconds, the function will throw.

**Usage**

This method works across navigations:

```py
import asyncio
from playwright.async_api import async_playwright, Playwright

async def run(playwright: Playwright):
    chromium = playwright.chromium
    browser = await chromium.launch()
    page = await browser.new_page()
    for current_url in ["https://google.com", "https://bbc.com"]:
        await page.goto(current_url, wait_until="domcontentloaded")
        element = await page.main_frame.wait_for_selector("img")
        print("Loaded image: " + str(await element.get_attribute("src")))
    await browser.close()

async def main():
    async with async_playwright() as playwright:
        await run(playwright)
asyncio.run(main())
```

Parameters
----------
selector : str
    A selector to query for.
strict : Union[bool, None]
    When true, the call requires selector to resolve to a single element. If given selector resolves to more than one
    element, the call throws an exception.
timeout : Union[float, None]
    Maximum time in milliseconds. Defaults to `30000` (30 seconds). Pass `0` to disable timeout. The default value can
    be changed by using the `browser_context.set_default_timeout()` or `page.set_default_timeout()` methods.
state : Union["attached", "detached", "hidden", "visible", None]
    Defaults to `'visible'`. Can be either:
    - `'attached'` - wait for element to be present in DOM.
    - `'detached'` - wait for element to not be present in DOM.
    - `'visible'` - wait for element to have non-empty bounding box and no `visibility:hidden`. Note that element
      without any content or with `display:none` has an empty bounding box and is not considered visible.
    - `'hidden'` - wait for element to be either detached from DOM, or have an empty bounding box or
      `visibility:hidden`. This is opposite to the `'visible'` option.

Returns
-------
Union[ElementHandle, None]
)r  r  r   r  Nr  )rI   r  r  r   r  s        rJ   r  Frame.wait_for_selector|  sA     L ))..22!' 3  
 	
ry   r  r   c                z   #    [         R                  " U R                  R                  XUS9I Sh  vN 5      $  N7f)a  Frame.is_checked

Returns whether the element is checked. Throws if the element is not a checkbox or radio input.

Parameters
----------
selector : str
    A selector to search for an element. If there are multiple elements satisfying the selector, the first will be
    used.
strict : Union[bool, None]
    When true, the call requires selector to resolve to a single element. If given selector resolves to more than one
    element, the call throws an exception.
timeout : Union[float, None]
    Maximum time in milliseconds. Defaults to `30000` (30 seconds). Pass `0` to disable timeout. The default value can
    be changed by using the `browser_context.set_default_timeout()` or `page.set_default_timeout()` methods.

Returns
-------
bool
r  r  r   Nr  rI   r  r  r   s       rJ   r  Frame.is_checked  @     8 &&..++!' ,  
 	
ry   c                z   #    [         R                  " U R                  R                  XUS9I Sh  vN 5      $  N7f)a  Frame.is_disabled

Returns whether the element is disabled, the opposite of [enabled](https://playwright.dev/python/docs/actionability#enabled).

Parameters
----------
selector : str
    A selector to search for an element. If there are multiple elements satisfying the selector, the first will be
    used.
strict : Union[bool, None]
    When true, the call requires selector to resolve to a single element. If given selector resolves to more than one
    element, the call throws an exception.
timeout : Union[float, None]
    Maximum time in milliseconds. Defaults to `30000` (30 seconds). Pass `0` to disable timeout. The default value can
    be changed by using the `browser_context.set_default_timeout()` or `page.set_default_timeout()` methods.

Returns
-------
bool
r  Nr  r  s       rJ   r  Frame.is_disabled  @     8 &&..,,!' -  
 	
ry   c                z   #    [         R                  " U R                  R                  XUS9I Sh  vN 5      $  N7f)a  Frame.is_editable

Returns whether the element is [editable](https://playwright.dev/python/docs/actionability#editable).

Parameters
----------
selector : str
    A selector to search for an element. If there are multiple elements satisfying the selector, the first will be
    used.
strict : Union[bool, None]
    When true, the call requires selector to resolve to a single element. If given selector resolves to more than one
    element, the call throws an exception.
timeout : Union[float, None]
    Maximum time in milliseconds. Defaults to `30000` (30 seconds). Pass `0` to disable timeout. The default value can
    be changed by using the `browser_context.set_default_timeout()` or `page.set_default_timeout()` methods.

Returns
-------
bool
r  Nr  r  s       rJ   r  Frame.is_editable  r  ry   c                z   #    [         R                  " U R                  R                  XUS9I Sh  vN 5      $  N7f)a  Frame.is_enabled

Returns whether the element is [enabled](https://playwright.dev/python/docs/actionability#enabled).

Parameters
----------
selector : str
    A selector to search for an element. If there are multiple elements satisfying the selector, the first will be
    used.
strict : Union[bool, None]
    When true, the call requires selector to resolve to a single element. If given selector resolves to more than one
    element, the call throws an exception.
timeout : Union[float, None]
    Maximum time in milliseconds. Defaults to `30000` (30 seconds). Pass `0` to disable timeout. The default value can
    be changed by using the `browser_context.set_default_timeout()` or `page.set_default_timeout()` methods.

Returns
-------
bool
r  Nr  r  s       rJ   r  Frame.is_enabled.  r  ry   c                z   #    [         R                  " U R                  R                  XUS9I Sh  vN 5      $  N7f)a  Frame.is_hidden

Returns whether the element is hidden, the opposite of [visible](https://playwright.dev/python/docs/actionability#visible).  `selector` that
does not match any elements is considered hidden.

Parameters
----------
selector : str
    A selector to search for an element. If there are multiple elements satisfying the selector, the first will be
    used.
strict : Union[bool, None]
    When true, the call requires selector to resolve to a single element. If given selector resolves to more than one
    element, the call throws an exception.
timeout : Union[float, None]
    Deprecated: This option is ignored. `frame.is_hidden()` does not wait for the element to become hidden and returns immediately.

Returns
-------
bool
r  Nr  r  s       rJ   r  Frame.is_hiddenP  @     8 &&..**!' +  
 	
ry   c                z   #    [         R                  " U R                  R                  XUS9I Sh  vN 5      $  N7f)a  Frame.is_visible

Returns whether the element is [visible](https://playwright.dev/python/docs/actionability#visible). `selector` that does not match any elements
is considered not visible.

Parameters
----------
selector : str
    A selector to search for an element. If there are multiple elements satisfying the selector, the first will be
    used.
strict : Union[bool, None]
    When true, the call requires selector to resolve to a single element. If given selector resolves to more than one
    element, the call throws an exception.
timeout : Union[float, None]
    Deprecated: This option is ignored. `frame.is_visible()` does not wait for the element to become visible and returns immediately.

Returns
-------
bool
r  Nr  r  s       rJ   r  Frame.is_visibler  r  ry   ry  r  c          
         #    [         R                  " U R                  R                  UU[         R                  " U5      UUS9I Sh  vN 5      $  N7f)a
  Frame.dispatch_event

The snippet below dispatches the `click` event on the element. Regardless of the visibility state of the element,
`click` is dispatched. This is equivalent to calling
[element.click()](https://developer.mozilla.org/en-US/docs/Web/API/HTMLElement/click).

**Usage**

```py
await frame.dispatch_event("button#submit", "click")
```

Under the hood, it creates an instance of an event based on the given `type`, initializes it with `eventInit`
properties and dispatches it on the element. Events are `composed`, `cancelable` and bubble by default.

Since `eventInit` is event-specific, please refer to the events documentation for the lists of initial properties:
- [DeviceMotionEvent](https://developer.mozilla.org/en-US/docs/Web/API/DeviceMotionEvent/DeviceMotionEvent)
- [DeviceOrientationEvent](https://developer.mozilla.org/en-US/docs/Web/API/DeviceOrientationEvent/DeviceOrientationEvent)
- [DragEvent](https://developer.mozilla.org/en-US/docs/Web/API/DragEvent/DragEvent)
- [Event](https://developer.mozilla.org/en-US/docs/Web/API/Event/Event)
- [FocusEvent](https://developer.mozilla.org/en-US/docs/Web/API/FocusEvent/FocusEvent)
- [KeyboardEvent](https://developer.mozilla.org/en-US/docs/Web/API/KeyboardEvent/KeyboardEvent)
- [MouseEvent](https://developer.mozilla.org/en-US/docs/Web/API/MouseEvent/MouseEvent)
- [PointerEvent](https://developer.mozilla.org/en-US/docs/Web/API/PointerEvent/PointerEvent)
- [TouchEvent](https://developer.mozilla.org/en-US/docs/Web/API/TouchEvent/TouchEvent)
- [WheelEvent](https://developer.mozilla.org/en-US/docs/Web/API/WheelEvent/WheelEvent)

You can also specify `JSHandle` as the property value if you want live objects to be passed into the event:

```py
# note you can only create data_transfer in chromium and firefox
data_transfer = await frame.evaluate_handle("new DataTransfer()")
await frame.dispatch_event("#source", "dragstart", { "dataTransfer": data_transfer })
```

Parameters
----------
selector : str
    A selector to search for an element. If there are multiple elements satisfying the selector, the first will be
    used.
type : str
    DOM event type: `"click"`, `"dragstart"`, etc.
event_init : Union[Dict, None]
    Optional event-specific initialization properties.
strict : Union[bool, None]
    When true, the call requires selector to resolve to a single element. If given selector resolves to more than one
    element, the call throws an exception.
timeout : Union[float, None]
    Maximum time in milliseconds. Defaults to `30000` (30 seconds). Pass `0` to disable timeout. The default value can
    be changed by using the `browser_context.set_default_timeout()` or `page.set_default_timeout()` methods.
)r  ry  r  r  r   Nr  )rI   r  ry  r  r  r   s         rJ   r  Frame.dispatch_event  sT     z &&..//!!//*5 0  
 	
   AAA	Ac          	         #    [         R                  " U R                  R                  UU[         R                  " U5      US9I Sh  vN 5      $  N7f)a  Frame.eval_on_selector

Returns the return value of `expression`.

The method finds an element matching the specified selector within the frame and passes it as a first argument to
`expression`. If no elements match the selector, the method throws an error.

If `expression` returns a [Promise], then `frame.eval_on_selector()` would wait for the promise to resolve
and return its value.

**Usage**

```py
search_value = await frame.eval_on_selector("#search", "el => el.value")
preload_href = await frame.eval_on_selector("link[rel=preload]", "el => el.href")
html = await frame.eval_on_selector(".main-container", "(e, suffix) => e.outerHTML + suffix", "hello")
```

Parameters
----------
selector : str
    A selector to query for.
expression : str
    JavaScript expression to be evaluated in the browser context. If the expression evaluates to a function, the
    function is automatically invoked.
arg : Union[Any, None]
    Optional argument to pass to `expression`.
strict : Union[bool, None]
    When true, the call requires selector to resolve to a single element. If given selector resolves to more than one
    element, the call throws an exception.

Returns
-------
Any
r  r  r  r  Nr  rI   r  r  r  r  s        rJ   r  Frame.eval_on_selector  sQ     X &&..11!%OOC(	 2  
 	
   AAA	Ac           	         #    [         R                  " U R                  R                  X[         R                  " U5      S9I Sh  vN 5      $  N7f)a%  Frame.eval_on_selector_all

Returns the return value of `expression`.

The method finds all elements matching the specified selector within the frame and passes an array of matched
elements as a first argument to `expression`.

If `expression` returns a [Promise], then `frame.eval_on_selector_all()` would wait for the promise to resolve
and return its value.

**Usage**

```py
divs_counts = await frame.eval_on_selector_all("div", "(divs, min) => divs.length >= min", 10)
```

Parameters
----------
selector : str
    A selector to query for.
expression : str
    JavaScript expression to be evaluated in the browser context. If the expression evaluates to a function, the
    function is automatically invoked.
arg : Union[Any, None]
    Optional argument to pass to `expression`.

Returns
-------
Any
r  Nr  r  s       rJ   r  Frame.eval_on_selector_all  sJ     D &&..55!gooc>R 6  
 	
r  c                 z   #    [         R                  " U R                  R                  5       I Sh  vN 5      $  N7f)zeFrame.content

Gets the full HTML contents of the frame, including the doctype.

Returns
-------
str
Nr   rE   rF   contentrH   s    rJ   r5  Frame.content8  +      &&T^^-C-C-E'EFF'Ery   r   r  htmlc                z   #    [         R                  " U R                  R                  XUS9I Sh  vN 5      $  N7f)a2  Frame.set_content

This method internally calls [document.write()](https://developer.mozilla.org/en-US/docs/Web/API/Document/write),
inheriting all its specific characteristics and behaviors.

Parameters
----------
html : str
    HTML markup to assign to the page.
timeout : Union[float, None]
    Maximum operation time in milliseconds, defaults to 30 seconds, pass `0` to disable timeout. The default value can
    be changed by using the `browser_context.set_default_navigation_timeout()`,
    `browser_context.set_default_timeout()`, `page.set_default_navigation_timeout()` or
    `page.set_default_timeout()` methods.
wait_until : Union["commit", "domcontentloaded", "load", "networkidle", None]
    When to consider operation succeeded, defaults to `load`. Events can be either:
    - `'domcontentloaded'` - consider operation to be finished when the `DOMContentLoaded` event is fired.
    - `'load'` - consider operation to be finished when the `load` event is fired.
    - `'networkidle'` - **DISCOURAGED** consider operation to be finished when there are no network connections for
      at least `500` ms. Don't use this method for testing, rely on web assertions to assess readiness instead.
    - `'commit'` - consider operation to be finished when network response is received and the document started
      loading.
r9  r   r  Nr   rE   rF   set_contentrI   r9  r   r  s       rJ   r=  Frame.set_contentD  A     B &&..,,j -  
 	
ry   c                 ^    [         R                  " U R                  R                  5       5      $ )znFrame.is_detached

Returns `true` if the frame has been detached, or `false` otherwise.

Returns
-------
bool
)r   rE   rF   is_detachedrH   s    rJ   rB  Frame.is_detachedk  r  rM   rG   r   r5  ry  r   r5  c          	      z   #    [         R                  " U R                  R                  XX4S9I Sh  vN 5      $  N7f)a  Frame.add_script_tag

Returns the added tag when the script's onload fires or when the script content was injected into frame.

Adds a `<script>` tag into the page with the desired url or content.

Parameters
----------
url : Union[str, None]
    URL of a script to be added.
path : Union[pathlib.Path, str, None]
    Path to the JavaScript file to be injected into frame. If `path` is a relative path, then it is resolved relative
    to the current working directory.
content : Union[str, None]
    Raw JavaScript content to be injected into frame.
type : Union[str, None]
    Script type. Use 'module' in order to load a JavaScript ES6 module. See
    [script](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/script) for more details.

Returns
-------
ElementHandle
rD  Nr   r`   rF   add_script_tagrI   rG   r   r5  ry  s        rJ   rG  Frame.add_script_tagw  sA     @   ..//G 0  
 	
ry   rG   r   r5  c                z   #    [         R                  " U R                  R                  XUS9I Sh  vN 5      $  N7f)al  Frame.add_style_tag

Returns the added tag when the stylesheet's onload fires or when the CSS content was injected into frame.

Adds a `<link rel="stylesheet">` tag into the page with the desired url or a `<style type="text/css">` tag with the
content.

Parameters
----------
url : Union[str, None]
    URL of the `<link>` tag.
path : Union[pathlib.Path, str, None]
    Path to the CSS file to be injected into frame. If `path` is a relative path, then it is resolved relative to the
    current working directory.
content : Union[str, None]
    Raw CSS content to be injected into frame.

Returns
-------
ElementHandle
rJ  Nr   r`   rF   add_style_tagrI   rG   r   r5  s       rJ   rM  Frame.add_style_tag  s7     :   ....37.SS
 	
Sry   )
r  r  rv  r  r  r   r
  r	  r  r  r  r  r  rv  r  r  r  r
  r	  r  c       
            #    [         R                  " U R                  R                  U[         R                  " U5      UUUUUUU	U
US9I Sh  vN 5      $  N7f)a;  Frame.click

This method clicks an element matching `selector` by performing the following steps:
1. Find an element matching `selector`. If there is none, wait until a matching element is attached to the DOM.
1. Wait for [actionability](https://playwright.dev/python/docs/actionability) checks on the matched element, unless `force` option is set. If
   the element is detached during the checks, the whole action is retried.
1. Scroll the element into view if needed.
1. Use `page.mouse` to click in the center of the element, or the specified `position`.
1. Wait for initiated navigations to either succeed or fail, unless `noWaitAfter` option is set.

When all steps combined have not finished during the specified `timeout`, this method throws a `TimeoutError`.
Passing zero timeout disables this.

Parameters
----------
selector : str
    A selector to search for an element. If there are multiple elements satisfying the selector, the first will be
    used.
modifiers : Union[Sequence[Union["Alt", "Control", "ControlOrMeta", "Meta", "Shift"]], None]
    Modifier keys to press. Ensures that only these modifiers are pressed during the operation, and then restores
    current modifiers back. If not specified, currently pressed modifiers are used. "ControlOrMeta" resolves to
    "Control" on Windows and Linux and to "Meta" on macOS.
position : Union[{x: float, y: float}, None]
    A point to use relative to the top-left corner of element padding box. If not specified, uses some visible point of
    the element.
delay : Union[float, None]
    Time to wait between `mousedown` and `mouseup` in milliseconds. Defaults to 0.
button : Union["left", "middle", "right", None]
    Defaults to `left`.
click_count : Union[int, None]
    defaults to 1. See [UIEvent.detail].
timeout : Union[float, None]
    Maximum time in milliseconds. Defaults to `30000` (30 seconds). Pass `0` to disable timeout. The default value can
    be changed by using the `browser_context.set_default_timeout()` or `page.set_default_timeout()` methods.
force : Union[bool, None]
    Whether to bypass the [actionability](../actionability.md) checks. Defaults to `false`.
no_wait_after : Union[bool, None]
    Actions that initiate navigations are waiting for these navigations to happen and for pages to start loading. You
    can opt out of waiting via setting this flag. You would only need this option in the exceptional cases such as
    navigating to inaccessible pages. Defaults to `false`.
    Deprecated: This option will default to `true` in the future.
strict : Union[bool, None]
    When true, the call requires selector to resolve to a single element. If given selector resolves to more than one
    element, the call throws an exception.
trial : Union[bool, None]
    When set, this method only performs the [actionability](../actionability.md) checks and skips the action. Defaults
    to `false`. Useful to wait until the element is ready for the action without performing it. Note that keyboard
    `modifiers` will be pressed regardless of `trial` to allow testing elements which are only visible when those keys
    are pressed.
)r  r  r  rv  r  r  r   r
  r  r  r  Nr  )rI   r  r  r  rv  r  r  r   r
  r	  r  r  s               rJ   r  Frame.click  sf     H &&..&&!!//)4!&) '  
 	
r  	r  r  rv  r  r   r
  r	  r  r  c       	            #    [         R                  " U R                  R                  U[         R                  " U5      UUUUUUU	U
S9
I Sh  vN 5      $  N7f)a@  Frame.dblclick

This method double clicks an element matching `selector` by performing the following steps:
1. Find an element matching `selector`. If there is none, wait until a matching element is attached to the DOM.
1. Wait for [actionability](https://playwright.dev/python/docs/actionability) checks on the matched element, unless `force` option is set. If
   the element is detached during the checks, the whole action is retried.
1. Scroll the element into view if needed.
1. Use `page.mouse` to double click in the center of the element, or the specified `position`. if
   the first click of the `dblclick()` triggers a navigation event, this method will throw.

When all steps combined have not finished during the specified `timeout`, this method throws a `TimeoutError`.
Passing zero timeout disables this.

**NOTE** `frame.dblclick()` dispatches two `click` events and a single `dblclick` event.

Parameters
----------
selector : str
    A selector to search for an element. If there are multiple elements satisfying the selector, the first will be
    used.
modifiers : Union[Sequence[Union["Alt", "Control", "ControlOrMeta", "Meta", "Shift"]], None]
    Modifier keys to press. Ensures that only these modifiers are pressed during the operation, and then restores
    current modifiers back. If not specified, currently pressed modifiers are used. "ControlOrMeta" resolves to
    "Control" on Windows and Linux and to "Meta" on macOS.
position : Union[{x: float, y: float}, None]
    A point to use relative to the top-left corner of element padding box. If not specified, uses some visible point of
    the element.
delay : Union[float, None]
    Time to wait between `mousedown` and `mouseup` in milliseconds. Defaults to 0.
button : Union["left", "middle", "right", None]
    Defaults to `left`.
timeout : Union[float, None]
    Maximum time in milliseconds. Defaults to `30000` (30 seconds). Pass `0` to disable timeout. The default value can
    be changed by using the `browser_context.set_default_timeout()` or `page.set_default_timeout()` methods.
force : Union[bool, None]
    Whether to bypass the [actionability](../actionability.md) checks. Defaults to `false`.
no_wait_after : Union[bool, None]
    This option has no effect.
    Deprecated: This option has no effect.
strict : Union[bool, None]
    When true, the call requires selector to resolve to a single element. If given selector resolves to more than one
    element, the call throws an exception.
trial : Union[bool, None]
    When set, this method only performs the [actionability](../actionability.md) checks and skips the action. Defaults
    to `false`. Useful to wait until the element is ready for the action without performing it. Note that keyboard
    `modifiers` will be pressed regardless of `trial` to allow testing elements which are only visible when those keys
    are pressed.

r  r  r  rv  r  r   r
  r  r  r  Nr$  rI   r  r  r  rv  r  r   r
  r	  r  r  s              rJ   r  Frame.dblclick  sc     B &&..))!!//)4!) *  
 	
   A
AA	Ar  r  r   r
  r	  r  r  c                   #    [         R                  " U R                  R                  U[         R                  " U5      UUUUUUS9I Sh  vN 5      $  N7f)a 
  Frame.tap

This method taps an element matching `selector` by performing the following steps:
1. Find an element matching `selector`. If there is none, wait until a matching element is attached to the DOM.
1. Wait for [actionability](https://playwright.dev/python/docs/actionability) checks on the matched element, unless `force` option is set. If
   the element is detached during the checks, the whole action is retried.
1. Scroll the element into view if needed.
1. Use `page.touchscreen` to tap the center of the element, or the specified `position`.

When all steps combined have not finished during the specified `timeout`, this method throws a `TimeoutError`.
Passing zero timeout disables this.

**NOTE** `frame.tap()` requires that the `hasTouch` option of the browser context be set to true.

Parameters
----------
selector : str
    A selector to search for an element. If there are multiple elements satisfying the selector, the first will be
    used.
modifiers : Union[Sequence[Union["Alt", "Control", "ControlOrMeta", "Meta", "Shift"]], None]
    Modifier keys to press. Ensures that only these modifiers are pressed during the operation, and then restores
    current modifiers back. If not specified, currently pressed modifiers are used. "ControlOrMeta" resolves to
    "Control" on Windows and Linux and to "Meta" on macOS.
position : Union[{x: float, y: float}, None]
    A point to use relative to the top-left corner of element padding box. If not specified, uses some visible point of
    the element.
timeout : Union[float, None]
    Maximum time in milliseconds. Defaults to `30000` (30 seconds). Pass `0` to disable timeout. The default value can
    be changed by using the `browser_context.set_default_timeout()` or `page.set_default_timeout()` methods.
force : Union[bool, None]
    Whether to bypass the [actionability](../actionability.md) checks. Defaults to `false`.
no_wait_after : Union[bool, None]
    This option has no effect.
    Deprecated: This option has no effect.
strict : Union[bool, None]
    When true, the call requires selector to resolve to a single element. If given selector resolves to more than one
    element, the call throws an exception.
trial : Union[bool, None]
    When set, this method only performs the [actionability](../actionability.md) checks and skips the action. Defaults
    to `false`. Useful to wait until the element is ready for the action without performing it. Note that keyboard
    `modifiers` will be pressed regardless of `trial` to allow testing elements which are only visible when those keys
    are pressed.
r  r  r  r   r
  r  r  r  Nr4  	rI   r  r  r  r   r
  r	  r  r  s	            rJ   r  	Frame.tapb  ]     t &&..$$!!//)4!) % 	 	
 	
	r'  r   r	  r  r
  r+  c                   #    [         R                  " U R                  R                  UUUUUUS9I Sh  vN 5      $  N7f)aL  Frame.fill

This method waits for an element matching `selector`, waits for [actionability](https://playwright.dev/python/docs/actionability) checks,
focuses the element, fills it and triggers an `input` event after filling. Note that you can pass an empty string
to clear the input field.

If the target element is not an `<input>`, `<textarea>` or `[contenteditable]` element, this method throws an
error. However, if the element is inside the `<label>` element that has an associated
[control](https://developer.mozilla.org/en-US/docs/Web/API/HTMLLabelElement/control), the control will be filled
instead.

To send fine-grained keyboard events, use `locator.press_sequentially()`.

Parameters
----------
selector : str
    A selector to search for an element. If there are multiple elements satisfying the selector, the first will be
    used.
value : str
    Value to fill for the `<input>`, `<textarea>` or `[contenteditable]` element.
timeout : Union[float, None]
    Maximum time in milliseconds. Defaults to `30000` (30 seconds). Pass `0` to disable timeout. The default value can
    be changed by using the `browser_context.set_default_timeout()` or `page.set_default_timeout()` methods.
no_wait_after : Union[bool, None]
    This option has no effect.
    Deprecated: This option has no effect.
strict : Union[bool, None]
    When true, the call requires selector to resolve to a single element. If given selector resolves to more than one
    element, the call throws an exception.
force : Union[bool, None]
    Whether to bypass the [actionability](../actionability.md) checks. Defaults to `false`.
r  r+  r   r  r  r
  Nr:  rI   r  r+  r   r	  r  r
  s          rJ   r;  
Frame.fill  N     V &&..%%!) &  	
 		
rg  has_texthas_not_texthashas_notre  rf  rg  r3   rh  c          
          [         R                  " U R                  R                  UUUU(       a  UR                  OSU(       a  UR                  S95      $ SS95      $ )aB	  Frame.locator

The method returns an element locator that can be used to perform actions on this page / frame. Locator is resolved
to the element immediately before performing an action, so a series of actions on the same locator can in fact be
performed on different DOM elements. That would happen if the DOM structure between those actions has changed.

[Learn more about locators](https://playwright.dev/python/docs/locators).

[Learn more about locators](https://playwright.dev/python/docs/locators).

Parameters
----------
selector : str
    A selector to use when resolving DOM element.
has_text : Union[Pattern[str], str, None]
    Matches elements containing specified text somewhere inside, possibly in a child or a descendant element. When
    passed a [string], matching is case-insensitive and searches for a substring. For example, `"Playwright"` matches
    `<article><div>Playwright</div></article>`.
has_not_text : Union[Pattern[str], str, None]
    Matches elements that do not contain specified text somewhere inside, possibly in a child or a descendant element.
    When passed a [string], matching is case-insensitive and searches for a substring.
has : Union[Locator, None]
    Narrows down the results of the method to those which contain elements matching this relative locator. For example,
    `article` that has `text=Playwright` matches `<article><div>Playwright</div></article>`.

    Inner locator **must be relative** to the outer locator and is queried starting with the outer locator match, not
    the document root. For example, you can find `content` that has `div` in
    `<article><content><div>Playwright</div></content></article>`. However, looking for `content` that has `article
    div` will fail, because the inner locator must be relative and should not use any elements outside the `content`.

    Note that outer and inner locators must belong to the same frame. Inner locator must not contain `FrameLocator`s.
has_not : Union[Locator, None]
    Matches elements that do not contain an element that matches an inner locator. Inner locator is queried against the
    outer one. For example, `article` that does not have `div` matches `<article><span>Playwright</span></article>`.

    Note that outer and inner locators must belong to the same frame. Inner locator must not contain `FrameLocator`s.

Returns
-------
Locator
Nr  hasText
hasNotTextrg  hasNotr   r`   rF   locatorrI   r  re  rf  rg  rh  s         rJ   ro  Frame.locator  sg    f   NN""! '%(CMMd,3w(( # 
 	
 :> # 
 	
rM   exactr   rs  c                \    [         R                  " U R                  R                  XS95      $ )aK  Frame.get_by_alt_text

Allows locating elements by their alt text.

**Usage**

For example, this method will find the image by alt text "Playwright logo":

```html
<img alt='Playwright logo'>
```

```py
await page.get_by_alt_text("Playwright logo").click()
```

Parameters
----------
text : Union[Pattern[str], str]
    Text to locate the element for.
exact : Union[bool, None]
    Whether to find an exact match: case-sensitive and whole-string. Default to false. Ignored when locating by a
    regular expression. Note that exact match still trims whitespace.

Returns
-------
Locator
r   rs  r   r`   rF   get_by_alt_textrI   r   rs  s      rJ   rw  Frame.get_by_alt_text  (    F   !?!?T!?!WXXrM   c                \    [         R                  " U R                  R                  XS95      $ )a4  Frame.get_by_label

Allows locating input elements by the text of the associated `<label>` or `aria-labelledby` element, or by the
`aria-label` attribute.

**Usage**

For example, this method will find inputs by label "Username" and "Password" in the following DOM:

```html
<input aria-label="Username">
<label for="password-input">Password:</label>
<input id="password-input">
```

```py
await page.get_by_label("Username").fill("john")
await page.get_by_label("Password").fill("secret")
```

Parameters
----------
text : Union[Pattern[str], str]
    Text to locate the element for.
exact : Union[bool, None]
    Whether to find an exact match: case-sensitive and whole-string. Default to false. Ignored when locating by a
    regular expression. Note that exact match still trims whitespace.

Returns
-------
Locator
ru  r   r`   rF   get_by_labelrx  s      rJ   r}  Frame.get_by_labelA  (    N   !<!<$!<!TUUrM   c                \    [         R                  " U R                  R                  XS95      $ )a  Frame.get_by_placeholder

Allows locating input elements by the placeholder text.

**Usage**

For example, consider the following DOM structure.

```html
<input type="email" placeholder="name@example.com" />
```

You can fill the input after locating it by the placeholder text:

```py
await page.get_by_placeholder("name@example.com").fill("playwright@microsoft.com")
```

Parameters
----------
text : Union[Pattern[str], str]
    Text to locate the element for.
exact : Union[bool, None]
    Whether to find an exact match: case-sensitive and whole-string. Default to false. Ignored when locating by a
    regular expression. Note that exact match still trims whitespace.

Returns
-------
Locator
ru  r   r`   rF   get_by_placeholderrx  s      rJ   r  Frame.get_by_placeholderj  -    J   NN--4-E
 	
rM   	r`  r  expandedinclude_hiddenlevelr   pressedselectedrs  roleRalertalertdialogapplicationarticlebanner
blockquoter  captioncellcheckboxrR  columnheadercomboboxcomplementarycontentinfo
definitiondeletiondialog	directorydocumentemphasisfeedfigureformgenericgridgridcellgroupheadingimg	insertionlinklistlistboxlistitemlogmainmarqueemathmenumenubarmenuitemmenuitemcheckboxmenuitemradiometer
navigationnonenoteoption	paragraphpresentationprogressbarradio
radiogroupregionrowrowgroup	rowheader	scrollbarsearch	searchbox	separatorslider
spinbuttonr   strong	subscriptsuperscriptswitchtabtabletablisttabpaneltermtextboxtimetimertoolbartooltiptreetreegridtreeitemr`  r  r  r  r  r   r  r  c       	         n    [         R                  " U R                  R                  UUUUUUUUU	U
S9
5      $ )aI  Frame.get_by_role

Allows locating elements by their [ARIA role](https://www.w3.org/TR/wai-aria-1.2/#roles),
[ARIA attributes](https://www.w3.org/TR/wai-aria-1.2/#aria-attributes) and
[accessible name](https://w3c.github.io/accname/#dfn-accessible-name).

**Usage**

Consider the following DOM structure.

```html
<h3>Sign up</h3>
<label>
  <input type="checkbox" /> Subscribe
</label>
<br/>
<button>Submit</button>
```

You can locate each element by it's implicit role:

```py
await expect(page.get_by_role("heading", name="Sign up")).to_be_visible()

await page.get_by_role("checkbox", name="Subscribe").check()

await page.get_by_role("button", name=re.compile("submit", re.IGNORECASE)).click()
```

**Details**

Role selector **does not replace** accessibility audits and conformance tests, but rather gives early feedback
about the ARIA guidelines.

Many html elements have an implicitly [defined role](https://w3c.github.io/html-aam/#html-element-role-mappings)
that is recognized by the role selector. You can find all the
[supported roles here](https://www.w3.org/TR/wai-aria-1.2/#role_definitions). ARIA guidelines **do not recommend**
duplicating implicit roles and attributes by setting `role` and/or `aria-*` attributes to default values.

Parameters
----------
role : Union["alert", "alertdialog", "application", "article", "banner", "blockquote", "button", "caption", "cell", "checkbox", "code", "columnheader", "combobox", "complementary", "contentinfo", "definition", "deletion", "dialog", "directory", "document", "emphasis", "feed", "figure", "form", "generic", "grid", "gridcell", "group", "heading", "img", "insertion", "link", "list", "listbox", "listitem", "log", "main", "marquee", "math", "menu", "menubar", "menuitem", "menuitemcheckbox", "menuitemradio", "meter", "navigation", "none", "note", "option", "paragraph", "presentation", "progressbar", "radio", "radiogroup", "region", "row", "rowgroup", "rowheader", "scrollbar", "search", "searchbox", "separator", "slider", "spinbutton", "status", "strong", "subscript", "superscript", "switch", "tab", "table", "tablist", "tabpanel", "term", "textbox", "time", "timer", "toolbar", "tooltip", "tree", "treegrid", "treeitem"]
    Required aria role.
checked : Union[bool, None]
    An attribute that is usually set by `aria-checked` or native `<input type=checkbox>` controls.

    Learn more about [`aria-checked`](https://www.w3.org/TR/wai-aria-1.2/#aria-checked).
disabled : Union[bool, None]
    An attribute that is usually set by `aria-disabled` or `disabled`.

    **NOTE** Unlike most other attributes, `disabled` is inherited through the DOM hierarchy. Learn more about
    [`aria-disabled`](https://www.w3.org/TR/wai-aria-1.2/#aria-disabled).

expanded : Union[bool, None]
    An attribute that is usually set by `aria-expanded`.

    Learn more about [`aria-expanded`](https://www.w3.org/TR/wai-aria-1.2/#aria-expanded).
include_hidden : Union[bool, None]
    Option that controls whether hidden elements are matched. By default, only non-hidden elements, as
    [defined by ARIA](https://www.w3.org/TR/wai-aria-1.2/#tree_exclusion), are matched by role selector.

    Learn more about [`aria-hidden`](https://www.w3.org/TR/wai-aria-1.2/#aria-hidden).
level : Union[int, None]
    A number attribute that is usually present for roles `heading`, `listitem`, `row`, `treeitem`, with default values
    for `<h1>-<h6>` elements.

    Learn more about [`aria-level`](https://www.w3.org/TR/wai-aria-1.2/#aria-level).
name : Union[Pattern[str], str, None]
    Option to match the [accessible name](https://w3c.github.io/accname/#dfn-accessible-name). By default, matching is
    case-insensitive and searches for a substring, use `exact` to control this behavior.

    Learn more about [accessible name](https://w3c.github.io/accname/#dfn-accessible-name).
pressed : Union[bool, None]
    An attribute that is usually set by `aria-pressed`.

    Learn more about [`aria-pressed`](https://www.w3.org/TR/wai-aria-1.2/#aria-pressed).
selected : Union[bool, None]
    An attribute that is usually set by `aria-selected`.

    Learn more about [`aria-selected`](https://www.w3.org/TR/wai-aria-1.2/#aria-selected).
exact : Union[bool, None]
    Whether `name` is matched exactly: case-sensitive and whole-string. Defaults to false. Ignored when `name` is a
    regular expression. Note that exact match still trims whitespace.

Returns
-------
Locator

r  r`  r  r  includeHiddenr  r   r  r  rs  r   r`   rF   get_by_rolerI   r  r`  r  r  r  r  r   r  r  rs  s              rJ   r  Frame.get_by_role  M    t   NN&&!!,! ' 
 	
rM   test_idc                 \    [         R                  " U R                  R                  US95      $ )u3  Frame.get_by_test_id

Locate element by the test id.

**Usage**

Consider the following DOM structure.

```html
<button data-testid="directions">Itinéraire</button>
```

You can locate the element by it's test id:

```py
await page.get_by_test_id("directions").click()
```

**Details**

By default, the `data-testid` attribute is used as a test id. Use `selectors.set_test_id_attribute()` to
configure a different test id attribute if necessary.

Parameters
----------
test_id : Union[Pattern[str], str]
    Id to locate the element by.

Returns
-------
Locator
testIdr   r`   rF   get_by_test_idrI   r  s     rJ   r  Frame.get_by_test_id\  (    H   !>!>g!>!NOOrM   c                \    [         R                  " U R                  R                  XS95      $ )a  Frame.get_by_text

Allows locating elements that contain given text.

See also `locator.filter()` that allows to match by another criteria, like an accessible role, and then
filter by the text content.

**Usage**

Consider the following DOM structure:

```html
<div>Hello <span>world</span></div>
<div>Hello</div>
```

You can locate by text substring, exact string, or a regular expression:

```py
# Matches <span>
page.get_by_text("world")

# Matches first <div>
page.get_by_text("Hello world")

# Matches second <div>
page.get_by_text("Hello", exact=True)

# Matches both <div>s
page.get_by_text(re.compile("Hello"))

# Matches second <div>
page.get_by_text(re.compile("^hello$", re.IGNORECASE))
```

**Details**

Matching by text always normalizes whitespace, even with exact match. For example, it turns multiple spaces into
one, turns line breaks into spaces and ignores leading and trailing whitespace.

Input elements of the type `button` and `submit` are matched by their `value` instead of the text content. For
example, locating by text `"Log in"` matches `<input type=button value="Log in">`.

Parameters
----------
text : Union[Pattern[str], str]
    Text to locate the element for.
exact : Union[bool, None]
    Whether to find an exact match: case-sensitive and whole-string. Default to false. Ignored when locating by a
    regular expression. Note that exact match still trims whitespace.

Returns
-------
Locator
ru  r   r`   rF   get_by_textrx  s      rJ   r  Frame.get_by_text  (    |   !;!;!;!STTrM   c                \    [         R                  " U R                  R                  XS95      $ )a  Frame.get_by_title

Allows locating elements by their title attribute.

**Usage**

Consider the following DOM structure.

```html
<span title='Issues count'>25 issues</span>
```

You can check the issues count after locating it by the title text:

```py
await expect(page.get_by_title("Issues count")).to_have_text("25 issues")
```

Parameters
----------
text : Union[Pattern[str], str]
    Text to locate the element for.
exact : Union[bool, None]
    Whether to find an exact match: case-sensitive and whole-string. Default to false. Ignored when locating by a
    regular expression. Note that exact match still trims whitespace.

Returns
-------
Locator
ru  r   r`   rF   get_by_titlerx  s      rJ   r  Frame.get_by_title  (    J   !<!<$!<!TUUrM   r2   c                 \    [         R                  " U R                  R                  US95      $ )a  Frame.frame_locator

When working with iframes, you can create a frame locator that will enter the iframe and allow selecting elements
in that iframe.

**Usage**

Following snippet locates element with text "Submit" in the iframe with id `my-frame`, like `<iframe
id="my-frame">`:

```py
locator = frame.frame_locator("#my-iframe").get_by_text("Submit")
await locator.click()
```

Parameters
----------
selector : str
    A selector to use when resolving DOM element.

Returns
-------
FrameLocator
r  r   r`   rF   frame_locatorr  s     rJ   r  Frame.frame_locator  '    4   !=!=x!=!PQQrM   c                z   #    [         R                  " U R                  R                  XUS9I Sh  vN 5      $  N7f)a  Frame.focus

This method fetches an element with `selector` and focuses it. If there's no element matching `selector`, the
method waits until a matching element appears in the DOM.

Parameters
----------
selector : str
    A selector to search for an element. If there are multiple elements satisfying the selector, the first will be
    used.
strict : Union[bool, None]
    When true, the call requires selector to resolve to a single element. If given selector resolves to more than one
    element, the call throws an exception.
timeout : Union[float, None]
    Maximum time in milliseconds. Defaults to `30000` (30 seconds). Pass `0` to disable timeout. The default value can
    be changed by using the `browser_context.set_default_timeout()` or `page.set_default_timeout()` methods.
r  NrR  r  s       rJ   rS  Frame.focus  @     2 &&..&&!' '  
 	
ry   c                z   #    [         R                  " U R                  R                  XUS9I Sh  vN 5      $  N7f)a  Frame.text_content

Returns `element.textContent`.

Parameters
----------
selector : str
    A selector to search for an element. If there are multiple elements satisfying the selector, the first will be
    used.
strict : Union[bool, None]
    When true, the call requires selector to resolve to a single element. If given selector resolves to more than one
    element, the call throws an exception.
timeout : Union[float, None]
    Maximum time in milliseconds. Defaults to `30000` (30 seconds). Pass `0` to disable timeout. The default value can
    be changed by using the `browser_context.set_default_timeout()` or `page.set_default_timeout()` methods.

Returns
-------
Union[str, None]
r  Nr  r  s       rJ   r  Frame.text_content$  @     8 &&..--!' .  
 	
ry   c                z   #    [         R                  " U R                  R                  XUS9I Sh  vN 5      $  N7f)a  Frame.inner_text

Returns `element.innerText`.

Parameters
----------
selector : str
    A selector to search for an element. If there are multiple elements satisfying the selector, the first will be
    used.
strict : Union[bool, None]
    When true, the call requires selector to resolve to a single element. If given selector resolves to more than one
    element, the call throws an exception.
timeout : Union[float, None]
    Maximum time in milliseconds. Defaults to `30000` (30 seconds). Pass `0` to disable timeout. The default value can
    be changed by using the `browser_context.set_default_timeout()` or `page.set_default_timeout()` methods.

Returns
-------
str
r  Nr  r  s       rJ   r  Frame.inner_textF  r  ry   c                z   #    [         R                  " U R                  R                  XUS9I Sh  vN 5      $  N7f)a  Frame.inner_html

Returns `element.innerHTML`.

Parameters
----------
selector : str
    A selector to search for an element. If there are multiple elements satisfying the selector, the first will be
    used.
strict : Union[bool, None]
    When true, the call requires selector to resolve to a single element. If given selector resolves to more than one
    element, the call throws an exception.
timeout : Union[float, None]
    Maximum time in milliseconds. Defaults to `30000` (30 seconds). Pass `0` to disable timeout. The default value can
    be changed by using the `browser_context.set_default_timeout()` or `page.set_default_timeout()` methods.

Returns
-------
str
r  Nr  r  s       rJ   r  Frame.inner_htmlh  r  ry   c          	      z   #    [         R                  " U R                  R                  XX4S9I Sh  vN 5      $  N7f)a  Frame.get_attribute

Returns element attribute value.

Parameters
----------
selector : str
    A selector to search for an element. If there are multiple elements satisfying the selector, the first will be
    used.
name : str
    Attribute name to get the value for.
strict : Union[bool, None]
    When true, the call requires selector to resolve to a single element. If given selector resolves to more than one
    element, the call throws an exception.
timeout : Union[float, None]
    Maximum time in milliseconds. Defaults to `30000` (30 seconds). Pass `0` to disable timeout. The default value can
    be changed by using the `browser_context.set_default_timeout()` or `page.set_default_timeout()` methods.

Returns
-------
Union[str, None]
r  r   r  r   Nr  rI   r  r   r  r   s        rJ   r  Frame.get_attribute  @     > &&....!V /  
 	
ry   r  r  r   r	  r
  r  r  c                   #    [         R                  " U R                  R                  U[         R                  " U5      UUUUUUS9I Sh  vN 5      $  N7f)a	  Frame.hover

This method hovers over an element matching `selector` by performing the following steps:
1. Find an element matching `selector`. If there is none, wait until a matching element is attached to the DOM.
1. Wait for [actionability](https://playwright.dev/python/docs/actionability) checks on the matched element, unless `force` option is set. If
   the element is detached during the checks, the whole action is retried.
1. Scroll the element into view if needed.
1. Use `page.mouse` to hover over the center of the element, or the specified `position`.

When all steps combined have not finished during the specified `timeout`, this method throws a `TimeoutError`.
Passing zero timeout disables this.

Parameters
----------
selector : str
    A selector to search for an element. If there are multiple elements satisfying the selector, the first will be
    used.
modifiers : Union[Sequence[Union["Alt", "Control", "ControlOrMeta", "Meta", "Shift"]], None]
    Modifier keys to press. Ensures that only these modifiers are pressed during the operation, and then restores
    current modifiers back. If not specified, currently pressed modifiers are used. "ControlOrMeta" resolves to
    "Control" on Windows and Linux and to "Meta" on macOS.
position : Union[{x: float, y: float}, None]
    A point to use relative to the top-left corner of element padding box. If not specified, uses some visible point of
    the element.
timeout : Union[float, None]
    Maximum time in milliseconds. Defaults to `30000` (30 seconds). Pass `0` to disable timeout. The default value can
    be changed by using the `browser_context.set_default_timeout()` or `page.set_default_timeout()` methods.
no_wait_after : Union[bool, None]
    This option has no effect.
    Deprecated: This option has no effect.
force : Union[bool, None]
    Whether to bypass the [actionability](../actionability.md) checks. Defaults to `false`.
strict : Union[bool, None]
    When true, the call requires selector to resolve to a single element. If given selector resolves to more than one
    element, the call throws an exception.
trial : Union[bool, None]
    When set, this method only performs the [actionability](../actionability.md) checks and skips the action. Defaults
    to `false`. Useful to wait until the element is ready for the action without performing it. Note that keyboard
    `modifiers` will be pressed regardless of `trial` to allow testing elements which are only visible when those keys
    are pressed.
r  r  r  r   r  r
  r  r  Nr  	rI   r  r  r  r   r	  r
  r  r  s	            rJ   r  Frame.hover  ]     p &&..&&!!//)4!) ' 	 	
 	
	r'  )source_positiontarget_positionr
  r	  r  r   r  sourcetargetr  r  c                   #    [         R                  " U R                  R                  UUUUUUUUU	S9	I Sh  vN 5      $  N7f)a  Frame.drag_and_drop

Parameters
----------
source : str
    A selector to search for an element to drag. If there are multiple elements satisfying the selector, the first will
    be used.
target : str
    A selector to search for an element to drop onto. If there are multiple elements satisfying the selector, the first
    will be used.
source_position : Union[{x: float, y: float}, None]
    Clicks on the source element at this point relative to the top-left corner of the element's padding box. If not
    specified, some visible point of the element is used.
target_position : Union[{x: float, y: float}, None]
    Drops on the target element at this point relative to the top-left corner of the element's padding box. If not
    specified, some visible point of the element is used.
force : Union[bool, None]
    Whether to bypass the [actionability](../actionability.md) checks. Defaults to `false`.
no_wait_after : Union[bool, None]
    This option has no effect.
    Deprecated: This option has no effect.
strict : Union[bool, None]
    When true, the call requires selector to resolve to a single element. If given selector resolves to more than one
    element, the call throws an exception.
timeout : Union[float, None]
    Maximum time in milliseconds. Defaults to `30000` (30 seconds). Pass `0` to disable timeout. The default value can
    be changed by using the `browser_context.set_default_timeout()` or `page.set_default_timeout()` methods.
trial : Union[bool, None]
    When set, this method only performs the [actionability](../actionability.md) checks and skips the action. Defaults
    to `false`. Useful to wait until the element is ready for the action without performing it.
)	r  r  sourcePositiontargetPositionr
  r  r  r   r  Nr   rE   rF   drag_and_drop)
rI   r  r  r  r  r
  r	  r  r   r  s
             rJ   r  Frame.drag_and_drop  sW     Z &&......) / 
 

 	

   5AA 	A)r(  r)  r*  r   r	  r  r
  r(  r)  r*  c                (  #    [         R                  " U R                  R                  U[         R                  " U5      [         R                  " U5      [         R                  " U5      [         R                  " U5      UUUU	S9	I Sh  vN 5      $  N7f)a	  Frame.select_option

This method waits for an element matching `selector`, waits for [actionability](https://playwright.dev/python/docs/actionability) checks, waits
until all specified options are present in the `<select>` element and selects these options.

If the target element is not a `<select>` element, this method throws an error. However, if the element is inside
the `<label>` element that has an associated
[control](https://developer.mozilla.org/en-US/docs/Web/API/HTMLLabelElement/control), the control will be used
instead.

Returns the array of option values that have been successfully selected.

Triggers a `change` and `input` event once all the provided options have been selected.

**Usage**

```py
# Single selection matching the value or label
await frame.select_option("select#colors", "blue")
# single selection matching the label
await frame.select_option("select#colors", label="blue")
# multiple selection
await frame.select_option("select#colors", value=["red", "green", "blue"])
```

Parameters
----------
selector : str
    A selector to query for.
value : Union[Sequence[str], str, None]
    Options to select by value. If the `<select>` has the `multiple` attribute, all given options are selected,
    otherwise only the first option matching one of the passed options is selected. Optional.
index : Union[Sequence[int], int, None]
    Options to select by index. Optional.
label : Union[Sequence[str], str, None]
    Options to select by label. If the `<select>` has the `multiple` attribute, all given options are selected,
    otherwise only the first option matching one of the passed options is selected. Optional.
element : Union[ElementHandle, Sequence[ElementHandle], None]
    Option elements to select. Optional.
timeout : Union[float, None]
    Maximum time in milliseconds. Defaults to `30000` (30 seconds). Pass `0` to disable timeout. The default value can
    be changed by using the `browser_context.set_default_timeout()` or `page.set_default_timeout()` methods.
no_wait_after : Union[bool, None]
    This option has no effect.
    Deprecated: This option has no effect.
strict : Union[bool, None]
    When true, the call requires selector to resolve to a single element. If given selector resolves to more than one
    element, the call throws an exception.
force : Union[bool, None]
    Whether to bypass the [actionability](../actionability.md) checks. Defaults to `false`.

Returns
-------
List[str]
)	r  r+  r(  r)  r*  r   r  r  r
  Nr-  )
rI   r  r+  r(  r)  r*  r   r	  r  r
  s
             rJ   r.  Frame.select_option/  s{     N &&....!ooe,ooe,ooe,0) / 
 

 	

   BBB	Bc                z   #    [         R                  " U R                  R                  XUS9I Sh  vN 5      $  N7f)a  Frame.input_value

Returns `input.value` for the selected `<input>` or `<textarea>` or `<select>` element.

Throws for non-input elements. However, if the element is inside the `<label>` element that has an associated
[control](https://developer.mozilla.org/en-US/docs/Web/API/HTMLLabelElement/control), returns the value of the
control.

Parameters
----------
selector : str
    A selector to search for an element. If there are multiple elements satisfying the selector, the first will be
    used.
strict : Union[bool, None]
    When true, the call requires selector to resolve to a single element. If given selector resolves to more than one
    element, the call throws an exception.
timeout : Union[float, None]
    Maximum time in milliseconds. Defaults to `30000` (30 seconds). Pass `0` to disable timeout. The default value can
    be changed by using the `browser_context.set_default_timeout()` or `page.set_default_timeout()` methods.

Returns
-------
str
r  NrF  r  s       rJ   rG  Frame.input_value  A     @ &&..,,!' -  
 	
ry   )r  r   r	  rJ  c          
         #    [         R                  " U R                  R                  U[         R                  " U5      UUUS9I Sh  vN 5      $  N7f)a  Frame.set_input_files

Sets the value of the file input to these file paths or files. If some of the `filePaths` are relative paths, then
they are resolved relative to the current working directory. For empty array, clears the selected files.

This method expects `selector` to point to an
[input element](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input). However, if the element is inside
the `<label>` element that has an associated
[control](https://developer.mozilla.org/en-US/docs/Web/API/HTMLLabelElement/control), targets the control instead.

Parameters
----------
selector : str
    A selector to search for an element. If there are multiple elements satisfying the selector, the first will be
    used.
files : Union[Sequence[Union[pathlib.Path, str]], Sequence[{name: str, mimeType: str, buffer: bytes}], pathlib.Path, str, {name: str, mimeType: str, buffer: bytes}]
strict : Union[bool, None]
    When true, the call requires selector to resolve to a single element. If given selector resolves to more than one
    element, the call throws an exception.
timeout : Union[float, None]
    Maximum time in milliseconds. Defaults to `30000` (30 seconds). Pass `0` to disable timeout. The default value can
    be changed by using the `browser_context.set_default_timeout()` or `page.set_default_timeout()` methods.
no_wait_after : Union[bool, None]
    This option has no effect.
    Deprecated: This option has no effect.
)r  rJ  r  r   r  NrM  )rI   r  rJ  r  r   r	  s         rJ   rN  Frame.set_input_files  sT     T &&..00!ooe,) 1  
 	
r+  )rv  r  r   r	  c                   #    [         R                  " U R                  R                  UUUUUUS9I Sh  vN 5      $  N7f)a  Frame.type

Sends a `keydown`, `keypress`/`input`, and `keyup` event for each character in the text. `frame.type` can be used
to send fine-grained keyboard events. To fill values in form fields, use `frame.fill()`.

To press a special key, like `Control` or `ArrowDown`, use `keyboard.press()`.

**Usage**

Parameters
----------
selector : str
    A selector to search for an element. If there are multiple elements satisfying the selector, the first will be
    used.
text : str
    A text to type into a focused element.
delay : Union[float, None]
    Time to wait between key presses in milliseconds. Defaults to 0.
strict : Union[bool, None]
    When true, the call requires selector to resolve to a single element. If given selector resolves to more than one
    element, the call throws an exception.
timeout : Union[float, None]
    Maximum time in milliseconds. Defaults to `30000` (30 seconds). Pass `0` to disable timeout. The default value can
    be changed by using the `browser_context.set_default_timeout()` or `page.set_default_timeout()` methods.
no_wait_after : Union[bool, None]
    This option has no effect.
    Deprecated: This option has no effect.
)r  r   rv  r  r   r  Nrx  )rI   r  r   rv  r  r   r	  s          rJ   ry  
Frame.type  sN     N &&..%%!) &  	
 		
rg  rh  c                   #    [         R                  " U R                  R                  UUUUUUS9I Sh  vN 5      $  N7f)am	  Frame.press

`key` can specify the intended
[keyboardEvent.key](https://developer.mozilla.org/en-US/docs/Web/API/KeyboardEvent/key) value or a single character
to generate the text for. A superset of the `key` values can be found
[here](https://developer.mozilla.org/en-US/docs/Web/API/KeyboardEvent/key/Key_Values). Examples of the keys are:

`F1` - `F12`, `Digit0`- `Digit9`, `KeyA`- `KeyZ`, `Backquote`, `Minus`, `Equal`, `Backslash`, `Backspace`, `Tab`,
`Delete`, `Escape`, `ArrowDown`, `End`, `Enter`, `Home`, `Insert`, `PageDown`, `PageUp`, `ArrowRight`, `ArrowUp`,
etc.

Following modification shortcuts are also supported: `Shift`, `Control`, `Alt`, `Meta`, `ShiftLeft`,
`ControlOrMeta`. `ControlOrMeta` resolves to `Control` on Windows and Linux and to `Meta` on macOS.

Holding down `Shift` will type the text that corresponds to the `key` in the upper case.

If `key` is a single character, it is case-sensitive, so the values `a` and `A` will generate different respective
texts.

Shortcuts such as `key: "Control+o"`, `key: "Control++` or `key: "Control+Shift+T"` are supported as well. When
specified with the modifier, modifier is pressed and being held while the subsequent key is being pressed.

Parameters
----------
selector : str
    A selector to search for an element. If there are multiple elements satisfying the selector, the first will be
    used.
key : str
    Name of the key to press or a character to generate, such as `ArrowLeft` or `a`.
delay : Union[float, None]
    Time to wait between `keydown` and `keyup` in milliseconds. Defaults to 0.
strict : Union[bool, None]
    When true, the call requires selector to resolve to a single element. If given selector resolves to more than one
    element, the call throws an exception.
timeout : Union[float, None]
    Maximum time in milliseconds. Defaults to `30000` (30 seconds). Pass `0` to disable timeout. The default value can
    be changed by using the `browser_context.set_default_timeout()` or `page.set_default_timeout()` methods.
no_wait_after : Union[bool, None]
    Actions that initiate navigations are waiting for these navigations to happen and for pages to start loading. You
    can opt out of waiting via setting this flag. You would only need this option in the exceptional cases such as
    navigating to inaccessible pages. Defaults to `false`.
    Deprecated: This option will default to `true` in the future.
)r  rh  rv  r  r   r  Nr|  )rI   r  rh  rv  r  r   r	  s          rJ   r}  Frame.press  sN     l &&..&&!) '  	
 		
rg  r  r   r
  r	  r  r  c                   #    [         R                  " U R                  R                  UUUUUUUS9I Sh  vN 5      $  N7f)aw  Frame.check

This method checks an element matching `selector` by performing the following steps:
1. Find an element matching `selector`. If there is none, wait until a matching element is attached to the DOM.
1. Ensure that matched element is a checkbox or a radio input. If not, this method throws. If the element is
   already checked, this method returns immediately.
1. Wait for [actionability](https://playwright.dev/python/docs/actionability) checks on the matched element, unless `force` option is set. If
   the element is detached during the checks, the whole action is retried.
1. Scroll the element into view if needed.
1. Use `page.mouse` to click in the center of the element.
1. Ensure that the element is now checked. If not, this method throws.

When all steps combined have not finished during the specified `timeout`, this method throws a `TimeoutError`.
Passing zero timeout disables this.

Parameters
----------
selector : str
    A selector to search for an element. If there are multiple elements satisfying the selector, the first will be
    used.
position : Union[{x: float, y: float}, None]
    A point to use relative to the top-left corner of element padding box. If not specified, uses some visible point of
    the element.
timeout : Union[float, None]
    Maximum time in milliseconds. Defaults to `30000` (30 seconds). Pass `0` to disable timeout. The default value can
    be changed by using the `browser_context.set_default_timeout()` or `page.set_default_timeout()` methods.
force : Union[bool, None]
    Whether to bypass the [actionability](../actionability.md) checks. Defaults to `false`.
no_wait_after : Union[bool, None]
    This option has no effect.
    Deprecated: This option has no effect.
strict : Union[bool, None]
    When true, the call requires selector to resolve to a single element. If given selector resolves to more than one
    element, the call throws an exception.
trial : Union[bool, None]
    When set, this method only performs the [actionability](../actionability.md) checks and skips the action. Defaults
    to `false`. Useful to wait until the element is ready for the action without performing it.
r  r  r   r
  r  r  r  Nrj  rI   r  r  r   r
  r	  r  r  s           rJ   rk  Frame.checkQ  Q     d &&..&&!!) '  

 
	
   3A >	A c                   #    [         R                  " U R                  R                  UUUUUUUS9I Sh  vN 5      $  N7f)a}  Frame.uncheck

This method checks an element matching `selector` by performing the following steps:
1. Find an element matching `selector`. If there is none, wait until a matching element is attached to the DOM.
1. Ensure that matched element is a checkbox or a radio input. If not, this method throws. If the element is
   already unchecked, this method returns immediately.
1. Wait for [actionability](https://playwright.dev/python/docs/actionability) checks on the matched element, unless `force` option is set. If
   the element is detached during the checks, the whole action is retried.
1. Scroll the element into view if needed.
1. Use `page.mouse` to click in the center of the element.
1. Ensure that the element is now unchecked. If not, this method throws.

When all steps combined have not finished during the specified `timeout`, this method throws a `TimeoutError`.
Passing zero timeout disables this.

Parameters
----------
selector : str
    A selector to search for an element. If there are multiple elements satisfying the selector, the first will be
    used.
position : Union[{x: float, y: float}, None]
    A point to use relative to the top-left corner of element padding box. If not specified, uses some visible point of
    the element.
timeout : Union[float, None]
    Maximum time in milliseconds. Defaults to `30000` (30 seconds). Pass `0` to disable timeout. The default value can
    be changed by using the `browser_context.set_default_timeout()` or `page.set_default_timeout()` methods.
force : Union[bool, None]
    Whether to bypass the [actionability](../actionability.md) checks. Defaults to `false`.
no_wait_after : Union[bool, None]
    This option has no effect.
    Deprecated: This option has no effect.
strict : Union[bool, None]
    When true, the call requires selector to resolve to a single element. If given selector resolves to more than one
    element, the call throws an exception.
trial : Union[bool, None]
    When set, this method only performs the [actionability](../actionability.md) checks and skips the action. Defaults
    to `false`. Useful to wait until the element is ready for the action without performing it.
r*  Nrp  r+  s           rJ   rq  Frame.uncheck  Q     d &&..((!!) )  

 
	
r.  c                 x   #    [         R                  " U R                  R                  US9I Sh  vN 5      $  N7f)a]  Frame.wait_for_timeout

Waits for the given `timeout` in milliseconds.

Note that `frame.waitForTimeout()` should only be used for debugging. Tests using the timer in production are going
to be flaky. Use signals such as network events, selectors becoming visible and others instead.

Parameters
----------
timeout : float
    A timeout to wait for
r4  Nr   rE   rF   wait_for_timeoutr  s     rJ   r4  Frame.wait_for_timeout  s5      &&..11'1BB
 	
Br   r  r   pollingr7  rafc          	         #    [         R                  " U R                  R                  U[         R                  " U5      UUS9I Sh  vN 5      $  N7f)a  Frame.wait_for_function

Returns when the `expression` returns a truthy value, returns that value.

**Usage**

The `frame.wait_for_function()` can be used to observe viewport size change:

```py
import asyncio
from playwright.async_api import async_playwright, Playwright

async def run(playwright: Playwright):
    webkit = playwright.webkit
    browser = await webkit.launch()
    page = await browser.new_page()
    await page.evaluate("window.x = 0; setTimeout(() => { window.x = 100 }, 1000);")
    await page.main_frame.wait_for_function("() => window.x > 0")
    await browser.close()

async def main():
    async with async_playwright() as playwright:
        await run(playwright)
asyncio.run(main())
```

To pass an argument to the predicate of `frame.waitForFunction` function:

```py
selector = ".foo"
await frame.wait_for_function("selector => !!document.querySelector(selector)", selector)
```

Parameters
----------
expression : str
    JavaScript expression to be evaluated in the browser context. If the expression evaluates to a function, the
    function is automatically invoked.
arg : Union[Any, None]
    Optional argument to pass to `expression`.
timeout : Union[float, None]
    Maximum time to wait for in milliseconds. Defaults to `30000` (30 seconds). Pass `0` to disable timeout. The
    default value can be changed by using the `browser_context.set_default_timeout()` or
    `page.set_default_timeout()` methods.
polling : Union["raf", float, None]
    If `polling` is `'raf'`, then `expression` is constantly executed in `requestAnimationFrame` callback. If `polling`
    is a number, then it is treated as an interval in milliseconds at which the function would be executed. Defaults to
    `raf`.

Returns
-------
JSHandle
r  r  r   r7  Nr   r`   rF   wait_for_functionr   rI   r  r  r   r7  s        rJ   r<  Frame.wait_for_function  Q     |   ..22%OOC(	 3  
 	
r0  c                 z   #    [         R                  " U R                  R                  5       I Sh  vN 5      $  N7f)z:Frame.title

Returns the page title.

Returns
-------
str
Nr   rE   rF   titlerH   s    rJ   rB  Frame.title&  +      &&T^^-A-A-C'CDD'Cry   c                   #    [         R                  " U R                  R                  UUUUUUUUS9I Sh  vN 5      $  N7f)a  Frame.set_checked

This method checks or unchecks an element matching `selector` by performing the following steps:
1. Find an element matching `selector`. If there is none, wait until a matching element is attached to the DOM.
1. Ensure that matched element is a checkbox or a radio input. If not, this method throws.
1. If the element already has the right checked state, this method returns immediately.
1. Wait for [actionability](https://playwright.dev/python/docs/actionability) checks on the matched element, unless `force` option is set. If
   the element is detached during the checks, the whole action is retried.
1. Scroll the element into view if needed.
1. Use `page.mouse` to click in the center of the element.
1. Ensure that the element is now checked or unchecked. If not, this method throws.

When all steps combined have not finished during the specified `timeout`, this method throws a `TimeoutError`.
Passing zero timeout disables this.

Parameters
----------
selector : str
    A selector to search for an element. If there are multiple elements satisfying the selector, the first will be
    used.
checked : bool
    Whether to check or uncheck the checkbox.
position : Union[{x: float, y: float}, None]
    A point to use relative to the top-left corner of element padding box. If not specified, uses some visible point of
    the element.
timeout : Union[float, None]
    Maximum time in milliseconds. Defaults to `30000` (30 seconds). Pass `0` to disable timeout. The default value can
    be changed by using the `browser_context.set_default_timeout()` or `page.set_default_timeout()` methods.
force : Union[bool, None]
    Whether to bypass the [actionability](../actionability.md) checks. Defaults to `false`.
no_wait_after : Union[bool, None]
    This option has no effect.
    Deprecated: This option has no effect.
strict : Union[bool, None]
    When true, the call requires selector to resolve to a single element. If given selector resolves to more than one
    element, the call throws an exception.
trial : Union[bool, None]
    When set, this method only performs the [actionability](../actionability.md) checks and skips the action. Defaults
    to `false`. Useful to wait until the element is ready for the action without performing it.
r  r`  r  r   r
  r  r  r  Nrc  	rI   r  r`  r  r   r
  r	  r  r  s	            rJ   rd  Frame.set_checked2  T     j &&..,,!!) - 	 	
 	
	   4A?	Ar   r  r  r  )Ur   r   r   r   r   r  r   r   rG   r   r   r  r   r  r  r   r  r	  PatternrJ  r   r   r  r  r  r  r   r  r  r  r  r  r  r  r  r  r  r  r   r  r  r  r5  r=  rB  r
  r  rG  rM  r  r   r   r  r  r  r;  ro  rw  r}  r  r  r  r  r  r  rS  r  r  r  r  r  r  r.  rG  r   rN  ry  r}  rk  rq  r4  r<  rB  rd  r   r   rM   rJ   r-   r-     sL   	6 	6 <c < <  	;S 	; 	; 	Gfoog6 	G 	G Cfkk'2 C C +/ (,>
>
 '	>

 OOGH
>
 %>
 
	$>
J  *.<
 __LLfnnS16??C5$;3OOP
<
 OOGH
<
 '<
 
"*	-<
H *.-
\\#v~~c2FOOSE4K4PPQ-
 OOGH
	-
 '-
 
-
f 	,
 +/,
=>
,
 ',
 
,
\G4 CG6
6
$*OOFJJ$?6
	6
r CG4
4
$*OOFJJ$?4
	4
n AE

(.(=
		)
:
 
_9U 
8 )-*. J
J
 %	J

 'J
 ?@
J
 
	)J
` )-*. 
 
 %	 

 ' 
 
 
L )-*. 
 
 %	 

 ' 
 
 
L )-*. 
 
 %	 

 ' 
 
 
L )-*. 
 
 %	 

 ' 
 
 
L )-*. 
 
 %	 

 ' 
 
 
L )-*. 
 
 %	 

 ' 
 
 
L 48	E
 )-*.E
E
 E
 OOFKK0	E
 %E
 'E
 
E
V ,0	3
 )-3
3
 3
 __VZZ(	3
 %3
 
3
l RV&
&
),&
39??6::3N&
	&
P
Gs 
G  +/ %
%
 '	%

 OOGH
%
 
%
N
ET 
E %)AE(,%)$
 __S!$
 oofll3+<=>	$

 %$
 ooc"$
 
$
R %)AE(,
 __S!
 oofll3+<=>	

 %
 

N .2(,FJ,0*.'+/3(,'+R
R
 ??OOG$VWX
	R
 //(+R
 u%R
 (A BCR
 __S)R
 'R
 t$R
 t,R
 %R
 t$R
  
!R
t .2(,FJ*.'+/3(,'+N
N
 ??OOG$VWX
	N
 //(+N
 u%N
 (A BCN
 'N
 t$N
 t,N
 %N
 t$N
 
N
l .2*.'+/3(,'+E
E
 ??OOG$VWX
	E
 //(+E
 'E
 t$E
 t,E
 %E
 t$E
 
E
X +//3(,'+4
4
 4

 '4
 t,4
 %4
 t$4
 
4
t MQPT*..2;
;
 //&,,sFNN34G/G"HI	;

 oofll3s8K3K&LM;
 __Y';
 +;
 
;
B (,	#Yll3s 334#Y t$	#Y
 
#YR (,	'Vll3s 334'V t$	'V
 
'VZ (,	'
ll3s 334'
 t$	'

 
'
@ *.*.*.04&*HL)-*.'+G
QS
G
n &oG
p //$'qG
r //$'sG
t -uG
v s#wG
x oofll3s0C+CDEyG
z &{G
| //$'}G
~ t$G
@ 
AG
R$P||C)<$<=$P	$PT (,	>Ull3s 334>U t$	>U
 
>UH (,	%Vll3s 334%V t$	%V
 
%VNRc Rn R@ )-*.

 %	

 '
 

F )-*. 
 
 %	 

 ' 
 
	 
L )-*. 
 
 %	 

 ' 
 
 
L )-*. 
 
 %	 

 ' 
 
 
N )-*.#
#
 #

 %#
 '#
 
	#
V .2*./3'+(,'+C
C
 ??OOG$VWX
	C
 //(+C
 'C
 t,C
 t$C
 %C
 t$C
 
C
T 6:59'+/3(,*.'+9
9
 9

  29
  29
 t$9
 t,9
 %9
 '9
 t$9
 
9
| KOS

 KOJN *./3(,'+S
S
 v||C1E,EFGS

 v||C1E,EFGS
 v||C1E,EFGS
 LL&///*JJK
S
 'S
 t,S
 %S
 t$S
 
S	S
r )-*.$
$
 %	$

 '$
 
$
b )-*./32
2
 ||LLOOFLLgll):;<OOK(	*
2
 %2
 '2
 t,2
 
2
r )-(,*./30
0
 0

 u%0
 %0
 '0
 t,0
 
0
n )-(,*./3?
?
 ?

 u%?
 %?
 '?
 t,?
 
?
J /3*.'+/3(,'+<
<
 //(+	<

 '<
 t$<
 t,<
 %<
 t$<
 
<
D /3*.'+/3(,'+<
<
 //(+	<

 '<
 t$<
 t,<
 %<
 t$<
 
<
|
e 
 
, ,0*.HLE
E
 __VZZ(	E

 'E
 eWU^.C!DEE
 
E
N
ES 
E" /3*.'+/3(,'+@
@
 @

 //(+@
 '@
 t$@
 t,@
 %@
 t$@
 
@
 @
rM   r-   c                      \ rS rSr\S*S j5       r\S*S j5       r\S+S j5       rSSSSS.S	\R                  S\
4   S
\R                  \R                  \
\R                  \
   4      S\R                  \R                  \
\R                  \
   4      S\R                  S   S\R                  S   SS4S jjrSS.S\R                  \
\R                  \
   4   S\R                  \   SS4S jjrSS.S\R                  \
\R                  \
   4   S\R                  \   SS4S jjrSS.S\R                  \
\R                  \
   4   S\R                  \   SS4S jjrSSSSSSSSSS.	S\S   S\R                  \   S\R                  \   S\R                  \   S\R                  \   S\R                  \   S\R                  \R                  \
\R                  \
   4      S\R                  \   S\R                  \   S\R                  \   SS4S  jjrS!\R                  \
\R                  \
   4   SS4S" jrSS.S\R                  \
\R                  \
   4   S\R                  \   SS4S# jjrSS.S\R                  \
\R                  \
   4   S\R                  \   SS4S$ jjrS%\
SS 4S& jrS'\SS 4S( jrS)rg),r2   ix  rB   c                 V    [         R                  " U R                  R                  5      $ )z_FrameLocator.first

Returns locator to the first matching frame.

Returns
-------
FrameLocator
r   r`   rF   firstrH   s    rJ   rO  FrameLocator.firstz  r   rM   c                 V    [         R                  " U R                  R                  5      $ )z]FrameLocator.last

Returns locator to the last matching frame.

Returns
-------
FrameLocator
r   r`   rF   lastrH   s    rJ   rS  FrameLocator.last  r  rM   r3   c                 V    [         R                  " U R                  R                  5      $ )a  FrameLocator.owner

Returns a `Locator` object pointing to the same `iframe` as this frame locator.

Useful when you have a `FrameLocator` object obtained somewhere, and later on would like to interact with the
`iframe` element.

For a reverse operation, use `locator.content_frame()`.

**Usage**

```py
frame_locator = page.locator("iframe[name=\"embedded\"]").content_frame
# ...
locator = frame_locator.owner
await expect(locator).to_be_visible()
```

Returns
-------
Locator
)r   r`   rF   ownerrH   s    rJ   rV  FrameLocator.owner  s    0   !5!566rM   Nrd  selector_or_locatorre  rf  rg  rh  c          
          [         R                  " U R                  R                  UUUU(       a  UR                  OSU(       a  UR                  S95      $ SS95      $ )ak  FrameLocator.locator

The method finds an element matching the specified selector in the locator's subtree. It also accepts filter
options, similar to `locator.filter()` method.

[Learn more about locators](https://playwright.dev/python/docs/locators).

Parameters
----------
selector_or_locator : Union[Locator, str]
    A selector or locator to use when resolving DOM element.
has_text : Union[Pattern[str], str, None]
    Matches elements containing specified text somewhere inside, possibly in a child or a descendant element. When
    passed a [string], matching is case-insensitive and searches for a substring. For example, `"Playwright"` matches
    `<article><div>Playwright</div></article>`.
has_not_text : Union[Pattern[str], str, None]
    Matches elements that do not contain specified text somewhere inside, possibly in a child or a descendant element.
    When passed a [string], matching is case-insensitive and searches for a substring.
has : Union[Locator, None]
    Narrows down the results of the method to those which contain elements matching this relative locator. For example,
    `article` that has `text=Playwright` matches `<article><div>Playwright</div></article>`.

    Inner locator **must be relative** to the outer locator and is queried starting with the outer locator match, not
    the document root. For example, you can find `content` that has `div` in
    `<article><content><div>Playwright</div></content></article>`. However, looking for `content` that has `article
    div` will fail, because the inner locator must be relative and should not use any elements outside the `content`.

    Note that outer and inner locators must belong to the same frame. Inner locator must not contain `FrameLocator`s.
has_not : Union[Locator, None]
    Matches elements that do not contain an element that matches an inner locator. Inner locator is queried against the
    outer one. For example, `article` that does not have `div` matches `<article><span>Playwright</span></article>`.

    Note that outer and inner locators must belong to the same frame. Inner locator must not contain `FrameLocator`s.

Returns
-------
Locator
NselectorOrLocatorrk  rl  rg  rm  rn  rI   rX  re  rf  rg  rh  s         rJ   ro  FrameLocator.locator  g    `   NN"""5 '%(CMMd,3w(( # 
 	
 :> # 
 	
rM   rr  r   rs  c                \    [         R                  " U R                  R                  XS95      $ )aR  FrameLocator.get_by_alt_text

Allows locating elements by their alt text.

**Usage**

For example, this method will find the image by alt text "Playwright logo":

```html
<img alt='Playwright logo'>
```

```py
await page.get_by_alt_text("Playwright logo").click()
```

Parameters
----------
text : Union[Pattern[str], str]
    Text to locate the element for.
exact : Union[bool, None]
    Whether to find an exact match: case-sensitive and whole-string. Default to false. Ignored when locating by a
    regular expression. Note that exact match still trims whitespace.

Returns
-------
Locator
ru  rv  rx  s      rJ   rw  FrameLocator.get_by_alt_text  rz  rM   c                \    [         R                  " U R                  R                  XS95      $ )a;  FrameLocator.get_by_label

Allows locating input elements by the text of the associated `<label>` or `aria-labelledby` element, or by the
`aria-label` attribute.

**Usage**

For example, this method will find inputs by label "Username" and "Password" in the following DOM:

```html
<input aria-label="Username">
<label for="password-input">Password:</label>
<input id="password-input">
```

```py
await page.get_by_label("Username").fill("john")
await page.get_by_label("Password").fill("secret")
```

Parameters
----------
text : Union[Pattern[str], str]
    Text to locate the element for.
exact : Union[bool, None]
    Whether to find an exact match: case-sensitive and whole-string. Default to false. Ignored when locating by a
    regular expression. Note that exact match still trims whitespace.

Returns
-------
Locator
ru  r|  rx  s      rJ   r}  FrameLocator.get_by_label  r  rM   c                \    [         R                  " U R                  R                  XS95      $ )a  FrameLocator.get_by_placeholder

Allows locating input elements by the placeholder text.

**Usage**

For example, consider the following DOM structure.

```html
<input type="email" placeholder="name@example.com" />
```

You can fill the input after locating it by the placeholder text:

```py
await page.get_by_placeholder("name@example.com").fill("playwright@microsoft.com")
```

Parameters
----------
text : Union[Pattern[str], str]
    Text to locate the element for.
exact : Union[bool, None]
    Whether to find an exact match: case-sensitive and whole-string. Default to false. Ignored when locating by a
    regular expression. Note that exact match still trims whitespace.

Returns
-------
Locator
ru  r  rx  s      rJ   r  FrameLocator.get_by_placeholder4  r  rM   r  r  r  r`  r  r  r  r  r   r  r  c       	         n    [         R                  " U R                  R                  UUUUUUUUU	U
S9
5      $ )aP  FrameLocator.get_by_role

Allows locating elements by their [ARIA role](https://www.w3.org/TR/wai-aria-1.2/#roles),
[ARIA attributes](https://www.w3.org/TR/wai-aria-1.2/#aria-attributes) and
[accessible name](https://w3c.github.io/accname/#dfn-accessible-name).

**Usage**

Consider the following DOM structure.

```html
<h3>Sign up</h3>
<label>
  <input type="checkbox" /> Subscribe
</label>
<br/>
<button>Submit</button>
```

You can locate each element by it's implicit role:

```py
await expect(page.get_by_role("heading", name="Sign up")).to_be_visible()

await page.get_by_role("checkbox", name="Subscribe").check()

await page.get_by_role("button", name=re.compile("submit", re.IGNORECASE)).click()
```

**Details**

Role selector **does not replace** accessibility audits and conformance tests, but rather gives early feedback
about the ARIA guidelines.

Many html elements have an implicitly [defined role](https://w3c.github.io/html-aam/#html-element-role-mappings)
that is recognized by the role selector. You can find all the
[supported roles here](https://www.w3.org/TR/wai-aria-1.2/#role_definitions). ARIA guidelines **do not recommend**
duplicating implicit roles and attributes by setting `role` and/or `aria-*` attributes to default values.

Parameters
----------
role : Union["alert", "alertdialog", "application", "article", "banner", "blockquote", "button", "caption", "cell", "checkbox", "code", "columnheader", "combobox", "complementary", "contentinfo", "definition", "deletion", "dialog", "directory", "document", "emphasis", "feed", "figure", "form", "generic", "grid", "gridcell", "group", "heading", "img", "insertion", "link", "list", "listbox", "listitem", "log", "main", "marquee", "math", "menu", "menubar", "menuitem", "menuitemcheckbox", "menuitemradio", "meter", "navigation", "none", "note", "option", "paragraph", "presentation", "progressbar", "radio", "radiogroup", "region", "row", "rowgroup", "rowheader", "scrollbar", "search", "searchbox", "separator", "slider", "spinbutton", "status", "strong", "subscript", "superscript", "switch", "tab", "table", "tablist", "tabpanel", "term", "textbox", "time", "timer", "toolbar", "tooltip", "tree", "treegrid", "treeitem"]
    Required aria role.
checked : Union[bool, None]
    An attribute that is usually set by `aria-checked` or native `<input type=checkbox>` controls.

    Learn more about [`aria-checked`](https://www.w3.org/TR/wai-aria-1.2/#aria-checked).
disabled : Union[bool, None]
    An attribute that is usually set by `aria-disabled` or `disabled`.

    **NOTE** Unlike most other attributes, `disabled` is inherited through the DOM hierarchy. Learn more about
    [`aria-disabled`](https://www.w3.org/TR/wai-aria-1.2/#aria-disabled).

expanded : Union[bool, None]
    An attribute that is usually set by `aria-expanded`.

    Learn more about [`aria-expanded`](https://www.w3.org/TR/wai-aria-1.2/#aria-expanded).
include_hidden : Union[bool, None]
    Option that controls whether hidden elements are matched. By default, only non-hidden elements, as
    [defined by ARIA](https://www.w3.org/TR/wai-aria-1.2/#tree_exclusion), are matched by role selector.

    Learn more about [`aria-hidden`](https://www.w3.org/TR/wai-aria-1.2/#aria-hidden).
level : Union[int, None]
    A number attribute that is usually present for roles `heading`, `listitem`, `row`, `treeitem`, with default values
    for `<h1>-<h6>` elements.

    Learn more about [`aria-level`](https://www.w3.org/TR/wai-aria-1.2/#aria-level).
name : Union[Pattern[str], str, None]
    Option to match the [accessible name](https://w3c.github.io/accname/#dfn-accessible-name). By default, matching is
    case-insensitive and searches for a substring, use `exact` to control this behavior.

    Learn more about [accessible name](https://w3c.github.io/accname/#dfn-accessible-name).
pressed : Union[bool, None]
    An attribute that is usually set by `aria-pressed`.

    Learn more about [`aria-pressed`](https://www.w3.org/TR/wai-aria-1.2/#aria-pressed).
selected : Union[bool, None]
    An attribute that is usually set by `aria-selected`.

    Learn more about [`aria-selected`](https://www.w3.org/TR/wai-aria-1.2/#aria-selected).
exact : Union[bool, None]
    Whether `name` is matched exactly: case-sensitive and whole-string. Defaults to false. Ignored when `name` is a
    regular expression. Note that exact match still trims whitespace.

Returns
-------
Locator
r  r  r  s              rJ   r  FrameLocator.get_by_role]  r  rM   r  c                 \    [         R                  " U R                  R                  US95      $ )u:  FrameLocator.get_by_test_id

Locate element by the test id.

**Usage**

Consider the following DOM structure.

```html
<button data-testid="directions">Itinéraire</button>
```

You can locate the element by it's test id:

```py
await page.get_by_test_id("directions").click()
```

**Details**

By default, the `data-testid` attribute is used as a test id. Use `selectors.set_test_id_attribute()` to
configure a different test id attribute if necessary.

Parameters
----------
test_id : Union[Pattern[str], str]
    Id to locate the element by.

Returns
-------
Locator
r  r  r  s     rJ   r  FrameLocator.get_by_test_id&  r  rM   c                \    [         R                  " U R                  R                  XS95      $ )a  FrameLocator.get_by_text

Allows locating elements that contain given text.

See also `locator.filter()` that allows to match by another criteria, like an accessible role, and then
filter by the text content.

**Usage**

Consider the following DOM structure:

```html
<div>Hello <span>world</span></div>
<div>Hello</div>
```

You can locate by text substring, exact string, or a regular expression:

```py
# Matches <span>
page.get_by_text("world")

# Matches first <div>
page.get_by_text("Hello world")

# Matches second <div>
page.get_by_text("Hello", exact=True)

# Matches both <div>s
page.get_by_text(re.compile("Hello"))

# Matches second <div>
page.get_by_text(re.compile("^hello$", re.IGNORECASE))
```

**Details**

Matching by text always normalizes whitespace, even with exact match. For example, it turns multiple spaces into
one, turns line breaks into spaces and ignores leading and trailing whitespace.

Input elements of the type `button` and `submit` are matched by their `value` instead of the text content. For
example, locating by text `"Log in"` matches `<input type=button value="Log in">`.

Parameters
----------
text : Union[Pattern[str], str]
    Text to locate the element for.
exact : Union[bool, None]
    Whether to find an exact match: case-sensitive and whole-string. Default to false. Ignored when locating by a
    regular expression. Note that exact match still trims whitespace.

Returns
-------
Locator
ru  r  rx  s      rJ   r  FrameLocator.get_by_textL  r  rM   c                \    [         R                  " U R                  R                  XS95      $ )a  FrameLocator.get_by_title

Allows locating elements by their title attribute.

**Usage**

Consider the following DOM structure.

```html
<span title='Issues count'>25 issues</span>
```

You can check the issues count after locating it by the title text:

```py
await expect(page.get_by_title("Issues count")).to_have_text("25 issues")
```

Parameters
----------
text : Union[Pattern[str], str]
    Text to locate the element for.
exact : Union[bool, None]
    Whether to find an exact match: case-sensitive and whole-string. Default to false. Ignored when locating by a
    regular expression. Note that exact match still trims whitespace.

Returns
-------
Locator
ru  r  rx  s      rJ   r  FrameLocator.get_by_title  r  rM   r  c                 \    [         R                  " U R                  R                  US95      $ )a  FrameLocator.frame_locator

When working with iframes, you can create a frame locator that will enter the iframe and allow selecting elements
in that iframe.

Parameters
----------
selector : str
    A selector to use when resolving DOM element.

Returns
-------
FrameLocator
r  r  r  s     rJ   r  FrameLocator.frame_locator  s'        !=!=x!=!PQQrM   r(  c                 \    [         R                  " U R                  R                  US95      $ )zFrameLocator.nth

Returns locator to the n-th matching frame. It's zero based, `nth(0)` selects the first frame.

Parameters
----------
index : int

Returns
-------
FrameLocator
r(  r   r`   rF   nthrI   r(  s     rJ   rr  FrameLocator.nth  s'       !3!3%!3!@AArM   r   rB   r2   rB   r3   )r   r   r   r   r   rO  rS  rV  r   r	  r   r   rK  ro  r   rw  r}  r  r   r   r  r  r  r  r  rr  r   r   rM   rJ   r2   r2   x  s   	7 	7 	6 	6 7 7: MQPT*..28
#\\)S.98
 //&,,sFNN34G/G"HI	8

 oofll3s8K3K&LM8
 __Y'8
 +8
 
8
| (,	#Yll3s 334#Y t$	#Y
 
#YR (,	'Vll3s 334'V t$	'V
 
'VZ (,	'
ll3s 334'
 t$	'

 
'
@ *.*.*.04&*HL)-*.'+G
QS
G
n &oG
p //$'qG
r //$'sG
t -uG
v s#wG
x oofll3s0C+CDEyG
z &{G
| //$'}G
~ t$G
@ 
AG
R$P||C)<$<=$P	$PT (,	>Ull3s 334>U t$	>U
 
>UH (,	%Vll3s 334%V t$	%V
 
%VNRc Rn R$B B BrM   r2   c                   `  ^  \ rS rSrS\S   S\R                  S /S4   SS4U 4S jjrS\S   S\R                  S /S4   SS4U 4S	 jjr\	S\
4S
 j5       r SS\
S\R                  \R                     S\R                  4S jjr SS\
S\R                  \R                     SS4S jjrSrU =r$ )r:   i  r  r  r  r  rB   Nc                    > [         TU ]  XS9$ zy
Emitted when this dedicated [WebWorker](https://developer.mozilla.org/en-US/docs/Web/API/Web_Workers_API) is
terminated.r#  r$  r&  s      rJ   r  	Worker.on  s     wzz++rM   c                    > [         TU ]  XS9$ ry  r0  r&  s      rJ   r*  Worker.once  s     w|%|--rM   c                 V    [         R                  " U R                  R                  5      $ )z Worker.url

Returns
-------
str
rD   rH   s    rJ   rG   
Worker.url       &&t~~'9'9::rM   r  r  c                    #    [         R                  " U R                  R                  U[         R                  " U5      S9I Sh  vN 5      $  N7f)a   Worker.evaluate

Returns the return value of `expression`.

If the function passed to the `worker.evaluate()` returns a [Promise], then `worker.evaluate()`
would wait for the promise to resolve and return its value.

If the function passed to the `worker.evaluate()` returns a non-[Serializable] value, then
`worker.evaluate()` returns `undefined`. Playwright also supports transferring some additional values that
are not serializable by `JSON`: `-0`, `NaN`, `Infinity`, `-Infinity`.

Parameters
----------
expression : str
    JavaScript expression to be evaluated in the browser context. If the expression evaluates to a function, the
    function is automatically invoked.
arg : Union[Any, None]
    Optional argument to pass to `expression`.

Returns
-------
Any
r  Nr  r  s      rJ   r  Worker.evaluate  sI     6 &&..))%7??3+? *  
 	
r  r1   c                    #    [         R                  " U R                  R                  U[         R                  " U5      S9I Sh  vN 5      $  N7f)a  Worker.evaluate_handle

Returns the return value of `expression` as a `JSHandle`.

The only difference between `worker.evaluate()` and `worker.evaluate_handle()` is that
`worker.evaluate_handle()` returns `JSHandle`.

If the function passed to the `worker.evaluate_handle()` returns a [Promise], then
`worker.evaluate_handle()` would wait for the promise to resolve and return its value.

Parameters
----------
expression : str
    JavaScript expression to be evaluated in the browser context. If the expression evaluates to a function, the
    function is automatically invoked.
arg : Union[Any, None]
    Optional argument to pass to `expression`.

Returns
-------
JSHandle
r  Nr  r  s      rJ   r  Worker.evaluate_handle  sI     4   ..00%7??3+? 1  
 	
r  r   r  )r   r   r   r   r   r   rJ  r  r*  r   r   rG   r   r   r  r  r   rL  rM  s   @rJ   r:   r:     s    ,w, ??H:'SST, 
	,.w. ??H:'SST. 
	. ;S ; ; CG

$*OOFJJ$?
	
D CG

$*OOFJJ$?
	
 
rM   r:   c                       \ rS rSr SSSS.S\S\R                  \   S\R                  \R                  \\R                  4      S\R                  \
   SS4
S	 jjjrS
\SS4S jrSrg)r<   i>  N)r   content_scriptr   scriptr   r  rB   c          	      z   #    [         R                  " U R                  R                  XX4S9I Sh  vN 5      $  N7f)a  Selectors.register

Selectors must be registered before creating the page.

**Usage**

An example of registering selector engine that queries elements based on a tag name:

```py
import asyncio
from playwright.async_api import async_playwright, Playwright

async def run(playwright: Playwright):
    tag_selector = """
      {
          // Returns the first element matching given selector in the root's subtree.
          query(root, selector) {
              return root.querySelector(selector);
          },
          // Returns all elements matching given selector in the root's subtree.
          queryAll(root, selector) {
              return Array.from(root.querySelectorAll(selector));
          }
      }"""

    # Register the engine. Selectors will be prefixed with "tag=".
    await playwright.selectors.register("tag", tag_selector)
    browser = await playwright.chromium.launch()
    page = await browser.new_page()
    await page.set_content('<div><button>Click me</button></div>')

    # Use the selector prefixed with its name.
    button = await page.query_selector('tag=button')
    # Combine it with built-in locators.
    await page.locator('tag=div').get_by_text('Click me').click()
    # Can use it in any methods supporting selectors.
    button_count = await page.locator('tag=button').count()
    print(button_count)
    await browser.close()

async def main():
    async with async_playwright() as playwright:
        await run(playwright)

asyncio.run(main())
```

Parameters
----------
name : str
    Name that is used in selectors as a prefix, e.g. `{name: 'foo'}` enables `foo=myselectorbody` selectors. May only
    contain `[a-zA-Z0-9_]` characters.
script : Union[str, None]
    Raw script content.
path : Union[pathlib.Path, str, None]
    Path to the JavaScript file. If `path` is a relative path, then it is resolved relative to the current working
    directory.
content_script : Union[bool, None]
    Whether to run this selector engine in isolated JavaScript environment. This environment has access to the same
    DOM, but not any JavaScript objects from the frame's scripts. Defaults to `false`. Note that running as a content
    script is not guaranteed when this engine is used together with other registered engines.
)r   r  r   contentScriptN)r   rE   rF   register)rI   r   r  r   r  s        rJ   r  Selectors.register@  sA     N &&..))t *  
 	
ry   attribute_namec                 \    [         R                  " U R                  R                  US95      $ )zSelectors.set_test_id_attribute

Defines custom attribute name to be used in `page.get_by_test_id()`. `data-testid` is used by default.

Parameters
----------
attribute_name : str
    Test id attribute name.
)attributeName)r   rE   rF   set_test_id_attribute)rI   r  s     rJ   r  Selectors.set_test_id_attribute  s,     &&NN00~0N
 	
rM   r   r  )r   r   r   r   r   r   r   r	  r
  r  r   r  r  r   r   rM   rJ   r<   r<   >  s    
 (,K

 BF04K
K
 $K

 oofll3+<=>K
 -K
 
K
Z
C 
D 
rM   r<   c                      \ rS rSrSS.S\R
                  \R                  \\\	R                  4      SS4S jjr
S\R                  \\4   SS4S jrS\R                  \\\	R                  4   SS4S	 jrSS
 jrS\R                  \\4   SS4S jrS\R                  \\\	R                  4   SS4S jrS\R                  \\\	R                  4   SS4S jrSrg)r#   i  Nr  r  rB   c                x   #    [         R                  " U R                  R                  US9I Sh  vN 5      $  N7f)a  Clock.install

Install fake implementations for the following time-related functions:
- `Date`
- `setTimeout`
- `clearTimeout`
- `setInterval`
- `clearInterval`
- `requestAnimationFrame`
- `cancelAnimationFrame`
- `requestIdleCallback`
- `cancelIdleCallback`
- `performance`

Fake timers are used to manually control the flow of time in tests. They allow you to advance time, fire timers,
and control the behavior of time-dependent functions. See `clock.run_for()` and
`clock.fast_forward()` for more information.

Parameters
----------
time : Union[datetime.datetime, float, str, None]
    Time to initialize with, current system time by default.
r  N)r   rE   rF   installrI   r  s     rJ   r  Clock.install  s0     : &&T^^-C-C-C-N'NOO'Nr   ticksc                 x   #    [         R                  " U R                  R                  US9I Sh  vN 5      $  N7f)aC  Clock.fast_forward

Advance the clock by jumping forward in time. Only fires due timers at most once. This is equivalent to user
closing the laptop lid for a while and reopening it later, after given time.

**Usage**

```py
await page.clock.fast_forward(1000)
await page.clock.fast_forward("30:00")
```

Parameters
----------
ticks : Union[int, str]
    Time may be the number of milliseconds to advance the clock by or a human-readable string. Valid string formats are
    "08" for eight seconds, "01:00" for one minute and "02:34:10" for two hours, 34 minutes and ten seconds.
r  N)r   rE   rF   fast_forwardrI   r  s     rJ   r  Clock.fast_forward  s0     ( &&T^^-H-Hu-H-U'UVV'Ur   c                 x   #    [         R                  " U R                  R                  US9I Sh  vN 5      $  N7f)a  Clock.pause_at

Advance the clock by jumping forward in time and pause the time. Once this method is called, no timers are fired
unless `clock.run_for()`, `clock.fast_forward()`, `clock.pause_at()` or
`clock.resume()` is called.

Only fires due timers at most once. This is equivalent to user closing the laptop lid for a while and reopening it
at the specified time and pausing.

**Usage**

```py
await page.clock.pause_at(datetime.datetime(2020, 2, 2))
await page.clock.pause_at("2020-02-02")
```

For best results, install the clock before navigating the page and set it to a time slightly before the intended
test time. This ensures that all timers run normally during page loading, preventing the page from getting stuck.
Once the page has fully loaded, you can safely use `clock.pause_at()` to pause the clock.

```py
# Initialize clock with some time before the test time and let the page load
# naturally. `Date.now` will progress as the timers fire.
await page.clock.install(time=datetime.datetime(2024, 12, 10, 8, 0, 0))
await page.goto("http://localhost:3333")
await page.clock.pause_at(datetime.datetime(2024, 12, 10, 10, 0, 0))
```

Parameters
----------
time : Union[datetime.datetime, float, str]
    Time to pause at.
r  N)r   rE   rF   pause_atr  s     rJ   r  Clock.pause_at  s1     F &&T^^-D-D$-D-O'OPP'Or   c                 z   #    [         R                  " U R                  R                  5       I Sh  vN 5      $  N7f)zkClock.resume

Resumes timers. Once this method is called, time resumes flowing, timers are fired as usual.
N)r   rE   rF   resumerH   s    rJ   r  Clock.resume  +      &&T^^-B-B-D'DEE'Dry   c                 x   #    [         R                  " U R                  R                  US9I Sh  vN 5      $  N7f)a  Clock.run_for

Advance the clock, firing all the time-related callbacks.

**Usage**

```py
await page.clock.run_for(1000);
await page.clock.run_for("30:00")
```

Parameters
----------
ticks : Union[int, str]
    Time may be the number of milliseconds to advance the clock by or a human-readable string. Valid string formats are
    "08" for eight seconds, "01:00" for one minute and "02:34:10" for two hours, 34 minutes and ten seconds.
r  N)r   rE   rF   run_forr  s     rJ   r  Clock.run_for  s0     & &&T^^-C-C%-C-P'PQQ'Pr   c                 x   #    [         R                  " U R                  R                  US9I Sh  vN 5      $  N7f)a|  Clock.set_fixed_time

Makes `Date.now` and `new Date()` return fixed fake time at all times, keeps all the timers running.

Use this method for simple scenarios where you only need to test with a predefined time. For more advanced
scenarios, use `clock.install()` instead. Read docs on [clock emulation](https://playwright.dev/python/docs/clock) to learn more.

**Usage**

```py
await page.clock.set_fixed_time(datetime.datetime.now())
await page.clock.set_fixed_time(datetime.datetime(2020, 2, 2))
await page.clock.set_fixed_time("2020-02-02")
```

Parameters
----------
time : Union[datetime.datetime, float, str]
    Time to be set.
r  N)r   rE   rF   set_fixed_timer  s     rJ   r  Clock.set_fixed_time  s1     0 &&T^^-J-JPT-J-U'UVV'Ur   c                 x   #    [         R                  " U R                  R                  US9I Sh  vN 5      $  N7f)a  Clock.set_system_time

Sets system time, but does not trigger any timers. Use this to test how the web page reacts to a time shift, for
example switching from summer to winter time, or changing time zones.

**Usage**

```py
await page.clock.set_system_time(datetime.datetime.now())
await page.clock.set_system_time(datetime.datetime(2020, 2, 2))
await page.clock.set_system_time("2020-02-02")
```

Parameters
----------
time : Union[datetime.datetime, float, str]
    Time to be set.
r  N)r   rE   rF   set_system_timer  s     rJ   r  Clock.set_system_time3  s1     , &&T^^-K-KQU-K-V'VWW'Vr   r   r   )r   r   r   r   r   r   r	  r  r   datetimer  r   r  r  r  r  r  r  r   r   rM   rJ   r#   r#     s   
 NRP oofll5#x7H7H+HIJP 
	P>WS#X(> W4 W,#Q6<<sH<M<M0M#N #QSW #QJFR6<<S#9 Rd R*WLLX->->!>?W	W4XLLX->->!>?X	XrM   r#   c                       \ rS rSr\S\4S j5       r\S\4S j5       r\S\R                  S   4S j5       r
\S\4S j5       r\S\R                  S   4S	 j5       rS
rg)r$   iO  rB   c                 V    [         R                  " U R                  R                  5      $ )a+  ConsoleMessage.type

One of the following values: `'log'`, `'debug'`, `'info'`, `'error'`, `'warning'`, `'dir'`, `'dirxml'`, `'table'`,
`'trace'`, `'clear'`, `'startGroup'`, `'startGroupCollapsed'`, `'endGroup'`, `'assert'`, `'profile'`,
`'profileEnd'`, `'count'`, `'timeEnd'`.

Returns
-------
str
rx  rH   s    rJ   ry  ConsoleMessage.typeQ  s     &&t~~':':;;rM   c                 V    [         R                  " U R                  R                  5      $ )zKConsoleMessage.text

The text of the console message.

Returns
-------
str
r   rH   s    rJ   r   ConsoleMessage.text_       &&t~~':':;;rM   r1   c                 V    [         R                  " U R                  R                  5      $ )zConsoleMessage.args

List of arguments passed to a `console` function call. See also `page.on('console')`.

Returns
-------
List[JSHandle]
)r   r   rF   argsrH   s    rJ   r  ConsoleMessage.argsk  s     %%dnn&9&9::rM   c                 V    [         R                  " U R                  R                  5      $ )zXConsoleMessage.location

Returns
-------
{url: str, lineNumber: int, columnNumber: int}
)r   r`   rF   locationrH   s    rJ   r  ConsoleMessage.locationw         !8!899rM   r9   c                 V    [         R                  " U R                  R                  5      $ )zmConsoleMessage.page

The page that produced this console message, if any.

Returns
-------
Union[Page, None]
r   rd   rF   r  rH   s    rJ   r  ConsoleMessage.page       ))$..*=*=>>rM   r   N)r   r   r   r   r   r   ry  r   r   r   r  r   r  r   r  r   r   rM   rJ   r$   r$   O  s    <c < < 	<c 	< 	< 	;fkk*- 	; 	; :. : : 	?foof- 	? 	?rM   r$   c                       \ rS rSr\S\4S j5       r\S\4S j5       r\S\4S j5       r\S\	R                  S   4S j5       rSS	\	R                  \   SS4S
 jjrSS jrSrg)r%   i  rB   c                 V    [         R                  " U R                  R                  5      $ )zwDialog.type

Returns dialog's type, can be one of `alert`, `beforeunload`, `confirm` or `prompt`.

Returns
-------
str
rx  rH   s    rJ   ry  Dialog.type  r  rM   c                 V    [         R                  " U R                  R                  5      $ )zHDialog.message

A message displayed in the dialog.

Returns
-------
str
)r   rE   rF   rZ  rH   s    rJ   rZ  Dialog.message       &&t~~'='=>>rM   c                 V    [         R                  " U R                  R                  5      $ )zDialog.default_value

If dialog is prompt, returns default prompt value. Otherwise, returns empty string.

Returns
-------
str
)r   rE   rF   default_valuerH   s    rJ   r  Dialog.default_value  s     &&t~~'C'CDDrM   r9   c                 V    [         R                  " U R                  R                  5      $ )zcDialog.page

The page that initiated this dialog, if available.

Returns
-------
Union[Page, None]
r  rH   s    rJ   r  Dialog.page  r  rM   Nprompt_textc                 x   #    [         R                  " U R                  R                  US9I Sh  vN 5      $  N7f)zDialog.accept

Returns when the dialog has been accepted.

Parameters
----------
prompt_text : Union[str, None]
    A text to enter in prompt. Does not cause any effects if the dialog's `type` is not prompt. Optional.
)
promptTextN)r   rE   rF   accept)rI   r  s     rJ   r  Dialog.accept  s5      &&..'';'??
 	
?r   c                 z   #    [         R                  " U R                  R                  5       I Sh  vN 5      $  N7f)z<Dialog.dismiss

Returns when the dialog has been dismissed.
N)r   rE   rF   dismissrH   s    rJ   r  Dialog.dismiss  r  ry   r   r  r   )r   r   r   r   r   r   ry  rZ  r  r   r   r  r  r  r   r   rM   rJ   r%   r%     s    	<c 	< 	< 	? 	? 	? 	Es 	E 	E 	?foof- 	? 	?
(< 
 
GrM   r%   c                       \ rS rSr\SS j5       r\S\4S j5       r\S\4S j5       rSS jr	S\
R                  \   4S jrS\R                  4S	 jrS
\
R                   \\R                  4   SS4S jrSS jrSrg)r&   i  rB   c                 V    [         R                  " U R                  R                  5      $ )zPDownload.page

Get the page that the download belongs to.

Returns
-------
Page
r  rH   s    rJ   r  Download.page  r  rM   c                 V    [         R                  " U R                  R                  5      $ )z;Download.url

Returns downloaded url.

Returns
-------
str
rD   rH   s    rJ   rG   Download.url  rL   rM   c                 V    [         R                  " U R                  R                  5      $ )a  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
)r   rE   rF   suggested_filenamerH   s    rJ   r  Download.suggested_filename  s     &&t~~'H'HIIrM   Nc                 z   #    [         R                  " U R                  R                  5       I Sh  vN 5      $  N7f)zaDownload.delete

Deletes the downloaded file. Will wait for the download to finish if necessary.
Nr   rE   rF   deleterH   s    rJ   r  Download.delete  r  ry   c                 z   #    [         R                  " U R                  R                  5       I Sh  vN 5      $  N7f)zDownload.failure

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

Returns
-------
Union[str, None]
Nrk   rH   s    rJ   rl   Download.failure  r7  ry   c                 z   #    [         R                  " U R                  R                  5       I Sh  vN 5      $  N7f)au  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
Nr   rE   rF   r   rH   s    rJ   r   Download.path  s+      &&T^^-@-@-B'BCC'Bry   r   c                 x   #    [         R                  " U R                  R                  US9I Sh  vN 5      $  N7f)a~  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
await download.save_as("/path/to/save/at/" + download.suggested_filename)
```

Parameters
----------
path : Union[pathlib.Path, str]
    Path where the download should be copied.
r   Nr   rE   rF   save_asrI   r   s     rJ   r  Download.save_as+  s0     $ &&T^^-C-C-C-N'NOO'Nr   c                 z   #    [         R                  " U R                  R                  5       I Sh  vN 5      $  N7f)zDownload.cancel

Cancels a download. Will not fail if the download is already finished or canceled. Upon successful cancellations,
`download.failure()` would resolve to `'canceled'`.
N)r   rE   rF   cancelrH   s    rJ   r  Download.cancel?  +      &&T^^-B-B-D'DEE'Dry   r   r  r   )r   r   r   r   r   r  r   rG   r  r  r   r   rl   r
  r  r   r	  r  r  r   r   rM   rJ   r&   r&     s    	6 	6 	;S 	; 	; JC J JF
Gvs3 
GDGLL D P&,,sGLL/@"A Pd P(FrM   r&   c                       \ rS rSrS\R
                  4S jrS\R                  \	\R
                  4   SS4S jr
S	S jrSrg)
r>   iL  rB   c                 z   #    [         R                  " U R                  R                  5       I Sh  vN 5      $  N7f)zVideo.path

Returns the file system path this video will be recorded to. The video is guaranteed to be written to the
filesystem upon closing the browser context. This method throws when connected remotely.

Returns
-------
pathlib.Path
Nr  rH   s    rJ   r   
Video.pathN  s+      &&T^^-@-@-B'BCC'Bry   r   Nc                 x   #    [         R                  " U R                  R                  US9I Sh  vN 5      $  N7f)aF  Video.save_as

Saves the video to a user-specified path. It is safe to call this method while the video is still in progress, or
after the page has closed. This method waits until the page is closed and the video is fully saved.

Parameters
----------
path : Union[pathlib.Path, str]
    Path where the video should be saved.
r  Nr  r  s     rJ   r  Video.save_as[  s0      &&T^^-C-C-C-N'NOO'Nr   c                 z   #    [         R                  " U R                  R                  5       I Sh  vN 5      $  N7f)zVVideo.delete

Deletes the video file. Will wait for the video to finish if necessary.
Nr  rH   s    rJ   r  Video.deletei  r  ry   r   r   )r   r   r   r   r
  r  r   r   r	  r   r  r  r   r   rM   rJ   r>   r>   L  sB    DGLL DP&,,sGLL/@"A Pd PFrM   r>   c            !       D  ^  \ rS rSr\R
                  S\S   S\R                  S /S4   SS4S j5       r\R
                  S\S	   S\R                  S
/S4   SS4S j5       r\R
                  S\S   S\R                  S /S4   SS4S j5       r\R
                  S\S   S\R                  S/S4   SS4S j5       r\R
                  S\S   S\R                  S /S4   SS4S j5       r\R
                  S\S   S\R                  S/S4   SS4S j5       r\R
                  S\S   S\R                  S/S4   SS4S j5       r\R
                  S\S   S\R                  S/S4   SS4S j5       r\R
                  S\S   S\R                  S/S4   SS4S j5       r\R
                  S\S   S\R                  S/S4   SS4S j5       r\R
                  S\S    S\R                  S /S4   SS4S! j5       r\R
                  S\S"   S\R                  S#/S4   SS4S$ j5       r\R
                  S\S%   S\R                  S /S4   SS4S& j5       r\R
                  S\S'   S\R                  S(/S4   SS4S) j5       r\R
                  S\S*   S\R                  S(/S4   SS4S+ j5       r\R
                  S\S,   S\R                  S(/S4   SS4S- j5       r\R
                  S\S.   S\R                  S//S4   SS4S0 j5       r\R
                  S\S1   S\R                  S2/S4   SS4S3 j5       r\R
                  S\S4   S\R                  S5/S4   SS4S6 j5       rS\	S\R                  S7\R                  \R                  S   S4   4   SS4U 4S8 jjr\R
                  S\S   S\R                  S /S4   SS4S9 j5       r\R
                  S\S	   S\R                  S
/S4   SS4S: j5       r\R
                  S\S   S\R                  S /S4   SS4S; j5       r\R
                  S\S   S\R                  S/S4   SS4S< j5       r\R
                  S\S   S\R                  S /S4   SS4S= j5       r\R
                  S\S   S\R                  S/S4   SS4S> j5       r\R
                  S\S   S\R                  S/S4   SS4S? j5       r\R
                  S\S   S\R                  S/S4   SS4S@ j5       r\R
                  S\S   S\R                  S/S4   SS4SA j5       r\R
                  S\S   S\R                  S/S4   SS4SB j5       r\R
                  S\S    S\R                  S /S4   SS4SC j5       r\R
                  S\S"   S\R                  S#/S4   SS4SD j5       r\R
                  S\S%   S\R                  S /S4   SS4SE j5       r\R
                  S\S'   S\R                  S(/S4   SS4SF j5       r\R
                  S\S*   S\R                  S(/S4   SS4SG j5       r\R
                  S\S,   S\R                  S(/S4   SS4SH j5       r\R
                  S\S.   S\R                  S//S4   SS4SI j5       r\R
                  S\S1   S\R                  S2/S4   SS4SJ j5       r\R
                  S\S4   S\R                  S5/S4   SS4SK j5       rS\	S\R                  S7\R                  \R                  S   S4   4   SS4U 4SL jjr\GSTSM j5       r\GSUSN j5       r\GSVSO j5       r\GSWSP j5       r\GSXSQ j5       r\GSYSR j5       r\GSZSS j5       r\S\R*                  S   4ST j5       r\S\	4SU j5       r\S\R0                  \   4SV j5       r\S\R*                  S5   4SW j5       r\GS[SX j5       r\S\R0                  SY   4SZ j5       rS\R0                  S    4S[ jr GS\SS\.S]\R0                  \	   S^\R0                  \R                  \	\R>                  \	   \R                  \	/\ 4   4      S\R0                  S   4S_ jjjr!S`\"SS4Sa jr#S`\"SS4Sb jr$SSc.Sd\	Se\R0                  \    S\R0                  Sf   4Sg jjr%Sd\	S\R*                  Sf   4Sh jr&SSSSi.Sd\	S`\R0                  \"   Sj\R0                  \Sk      Se\R0                  \    S\R0                  Sf   4
Sl jjr'SSSm.Sd\	Se\R0                  \    S`\R0                  \"   S\ 4Sn jjr(SSSm.Sd\	Se\R0                  \    S`\R0                  \"   S\ 4So jjr)SSSm.Sd\	Se\R0                  \    S`\R0                  \"   S\ 4Sp jjr*SSSm.Sd\	Se\R0                  \    S`\R0                  \"   S\ 4Sq jjr+SSSm.Sd\	Se\R0                  \    S`\R0                  \"   S\ 4Sr jjr,SSSm.Sd\	Se\R0                  \    S`\R0                  \"   S\ 4Ss jjr- GS\SSSt.Sd\	Su\	Sv\R0                  \R\                     S`\R0                  \"   Se\R0                  \    SS4Sw jjjr/ GS\Sx\	Sy\R0                  \R`                     S\R`                  4Sz jjr1 GS\Sx\	Sy\R0                  \R`                     SS{4S| jjr2 GS\SSc.Sd\	Sx\	Sy\R0                  \R`                     Se\R0                  \    S\R`                  4
S} jjjr3 GS\Sd\	Sx\	Sy\R0                  \R`                     S\R`                  4S~ jjr4SSSSS.S^\R0                  \	   S\R0                  \R                  \	\5Rl                  4      S\R0                  \	   Su\R0                  \	   SSf4
S jjr7SSSS.S^\R0                  \	   S\R0                  \R                  \	\5Rl                  4      S\R0                  \	   SSf4S jjr8S]\	S\R                  SS4S jr9SS.S]\	S\R                  S\R0                  \    SS4S jjr:S\R\                  \	\	4   SS4S jr;S\	4S jr<SSS.S\	S`\R0                  \"   S\R0                  \S      SS4S jjr=SSSS.S^\	S`\R0                  \"   S\R0                  \S      S\R0                  \	   S\R0                  S/   4
S jjr>SSS.S`\R0                  \"   S\R0                  \S      S\R0                  S/   4S jjr? GS\SS.Sj\R0                  \S      S`\R0                  \"   SS4S jjjr@SSS.S^\R                  \	\R>                  \	   \R                  \	/\ 4   4   S\R0                  \S      S`\R0                  \"   SS4S jjrA GS\SS.S\	S\R0                  \R                     S`\R0                  \"   S\R`                  4S jjjrBSSS.S`\R0                  \"   S\R0                  \S      S\R0                  S/   4S jjrCSSS.S`\R0                  \"   S\R0                  \S      S\R0                  S/   4S jjrDGS]S jrESSSSSS.S\R0                  \S      S\R0                  \S      S\R0                  \S      S\R0                  \S      S\R0                  \S      SS4S jjrFS\SS4S jrGGS]S jrH GS\SS.S\R0                  \	   S\R0                  \R                  \	\5Rl                  4      SS4S jjjrISS.S^\R                  \	\R>                  \	   \R                  \	/\ 4   4   S\R                  \R                  S/\R`                  4   \R                  SS(/\R`                  4   4   S\R0                  \J   SS4S jjrK GS\S^\R                  \	\R>                  \	   \R                  \	/\ 4   4   S\R0                  \R                  \R                  S/\R`                  4   \R                  SS(/\R`                  4   4      SS4S jjrLS^\R                  \	\R>                  \	   \R                  \	/\ 4   4   S\R                  S/\R`                  4   SS4S jrMSS.S\R0                  \S      SS4S jjrNSSSSSS.S\R                  \5Rl                  \	4   S^\R0                  \R                  \	\R>                  \	   4      S\R0                  \S      S\R0                  \    S\R0                  \S      S\R0                  \S      SS4S jjrOSSSSSSSSSSSSSS.S`\R0                  \"   Su\R0                  \S      S\R0                  \R                  \	\5Rl                  4      S\R0                  \J   S\R0                  \    S\R0                  \    S\R0                  \P   S\R0                  \S      S\R0                  \S      S\R0                  \S      S\R0                  \R                  S      S\R0                  \	   S\R0                  \	   S\R4S jjrSS\	4S jrTSSS.S\R0                  \    S\R0                  \	   SS4S jjrUS\ 4S jrVSSSSSSSSSSS.
Sd\	S\R0                  \R                  \S         S\R0                  \W   S\R0                  \"   S\R0                  \S      S\R0                  \J   S`\R0                  \"   S\R0                  \    S\R0                  \    S\R0                  \    Se\R0                  \    SS4S jjrXSSSSSSSSSS.	Sd\	S\R0                  \R                  \S         S\R0                  \W   S\R0                  \"   S\R0                  \S      S`\R0                  \"   S\R0                  \    S\R0                  \    Se\R0                  \    S\R0                  \    SS4S jjrYSSSSSSSS.Sd\	S\R0                  \R                  \S         S\R0                  \W   S`\R0                  \"   S\R0                  \    S\R0                  \    Se\R0                  \    S\R0                  \    SS4S jjrZSSSSS.Sd\	S\	S`\R0                  \"   S\R0                  \    Se\R0                  \    S\R0                  \    SS4S jjr[SSSSS.Sd\	S\R0                  \R                  \	\R>                  \	   4      S\R0                  \R                  \	\R>                  \	   4      S\R0                  S   S\R0                  S   SS4S jjr\SS.S\R                  \	\R>                  \	   4   S\R0                  \    SS4S jjr]SS.S\R                  \	\R>                  \	   4   S\R0                  \    SS4S jjr^SS.S\R                  \	\R>                  \	   4   S\R0                  \    SS4S jjr_SSSSSSSSSS.	S\GS    GS\R0                  \    GS\R0                  \    GS\R0                  \    GS\R0                  \    GS\R0                  \J   S]\R0                  \R                  \	\R>                  \	   4      GS\R0                  \    GS\R0                  \    S\R0                  \    SS4GS jjr`GS	\R                  \	\R>                  \	   4   SS4GS
 jraSS.S\R                  \	\R>                  \	   4   S\R0                  \    SS4GS jjrbSS.S\R                  \	\R>                  \	   4   S\R0                  \    SS4GS jjrcSd\	SGS4GS jrdSSSm.Sd\	Se\R0                  \    S`\R0                  \"   SS4GS jjreSSSm.Sd\	Se\R0                  \    S`\R0                  \"   S\R0                  \	   4GS jjrfSSSm.Sd\	Se\R0                  \    S`\R0                  \"   S\	4GS jjrgSSSm.Sd\	Se\R0                  \    S`\R0                  \"   S\	4GS jjrhSSSm.Sd\	S]\	Se\R0                  \    S`\R0                  \"   S\R0                  \	   4
GS jjriSSSSSSSGS.Sd\	S\R0                  \R                  \S         S\R0                  \W   S`\R0                  \"   S\R0                  \    S\R0                  \    Se\R0                  \    S\R0                  \    SS4GS jjrjSSSSSSSGS.GS\	GS\	GS\R0                  \W   GS\R0                  \W   S\R0                  \    S\R0                  \    S`\R0                  \"   Se\R0                  \    S\R0                  \    SS4GS jjrk GS\SSSSSSSGS.Sd\	S\R0                  \R                  \	\R                  \	   4      GS\R0                  \R                  \J\R                  \J   4      GS\R0                  \R                  \	\R                  \	   4      GS\R0                  \R                  Sf\R                  Sf   4      S`\R0                  \"   S\R0                  \    S\R0                  \    Se\R0                  \    S\R*                  \	   4GS  jjjrlSSSm.Sd\	Se\R0                  \    S`\R0                  \"   S\	4GS! jjrmSSSGS".Sd\	GS#\R                  \	\5Rl                  \n\R                  \R                  \	\5Rl                  4      \R                  \n   4   S`\R0                  \"   Se\R0                  \    S\R0                  \    SS4GS$ jjroSSSSGS%.Sd\	S\	S\R0                  \"   S`\R0                  \"   S\R0                  \    Se\R0                  \    SS4GS& jjrpSSSSGS%.Sd\	GS'\	S\R0                  \"   S`\R0                  \"   S\R0                  \    Se\R0                  \    SS4GS( jjrqSSSSSSGS).Sd\	S\R0                  \W   S`\R0                  \"   S\R0                  \    S\R0                  \    Se\R0                  \    S\R0                  \    SS4GS* jjrrSSSSSSGS).Sd\	S\R0                  \W   S`\R0                  \"   S\R0                  \    S\R0                  \    Se\R0                  \    S\R0                  \    SS4GS+ jjrsS`\"SS4GS, jrtSSSGS-.Sx\	Sy\R0                  \R`                     S`\R0                  \"   GS.\R0                  \R                  \"\GS/   4      SS{4
GS0 jjruGS]GS1 jrvSSSSSSSSSSSSSSSGS2.S\R0                  \"   GS3\R0                  \    GS4\R0                  \	   GS5\R0                  \	   GS6\R0                  \    GS7\R0                  \    GS8\R0                  \	   GS9\R0                  \	   GS:\R0                  \R                  \	\"4      GS;\R0                  \R                  \	\"4      GS<\R0                  \    GS=\R0                  \w   S\R0                  \R                  \	\5Rl                  4      GS>\R0                  \    GS?\R0                  \    S\R4 GS@ jjrx GS\SS.S\	S\R0                  \R                     S`\R0                  \"   S\y4GSA jjjrz GS\SS.S\R0                  \R                  S
/\ 4      S`\R0                  \"   S\yS
   4GSB jjjr{ GS\SS.S\R0                  \R                  S/\ 4      S`\R0                  \"   S\yS   4GSC jjjr| GS\SS.S\R0                  \R                  S/\ 4      S`\R0                  \"   S\yS   4GSD jjjr}SSSGSE.S^\R0                  \R                  \	\R>                  \	   \R                  \	/\ 4   4      S\R0                  \S      S`\R0                  \"   S\yS/   4GSF jjr~ GS\SS.S\R0                  \R                  S /\ 4      S`\R0                  \"   S\yS    4GSG jjjrSS.GSH\R                  \	\R>                  \	   \R                  S(/\ 4   4   S`\R0                  \"   S\yS(   4GSI jjr GS\SS.S\R0                  \R                  S(/\ 4      S`\R0                  \"   S\yS(   4GSJ jjjrSS.GSH\R                  \	\R>                  \	   \R                  S//\ 4   4   S`\R0                  \"   S\yS/   4GSK jjr GS\SS.S\R0                  \R                  S2/\ 4      S`\R0                  \"   S\yS2   4GSL jjjr GS\SS.S\R0                  \R                  S5/\ 4      S`\R0                  \"   S\yS5   4GSM jjjrSSSSSSGS).Sd\	GS\ S\R0                  \W   S`\R0                  \"   S\R0                  \    S\R0                  \    Se\R0                  \    S\R0                  \    SS4GSN jjrSSGSO.GSPSS\R                  \R                  S/\R`                  4   \R                  / \R`                  4   4   S\R0                  \    S\R0                  \J   SS4
GSQ jjrGS^GSR jrGSSrU =r$ (_  r9   iu  r  r  r  r  rB   Nc                     gz
Emitted when the page closes.Nr   r  s      rJ   r  Page.onw  r  rM   consoler$   c                     ga  
Emitted when JavaScript within the page calls one of console API methods, e.g. `console.log` or `console.dir`.

The arguments passed into `console.log` are available on the `ConsoleMessage` event handler argument.

**Usage**

```py
async def print_args(msg):
    values = []
    for arg in msg.args:
        values.append(await arg.json_value())
    print(values)

page.on("console", print_args)
await page.evaluate("console.log('hello', 5, { foo: 'bar' })")
```Nr   r  s      rJ   r  r    r  rM   crashc                     ga  
Emitted when the page crashes. Browser pages might crash if they try to allocate too much memory. When the page
crashes, ongoing and subsequent operations will throw.

The most common way to deal with crashes is to catch an exception:

```py
try:
    # crash might happen during a click.
    await page.click("button")
    # or while waiting for an event.
    await page.wait_for_event("popup")
except Error as e:
    pass
    # when the page crashes, exception message contains "crash".
```Nr   r  s      rJ   r  r    r  rM   r  r%   c                     ga9  
Emitted when a JavaScript dialog appears, such as `alert`, `prompt`, `confirm` or `beforeunload`. Listener **must**
either `dialog.accept()` or `dialog.dismiss()` the dialog - otherwise the page will
[freeze](https://developer.mozilla.org/en-US/docs/Web/JavaScript/EventLoop#never_blocking) waiting for the dialog,
and actions like click will never finish.

**Usage**

```python
page.on("dialog", lambda dialog: dialog.accept())
```

**NOTE** When no `page.on('dialog')` or `browser_context.on('dialog')` listeners are present, all dialogs are
automatically dismissed.Nr   r  s      rJ   r  r    r  rM   r  c                     gz
Emitted when the JavaScript
[`DOMContentLoaded`](https://developer.mozilla.org/en-US/docs/Web/Events/DOMContentLoaded) event is dispatched.
Nr   r  s      rJ   r  r    r  rM   downloadr&   c                     gz
Emitted when attachment download started. User can access basic file operations on downloaded content via the
passed `Download` instance.Nr   r  s      rJ   r  r    r  rM   filechooserr,   c                     gaA  
Emitted when a file chooser is supposed to appear, such as after clicking the  `<input type=file>`. Playwright can
respond to it via setting the input files using `file_chooser.set_files()` that can be uploaded after that.

```py
page.on("filechooser", lambda file_chooser: file_chooser.set_files("/tmp/myfile.pdf"))
```Nr   r  s      rJ   r  r    r  rM   frameattachedr-   c                     gz"
Emitted when a frame is attached.Nr   r  s      rJ   r  r    r  rM   framedetachedc                     gz"
Emitted when a frame is detached.Nr   r  s      rJ   r  r    r  rM   framenavigatedc                     gz0
Emitted when a frame is navigated to a new url.Nr   r  s      rJ   r  r    r  rM   r  c                     gzu
Emitted when the JavaScript [`load`](https://developer.mozilla.org/en-US/docs/Web/Events/load) event is dispatched.
Nr   r  s      rJ   r  r    r  rM   	pageerrorr(   c                     ga+  
Emitted when an uncaught exception happens within the page.

```py
# Log all uncaught errors to the terminal
page.on("pageerror", lambda exc: print(f"uncaught exception: {exc}"))

# Navigate to a page with an exception.
await page.goto("data:text/html,<script>throw new Error('test')</script>")
```Nr   r  s      rJ   r  r    r  rM   popupc                     ga  
Emitted when the page opens a new tab or window. This event is emitted in addition to the
`browser_context.on('page')`, but only for popups relevant to this page.

The earliest moment that page is available is when it has navigated to the initial url. For example, when opening a
popup with `window.open('http://example.com')`, this event will fire when the network request to
"http://example.com" is done and its response has started loading in the popup. If you would like to route/listen
to this network request, use `browser_context.route()` and `browser_context.on('request')` respectively
instead of similar methods on the `Page`.

```py
async with page.expect_event("popup") as page_info:
    await page.get_by_text("open the popup").click()
popup = await page_info.value
print(await popup.evaluate("location.href"))
```

**NOTE** Use `page.wait_for_load_state()` to wait until the page gets to a particular state (you should not
need it in most cases).Nr   r  s      rJ   r  r  !  r  rM   r   r4   c                     gz
Emitted when a page issues a request. The [request] object is read-only. In order to intercept and mutate requests,
see `page.route()` or `browser_context.route()`.Nr   r  s      rJ   r  r  ;  r  rM   requestfailedc                     ga  
Emitted when a request fails, for example by timing out.

```python
page.on("requestfailed", lambda request: print(request.url + " " + request.failure.error_text))
```

**NOTE** HTTP Error responses, such as 404 or 503, are still successful responses from HTTP standpoint, so request
will complete with `page.on('request_finished')` event and not with `page.on('request_failed')`. A request will
only be considered failed when the client cannot get an HTTP response from the server, e.g. due to network error
net::ERR_FAILED.Nr   r  s      rJ   r  r  E  r  rM   requestfinishedc                     gz
Emitted when a request finishes successfully after downloading the response body. For a successful response, the
sequence of events is `request`, `response` and `requestfinished`.Nr   r  s      rJ   r  r  W  r  rM   r{   r5   c                     gz
Emitted when [response] status and headers are received for a request. For a successful response, the sequence of
events is `request`, `response` and `requestfinished`.Nr   r  s      rJ   r  r  a  r  rM   	websocketr7   c                     gz*
Emitted when `WebSocket` request is sent.Nr   r  s      rJ   r  r  k  r  rM   workerr:   c                     gz
Emitted when a dedicated [WebWorker](https://developer.mozilla.org/en-US/docs/Web/API/Web_Workers_API) is spawned
by the page.Nr   r  s      rJ   r  r  t  r  rM   .c                    > [         TU ]  XS9$ r"  r$  r&  s      rJ   r  r  ~  r(  rM   c                     gr  r   r  s      rJ   r*  	Page.once  r  rM   c                     gr  r   r  s      rJ   r*  r*    r  rM   c                     gr  r   r  s      rJ   r*  r*    r  rM   c                     gr  r   r  s      rJ   r*  r*    r  rM   c                     gr   r   r  s      rJ   r*  r*    r  rM   c                     gr  r   r  s      rJ   r*  r*    r  rM   c                     gr  r   r  s      rJ   r*  r*    r  rM   c                     gr	  r   r  s      rJ   r*  r*    r  rM   c                     gr  r   r  s      rJ   r*  r*    r  rM   c                     gr  r   r  s      rJ   r*  r*    r  rM   c                     gr  r   r  s      rJ   r*  r*    r  rM   c                     gr  r   r  s      rJ   r*  r*    r  rM   c                     gr  r   r  s      rJ   r*  r*  /  r  rM   c                     gr  r   r  s      rJ   r*  r*  I  r  rM   c                     gr  r   r  s      rJ   r*  r*  S  r  rM   c                     gr  r   r  s      rJ   r*  r*  e  r  rM   c                     gr!  r   r  s      rJ   r*  r*  o  r  rM   c                     gr$  r   r  s      rJ   r*  r*  y  r  rM   c                     gr'  r   r  s      rJ   r*  r*    r  rM   c                    > [         TU ]  XS9$ r"  r0  r&  s      rJ   r*  r*    r1  rM   c                 V    [         R                  " U R                  R                  5      $ )z2Page.accessibility

Returns
-------
Accessibility
)r   r`   rF   accessibilityrH   s    rJ   r?  Page.accessibility  s       !=!=>>rM   c                 V    [         R                  " U R                  R                  5      $ )z(Page.keyboard

Returns
-------
Keyboard
)r   r`   rF   keyboardrH   s    rJ   rB  Page.keyboard  r  rM   c                 V    [         R                  " U R                  R                  5      $ )z"Page.mouse

Returns
-------
Mouse
)r   r`   rF   mouserH   s    rJ   rE  
Page.mouse  s       !5!566rM   c                 V    [         R                  " U R                  R                  5      $ )z.Page.touchscreen

Returns
-------
Touchscreen
)r   r`   rF   touchscreenrH   s    rJ   rH  Page.touchscreen  s       !;!;<<rM   c                 V    [         R                  " U R                  R                  5      $ )z`Page.context

Get the browser context that the page belongs to.

Returns
-------
BrowserContext
)r   r`   rF   contextrH   s    rJ   rK  Page.context  r   rM   c                 V    [         R                  " U R                  R                  5      $ )z]Page.clock

Playwright has ability to mock clock and passage of time.

Returns
-------
Clock
r   r`   rF   clockrH   s    rJ   rO  
Page.clock  r   rM   c                 V    [         R                  " U R                  R                  5      $ )zPage.main_frame

The page's main frame. Page is guaranteed to have a main frame which persists during navigations.

Returns
-------
Frame
)r   r`   rF   
main_framerH   s    rJ   rR  Page.main_frame  s       !:!:;;rM   c                 V    [         R                  " U R                  R                  5      $ )zWPage.frames

An array of all frames attached to the page.

Returns
-------
List[Frame]
)r   r   rF   framesrH   s    rJ   rU  Page.frames  s     %%dnn&;&;<<rM   c                 V    [         R                  " U R                  R                  5      $ )zPage.url

Returns
-------
str
rD   rH   s    rJ   rG   Page.url  r  rM   c                 V    [         R                  " U R                  R                  5      $ )zKPage.viewport_size

Returns
-------
Union[{width: int, height: int}, None]
)r   rd   rF   viewport_sizerH   s    rJ   rZ  Page.viewport_size  s     ))$..*F*FGGrM   c                 V    [         R                  " U R                  R                  5      $ )zPage.workers

This method returns all of the dedicated
[WebWorkers](https://developer.mozilla.org/en-US/docs/Web/API/Web_Workers_API) associated with the page.

**NOTE** This does not contain ServiceWorkers

Returns
-------
List[Worker]
)r   r   rF   workersrH   s    rJ   r]  Page.workers  s     %%dnn&<&<==rM   c                 V    [         R                  " U R                  R                  5      $ )zPage.request

API testing helper associated with this page. This method returns the same instance as
`browser_context.request` on the page's context. See `browser_context.request` for more
details.

Returns
-------
APIRequestContext
r   rH   s    rJ   r   Page.request  s       !7!788rM   r>   c                 V    [         R                  " U R                  R                  5      $ )zXPage.video

Video object associated with this page.

Returns
-------
Union[Video, None]
)r   rd   rF   videorH   s    rJ   rb  
Page.video  s     ))$..*>*>??rM   c                 z   #    [         R                  " U R                  R                  5       I Sh  vN 5      $  N7f)zPage.opener

Returns the opener for popup pages and `null` for others. If the opener has been closed already the returns `null`.

Returns
-------
Union[Page, None]
N)r   rd   rF   openerrH   s    rJ   re  Page.opener(  s+      ))0E0E0G*GHH*Gry   )rG   r   rG   c                z    [         R                  " U R                  R                  XR	                  U5      S95      $ )a  Page.frame

Returns frame matching the specified criteria. Either `name` or `url` must be specified.

**Usage**

```py
frame = page.frame(name="frame-name")
```

Parameters
----------
name : Union[str, None]
    Frame name specified in the `iframe`'s `name` attribute. Optional.
url : Union[Callable[[str], bool], Pattern[str], str, None]
    A glob pattern, regex pattern or predicate receiving frame's `url` as a [URL] object. Optional.

Returns
-------
Union[Frame, None]
)r   rG   )r   rd   rF   ra   r:  )rI   r   rG   s      rJ   ra   
Page.frame4  s7    < ))NN  d0B0B30G H
 	
rM   r   c                 \    [         R                  " U R                  R                  US95      $ )aA  Page.set_default_navigation_timeout

This setting will change the default maximum navigation time for the following methods and related shortcuts:
- `page.go_back()`
- `page.go_forward()`
- `page.goto()`
- `page.reload()`
- `page.set_content()`
- `page.expect_navigation()`
- `page.wait_for_url()`

**NOTE** `page.set_default_navigation_timeout()` takes priority over `page.set_default_timeout()`,
`browser_context.set_default_timeout()` and `browser_context.set_default_navigation_timeout()`.

Parameters
----------
timeout : float
    Maximum navigation time in milliseconds
r4  r   rE   rF   set_default_navigation_timeoutr  s     rJ   rk  #Page.set_default_navigation_timeoutV  s,    * &&NN99'9J
 	
rM   c                 \    [         R                  " U R                  R                  US95      $ )aF  Page.set_default_timeout

This setting will change the default maximum time for all the methods accepting `timeout` option.

**NOTE** `page.set_default_navigation_timeout()` takes priority over `page.set_default_timeout()`.

Parameters
----------
timeout : float
    Maximum time in milliseconds. Pass `0` to disable timeout.
r4  r   rE   rF   set_default_timeoutr  s     rJ   ro  Page.set_default_timeouto  s,     &&NN..w.?
 	
rM   r  r  r  r'   c                x   #    [         R                  " U R                  R                  XS9I Sh  vN 5      $  N7f)a  Page.query_selector

The method finds an element matching the specified selector within the page. If no elements match the selector, the
return value resolves to `null`. To wait for an element on the page, use `locator.wait_for()`.

Parameters
----------
selector : str
    A selector to query for.
strict : Union[bool, None]
    When true, the call requires selector to resolve to a single element. If given selector resolves to more than one
    element, the call throws an exception.

Returns
-------
Union[ElementHandle, None]
r  Nr  r  s      rJ   r  Page.query_selector  s5     * ))..///QQ
 	
Qr   c                 x   #    [         R                  " U R                  R                  US9I Sh  vN 5      $  N7f)a  Page.query_selector_all

The method finds all elements matching the specified selector within the page. If no elements match the selector,
the return value resolves to `[]`.

Parameters
----------
selector : str
    A selector to query for.

Returns
-------
List[ElementHandle]
r  Nr  r  s     rJ   r  Page.query_selector_all  r  r   )r   r  r  r  r  c          	      z   #    [         R                  " U R                  R                  XX4S9I Sh  vN 5      $  N7f)a	  Page.wait_for_selector

Returns when element specified by selector satisfies `state` option. Returns `null` if waiting for `hidden` or
`detached`.

**NOTE** Playwright automatically waits for element to be ready before performing an action. Using `Locator`
objects and web-first assertions makes the code wait-for-selector-free.

Wait for the `selector` to satisfy `state` option (either appear/disappear from dom, or become visible/hidden). If
at the moment of calling the method `selector` already satisfies the condition, the method will return immediately.
If the selector doesn't satisfy the condition for the `timeout` milliseconds, the function will throw.

**Usage**

This method works across navigations:

```py
import asyncio
from playwright.async_api import async_playwright, Playwright

async def run(playwright: Playwright):
    chromium = playwright.chromium
    browser = await chromium.launch()
    page = await browser.new_page()
    for current_url in ["https://google.com", "https://bbc.com"]:
        await page.goto(current_url, wait_until="domcontentloaded")
        element = await page.wait_for_selector("img")
        print("Loaded image: " + str(await element.get_attribute("src")))
    await browser.close()

async def main():
    async with async_playwright() as playwright:
        await run(playwright)
asyncio.run(main())
```

Parameters
----------
selector : str
    A selector to query for.
timeout : Union[float, None]
    Maximum time in milliseconds. Defaults to `30000` (30 seconds). Pass `0` to disable timeout. The default value can
    be changed by using the `browser_context.set_default_timeout()` or `page.set_default_timeout()` methods.
state : Union["attached", "detached", "hidden", "visible", None]
    Defaults to `'visible'`. Can be either:
    - `'attached'` - wait for element to be present in DOM.
    - `'detached'` - wait for element to not be present in DOM.
    - `'visible'` - wait for element to have non-empty bounding box and no `visibility:hidden`. Note that element
      without any content or with `display:none` has an empty bounding box and is not considered visible.
    - `'hidden'` - wait for element to be either detached from DOM, or have an empty bounding box or
      `visibility:hidden`. This is opposite to the `'visible'` option.
strict : Union[bool, None]
    When true, the call requires selector to resolve to a single element. If given selector resolves to more than one
    element, the call throws an exception.

Returns
-------
Union[ElementHandle, None]
)r  r   r  r  Nr  )rI   r  r   r  r  s        rJ   r  Page.wait_for_selector  sA     L ))..22!% 3  
 	
ry   r  c                z   #    [         R                  " U R                  R                  XUS9I Sh  vN 5      $  N7f)a  Page.is_checked

Returns whether the element is checked. Throws if the element is not a checkbox or radio input.

Parameters
----------
selector : str
    A selector to search for an element. If there are multiple elements satisfying the selector, the first will be
    used.
strict : Union[bool, None]
    When true, the call requires selector to resolve to a single element. If given selector resolves to more than one
    element, the call throws an exception.
timeout : Union[float, None]
    Maximum time in milliseconds. Defaults to `30000` (30 seconds). Pass `0` to disable timeout. The default value can
    be changed by using the `browser_context.set_default_timeout()` or `page.set_default_timeout()` methods.

Returns
-------
bool
r  Nr  r  s       rJ   r  Page.is_checked  r  ry   c                z   #    [         R                  " U R                  R                  XUS9I Sh  vN 5      $  N7f)a  Page.is_disabled

Returns whether the element is disabled, the opposite of [enabled](https://playwright.dev/python/docs/actionability#enabled).

Parameters
----------
selector : str
    A selector to search for an element. If there are multiple elements satisfying the selector, the first will be
    used.
strict : Union[bool, None]
    When true, the call requires selector to resolve to a single element. If given selector resolves to more than one
    element, the call throws an exception.
timeout : Union[float, None]
    Maximum time in milliseconds. Defaults to `30000` (30 seconds). Pass `0` to disable timeout. The default value can
    be changed by using the `browser_context.set_default_timeout()` or `page.set_default_timeout()` methods.

Returns
-------
bool
r  Nr  r  s       rJ   r  Page.is_disabled   r  ry   c                z   #    [         R                  " U R                  R                  XUS9I Sh  vN 5      $  N7f)a  Page.is_editable

Returns whether the element is [editable](https://playwright.dev/python/docs/actionability#editable).

Parameters
----------
selector : str
    A selector to search for an element. If there are multiple elements satisfying the selector, the first will be
    used.
strict : Union[bool, None]
    When true, the call requires selector to resolve to a single element. If given selector resolves to more than one
    element, the call throws an exception.
timeout : Union[float, None]
    Maximum time in milliseconds. Defaults to `30000` (30 seconds). Pass `0` to disable timeout. The default value can
    be changed by using the `browser_context.set_default_timeout()` or `page.set_default_timeout()` methods.

Returns
-------
bool
r  Nr  r  s       rJ   r  Page.is_editable=   r  ry   c                z   #    [         R                  " U R                  R                  XUS9I Sh  vN 5      $  N7f)a  Page.is_enabled

Returns whether the element is [enabled](https://playwright.dev/python/docs/actionability#enabled).

Parameters
----------
selector : str
    A selector to search for an element. If there are multiple elements satisfying the selector, the first will be
    used.
strict : Union[bool, None]
    When true, the call requires selector to resolve to a single element. If given selector resolves to more than one
    element, the call throws an exception.
timeout : Union[float, None]
    Maximum time in milliseconds. Defaults to `30000` (30 seconds). Pass `0` to disable timeout. The default value can
    be changed by using the `browser_context.set_default_timeout()` or `page.set_default_timeout()` methods.

Returns
-------
bool
r  Nr  r  s       rJ   r  Page.is_enabled_   r  ry   c                z   #    [         R                  " U R                  R                  XUS9I Sh  vN 5      $  N7f)u  Page.is_hidden

Returns whether the element is hidden, the opposite of [visible](https://playwright.dev/python/docs/actionability#visible).  `selector` that
does not match any elements is considered hidden.

Parameters
----------
selector : str
    A selector to search for an element. If there are multiple elements satisfying the selector, the first will be
    used.
strict : Union[bool, None]
    When true, the call requires selector to resolve to a single element. If given selector resolves to more than one
    element, the call throws an exception.
timeout : Union[float, None]
    Deprecated: This option is ignored. `page.is_hidden()` does not wait for the↵element to become hidden and returns immediately.

Returns
-------
bool
r  Nr  r  s       rJ   r  Page.is_hidden   r&  ry   c                z   #    [         R                  " U R                  R                  XUS9I Sh  vN 5      $  N7f)u  Page.is_visible

Returns whether the element is [visible](https://playwright.dev/python/docs/actionability#visible). `selector` that does not match any elements
is considered not visible.

Parameters
----------
selector : str
    A selector to search for an element. If there are multiple elements satisfying the selector, the first will be
    used.
strict : Union[bool, None]
    When true, the call requires selector to resolve to a single element. If given selector resolves to more than one
    element, the call throws an exception.
timeout : Union[float, None]
    Deprecated: This option is ignored. `page.is_visible()` does not wait↵for the element to become visible and returns immediately.

Returns
-------
bool
r  Nr  r  s       rJ   r  Page.is_visible   r  ry   )r   r  ry  r  c          
         #    [         R                  " U R                  R                  UU[         R                  " U5      UUS9I Sh  vN 5      $  N7f)a
  Page.dispatch_event

The snippet below dispatches the `click` event on the element. Regardless of the visibility state of the element,
`click` is dispatched. This is equivalent to calling
[element.click()](https://developer.mozilla.org/en-US/docs/Web/API/HTMLElement/click).

**Usage**

```py
await page.dispatch_event("button#submit", "click")
```

Under the hood, it creates an instance of an event based on the given `type`, initializes it with `eventInit`
properties and dispatches it on the element. Events are `composed`, `cancelable` and bubble by default.

Since `eventInit` is event-specific, please refer to the events documentation for the lists of initial properties:
- [DeviceMotionEvent](https://developer.mozilla.org/en-US/docs/Web/API/DeviceMotionEvent/DeviceMotionEvent)
- [DeviceOrientationEvent](https://developer.mozilla.org/en-US/docs/Web/API/DeviceOrientationEvent/DeviceOrientationEvent)
- [DragEvent](https://developer.mozilla.org/en-US/docs/Web/API/DragEvent/DragEvent)
- [Event](https://developer.mozilla.org/en-US/docs/Web/API/Event/Event)
- [FocusEvent](https://developer.mozilla.org/en-US/docs/Web/API/FocusEvent/FocusEvent)
- [KeyboardEvent](https://developer.mozilla.org/en-US/docs/Web/API/KeyboardEvent/KeyboardEvent)
- [MouseEvent](https://developer.mozilla.org/en-US/docs/Web/API/MouseEvent/MouseEvent)
- [PointerEvent](https://developer.mozilla.org/en-US/docs/Web/API/PointerEvent/PointerEvent)
- [TouchEvent](https://developer.mozilla.org/en-US/docs/Web/API/TouchEvent/TouchEvent)
- [WheelEvent](https://developer.mozilla.org/en-US/docs/Web/API/WheelEvent/WheelEvent)

You can also specify `JSHandle` as the property value if you want live objects to be passed into the event:

```py
# note you can only create data_transfer in chromium and firefox
data_transfer = await page.evaluate_handle("new DataTransfer()")
await page.dispatch_event("#source", "dragstart", { "dataTransfer": data_transfer })
```

Parameters
----------
selector : str
    A selector to search for an element. If there are multiple elements satisfying the selector, the first will be
    used.
type : str
    DOM event type: `"click"`, `"dragstart"`, etc.
event_init : Union[Dict, None]
    Optional event-specific initialization properties.
timeout : Union[float, None]
    Maximum time in milliseconds. Defaults to `30000` (30 seconds). Pass `0` to disable timeout. The default value can
    be changed by using the `browser_context.set_default_timeout()` or `page.set_default_timeout()` methods.
strict : Union[bool, None]
    When true, the call requires selector to resolve to a single element. If given selector resolves to more than one
    element, the call throws an exception.
)r  ry  r  r   r  Nr  )rI   r  ry  r  r   r  s         rJ   r  Page.dispatch_event   sT     z &&..//!!//*5 0  
 	
r+  r  r  c                    #    [         R                  " U R                  R                  U[         R                  " U5      S9I Sh  vN 5      $  N7f)a_  Page.evaluate

Returns the value of the `expression` invocation.

If the function passed to the `page.evaluate()` returns a [Promise], then `page.evaluate()` would
wait for the promise to resolve and return its value.

If the function passed to the `page.evaluate()` returns a non-[Serializable] value, then
`page.evaluate()` resolves to `undefined`. Playwright also supports transferring some additional values
that are not serializable by `JSON`: `-0`, `NaN`, `Infinity`, `-Infinity`.

**Usage**

Passing argument to `expression`:

```py
result = await page.evaluate("([x, y]) => Promise.resolve(x * y)", [7, 8])
print(result) # prints "56"
```

A string can also be passed in instead of a function:

```py
print(await page.evaluate("1 + 2")) # prints "3"
x = 10
print(await page.evaluate(f"1 + {x}")) # prints "11"
```

`ElementHandle` instances can be passed as an argument to the `page.evaluate()`:

```py
body_handle = await page.evaluate("document.body")
html = await page.evaluate("([body, suffix]) => body.innerHTML + suffix", [body_handle, "hello"])
await body_handle.dispose()
```

Parameters
----------
expression : str
    JavaScript expression to be evaluated in the browser context. If the expression evaluates to a function, the
    function is automatically invoked.
arg : Union[Any, None]
    Optional argument to pass to `expression`.

Returns
-------
Any
r  Nr  r  s      rJ   r  Page.evaluate!  sJ     h &&..))%7??3+? *  
 	
r  r1   c                    #    [         R                  " U R                  R                  U[         R                  " U5      S9I Sh  vN 5      $  N7f)a  Page.evaluate_handle

Returns the value of the `expression` invocation as a `JSHandle`.

The only difference between `page.evaluate()` and `page.evaluate_handle()` is that
`page.evaluate_handle()` returns `JSHandle`.

If the function passed to the `page.evaluate_handle()` returns a [Promise], then
`page.evaluate_handle()` would wait for the promise to resolve and return its value.

**Usage**

```py
a_window_handle = await page.evaluate_handle("Promise.resolve(window)")
a_window_handle # handle for the window object.
```

A string can also be passed in instead of a function:

```py
a_handle = await page.evaluate_handle("document") # handle for the "document"
```

`JSHandle` instances can be passed as an argument to the `page.evaluate_handle()`:

```py
a_handle = await page.evaluate_handle("document.body")
result_handle = await page.evaluate_handle("body => body.innerHTML", a_handle)
print(await result_handle.json_value())
await result_handle.dispose()
```

Parameters
----------
expression : str
    JavaScript expression to be evaluated in the browser context. If the expression evaluates to a function, the
    function is automatically invoked.
arg : Union[Any, None]
    Optional argument to pass to `expression`.

Returns
-------
JSHandle
r  Nr  r  s      rJ   r  Page.evaluate_handleF!  r  r  c          	         #    [         R                  " U R                  R                  UU[         R                  " U5      US9I Sh  vN 5      $  N7f)a  Page.eval_on_selector

The method finds an element matching the specified selector within the page and passes it as a first argument to
`expression`. If no elements match the selector, the method throws an error. Returns the value of `expression`.

If `expression` returns a [Promise], then `page.eval_on_selector()` would wait for the promise to resolve and
return its value.

**Usage**

```py
search_value = await page.eval_on_selector("#search", "el => el.value")
preload_href = await page.eval_on_selector("link[rel=preload]", "el => el.href")
html = await page.eval_on_selector(".main-container", "(e, suffix) => e.outer_html + suffix", "hello")
```

Parameters
----------
selector : str
    A selector to query for.
expression : str
    JavaScript expression to be evaluated in the browser context. If the expression evaluates to a function, the
    function is automatically invoked.
arg : Union[Any, None]
    Optional argument to pass to `expression`.
strict : Union[bool, None]
    When true, the call requires selector to resolve to a single element. If given selector resolves to more than one
    element, the call throws an exception.

Returns
-------
Any
r-  Nr  r.  s        rJ   r  Page.eval_on_selector|!  sQ     T &&..11!%OOC(	 2  
 	
r0  c           	         #    [         R                  " U R                  R                  X[         R                  " U5      S9I Sh  vN 5      $  N7f)a$  Page.eval_on_selector_all

The method finds all elements matching the specified selector within the page and passes an array of matched
elements as a first argument to `expression`. Returns the result of `expression` invocation.

If `expression` returns a [Promise], then `page.eval_on_selector_all()` would wait for the promise to resolve
and return its value.

**Usage**

```py
div_counts = await page.eval_on_selector_all("div", "(divs, min) => divs.length >= min", 10)
```

Parameters
----------
selector : str
    A selector to query for.
expression : str
    JavaScript expression to be evaluated in the browser context. If the expression evaluates to a function, the
    function is automatically invoked.
arg : Union[Any, None]
    Optional argument to pass to `expression`.

Returns
-------
Any
r  Nr  r  s       rJ   r  Page.eval_on_selector_all!  sJ     @ &&..55!gooc>R 6  
 	
r  rD  r   r5  c          	      z   #    [         R                  " U R                  R                  XX4S9I Sh  vN 5      $  N7f)a	  Page.add_script_tag

Adds a `<script>` tag into the page with the desired url or content. Returns the added tag when the script's onload
fires or when the script content was injected into frame.

Parameters
----------
url : Union[str, None]
    URL of a script to be added.
path : Union[pathlib.Path, str, None]
    Path to the JavaScript file to be injected into frame. If `path` is a relative path, then it is resolved relative
    to the current working directory.
content : Union[str, None]
    Raw JavaScript content to be injected into frame.
type : Union[str, None]
    Script type. Use 'module' in order to load a JavaScript ES6 module. See
    [script](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/script) for more details.

Returns
-------
ElementHandle
rD  NrF  rH  s        rJ   rG  Page.add_script_tag!  s@     >   ..//G 0  
 	
ry   rJ  c                z   #    [         R                  " U R                  R                  XUS9I Sh  vN 5      $  N7f)aj  Page.add_style_tag

Adds a `<link rel="stylesheet">` tag into the page with the desired url or a `<style type="text/css">` tag with the
content. Returns the added tag when the stylesheet's onload fires or when the CSS content was injected into frame.

Parameters
----------
url : Union[str, None]
    URL of the `<link>` tag.
path : Union[pathlib.Path, str, None]
    Path to the CSS file to be injected into frame. If `path` is a relative path, then it is resolved relative to the
    current working directory.
content : Union[str, None]
    Raw CSS content to be injected into frame.

Returns
-------
ElementHandle
rJ  NrL  rN  s       rJ   rM  Page.add_style_tag!  s7     6   ....37.SS
 	
Sry   callbackc                    #    [         R                  " U R                  R                  XR	                  U5      S9I Sh  vN 5      $  N7f)a  Page.expose_function

The method adds a function called `name` on the `window` object of every frame in the page. When called, the
function executes `callback` and returns a [Promise] which resolves to the return value of `callback`.

If the `callback` returns a [Promise], it will be awaited.

See `browser_context.expose_function()` for context-wide exposed function.

**NOTE** Functions installed via `page.expose_function()` survive navigations.

**Usage**

An example of adding a `sha256` function to the page:

```py
import asyncio
import hashlib
from playwright.async_api import async_playwright, Playwright

def sha256(text):
    m = hashlib.sha256()
    m.update(bytes(text, "utf8"))
    return m.hexdigest()

async def run(playwright: Playwright):
    webkit = playwright.webkit
    browser = await webkit.launch(headless=False)
    page = await browser.new_page()
    await page.expose_function("sha256", sha256)
    await page.set_content("""
        <script>
          async function onClick() {
            document.querySelector('div').textContent = await window.sha256('PLAYWRIGHT');
          }
        </script>
        <button onclick="onClick()">Click me</button>
        <div></div>
    """)
    await page.click("button")

async def main():
    async with async_playwright() as playwright:
        await run(playwright)
asyncio.run(main())
```

Parameters
----------
name : str
    Name of the function on the window object
callback : Callable
    Callback function which will be called in Playwright's context.
r   r  Nr   rE   rF   expose_functionr:  rI   r   r  s      rJ   r  Page.expose_function"  sJ     p &&..00$6$6x$@ 1  
 	
   <A	A	A	handler  c                   #    [         R                  " U R                  R                  XR	                  U5      US9I Sh  vN 5      $  N7f)aP  Page.expose_binding

The method adds a function called `name` on the `window` object of every frame in this page. When called, the
function executes `callback` and returns a [Promise] which resolves to the return value of `callback`. If the
`callback` returns a [Promise], it will be awaited.

The first argument of the `callback` function contains information about the caller: `{ browserContext:
BrowserContext, page: Page, frame: Frame }`.

See `browser_context.expose_binding()` for the context-wide version.

**NOTE** Functions installed via `page.expose_binding()` survive navigations.

**Usage**

An example of exposing page URL to all frames in a page:

```py
import asyncio
from playwright.async_api import async_playwright, Playwright

async def run(playwright: Playwright):
    webkit = playwright.webkit
    browser = await webkit.launch(headless=False)
    context = await browser.new_context()
    page = await context.new_page()
    await page.expose_binding("pageURL", lambda source: source["page"].url)
    await page.set_content("""
    <script>
      async function onClick() {
        document.querySelector('div').textContent = await window.pageURL();
      }
    </script>
    <button onclick="onClick()">Click me</button>
    <div></div>
    """)
    await page.click("button")

async def main():
    async with async_playwright() as playwright:
        await run(playwright)
asyncio.run(main())
```

Parameters
----------
name : str
    Name of the function on the window object.
callback : Callable
    Callback function that will be called in the Playwright's context.
handle : Union[bool, None]
    Whether to pass the argument as a handle, instead of passing by value. When passing a handle, only one argument is
    supported. When passing by value, multiple arguments are supported.
    Deprecated: This option will be removed in the future.
r   r  r  Nr   rE   rF   expose_bindingr:  rI   r   r  r  s       rJ   r  Page.expose_bindingW"  sL     ~ &&..//$6$6x$@ 0  
 	
rC  rs   c                    #    [         R                  " U R                  R                  [         R                  " U5      S9I Sh  vN 5      $  N7f)aw  Page.set_extra_http_headers

The extra HTTP headers will be sent with every request the page initiates.

**NOTE** `page.set_extra_http_headers()` does not guarantee the order of headers in the outgoing requests.

Parameters
----------
headers : Dict[str, str]
    An object containing additional HTTP headers to be sent with every request. All header values must be strings.
rs   Nr   rE   rF   set_extra_http_headersr   rI   rs   s     rJ   r  Page.set_extra_http_headers"  sG      &&..770 8  
 	
   AAA	Ac                 z   #    [         R                  " U R                  R                  5       I Sh  vN 5      $  N7f)zcPage.content

Gets the full HTML contents of the page, including the doctype.

Returns
-------
str
Nr4  rH   s    rJ   r5  Page.content"  r7  ry   r8  r9  r  r  c                z   #    [         R                  " U R                  R                  XUS9I Sh  vN 5      $  N7f)a1  Page.set_content

This method internally calls [document.write()](https://developer.mozilla.org/en-US/docs/Web/API/Document/write),
inheriting all its specific characteristics and behaviors.

Parameters
----------
html : str
    HTML markup to assign to the page.
timeout : Union[float, None]
    Maximum operation time in milliseconds, defaults to 30 seconds, pass `0` to disable timeout. The default value can
    be changed by using the `browser_context.set_default_navigation_timeout()`,
    `browser_context.set_default_timeout()`, `page.set_default_navigation_timeout()` or
    `page.set_default_timeout()` methods.
wait_until : Union["commit", "domcontentloaded", "load", "networkidle", None]
    When to consider operation succeeded, defaults to `load`. Events can be either:
    - `'domcontentloaded'` - consider operation to be finished when the `DOMContentLoaded` event is fired.
    - `'load'` - consider operation to be finished when the `load` event is fired.
    - `'networkidle'` - **DISCOURAGED** consider operation to be finished when there are no network connections for
      at least `500` ms. Don't use this method for testing, rely on web assertions to assess readiness instead.
    - `'commit'` - consider operation to be finished when network response is received and the document started
      loading.
r;  Nr<  r>  s       rJ   r=  Page.set_content"  r@  ry   r  r  c          	      z   #    [         R                  " U R                  R                  XX4S9I Sh  vN 5      $  N7f)a9
  Page.goto

Returns the main resource response. In case of multiple redirects, the navigation will resolve with the first
non-redirect response.

The method will throw an error if:
- there's an SSL error (e.g. in case of self-signed certificates).
- target URL is invalid.
- the `timeout` is exceeded during navigation.
- the remote server does not respond or is unreachable.
- the main resource failed to load.

The method will not throw an error when any valid HTTP status code is returned by the remote server, including 404
"Not Found" and 500 "Internal Server Error".  The status code for such responses can be retrieved by calling
`response.status()`.

**NOTE** The method either throws an error or returns a main resource response. The only exceptions are navigation
to `about:blank` or navigation to the same URL with a different hash, which would succeed and return `null`.

**NOTE** Headless mode doesn't support navigation to a PDF document. See the
[upstream issue](https://bugs.chromium.org/p/chromium/issues/detail?id=761295).

Parameters
----------
url : str
    URL to navigate page to. The url should include scheme, e.g. `https://`. When a `baseURL` via the context options
    was provided and the passed URL is a path, it gets merged via the
    [`new URL()`](https://developer.mozilla.org/en-US/docs/Web/API/URL/URL) constructor.
timeout : Union[float, None]
    Maximum operation time in milliseconds, defaults to 30 seconds, pass `0` to disable timeout. The default value can
    be changed by using the `browser_context.set_default_navigation_timeout()`,
    `browser_context.set_default_timeout()`, `page.set_default_navigation_timeout()` or
    `page.set_default_timeout()` methods.
wait_until : Union["commit", "domcontentloaded", "load", "networkidle", None]
    When to consider operation succeeded, defaults to `load`. Events can be either:
    - `'domcontentloaded'` - consider operation to be finished when the `DOMContentLoaded` event is fired.
    - `'load'` - consider operation to be finished when the `load` event is fired.
    - `'networkidle'` - **DISCOURAGED** consider operation to be finished when there are no network connections for
      at least `500` ms. Don't use this method for testing, rely on web assertions to assess readiness instead.
    - `'commit'` - consider operation to be finished when network response is received and the document started
      loading.
referer : Union[str, None]
    Referer header value. If provided it will take preference over the referer header value set by
    `page.set_extra_http_headers()`.

Returns
-------
Union[Response, None]
r  Nr  r  s        rJ   r  	Page.goto"  sA     x ))..%%J &  
 	
ry   c                x   #    [         R                  " U R                  R                  XS9I Sh  vN 5      $  N7f)aa  Page.reload

This method reloads the current page, in the same way as if the user had triggered a browser refresh. Returns the
main resource response. In case of multiple redirects, the navigation will resolve with the response of the last
redirect.

Parameters
----------
timeout : Union[float, None]
    Maximum operation time in milliseconds, defaults to 30 seconds, pass `0` to disable timeout. The default value can
    be changed by using the `browser_context.set_default_navigation_timeout()`,
    `browser_context.set_default_timeout()`, `page.set_default_navigation_timeout()` or
    `page.set_default_timeout()` methods.
wait_until : Union["commit", "domcontentloaded", "load", "networkidle", None]
    When to consider operation succeeded, defaults to `load`. Events can be either:
    - `'domcontentloaded'` - consider operation to be finished when the `DOMContentLoaded` event is fired.
    - `'load'` - consider operation to be finished when the `load` event is fired.
    - `'networkidle'` - **DISCOURAGED** consider operation to be finished when there are no network connections for
      at least `500` ms. Don't use this method for testing, rely on web assertions to assess readiness instead.
    - `'commit'` - consider operation to be finished when network response is received and the document started
      loading.

Returns
-------
Union[Response, None]
r   r  N)r   rd   rF   reloadrI   r   r  s      rJ   r  Page.reload$#  s6     F ))..'''NN
 	
Nr   r4  r  c                x   #    [         R                  " U R                  R                  XS9I Sh  vN 5      $  N7f)ah  Page.wait_for_load_state

Returns when the required load state has been reached.

This resolves when the page reaches a required load state, `load` by default. The navigation must have been
committed when this method is called. If current document has already reached the required state, resolves
immediately.

**NOTE** Most of the time, this method is not needed because Playwright
[auto-waits before every action](https://playwright.dev/python/docs/actionability).

**Usage**

```py
await page.get_by_role("button").click() # click triggers navigation.
await page.wait_for_load_state() # the promise resolves after "load" event.
```

```py
async with page.expect_popup() as page_info:
    await page.get_by_role("button").click() # click triggers a popup.
popup = await page_info.value
# Wait for the "DOMContentLoaded" event.
await popup.wait_for_load_state("domcontentloaded")
print(await popup.title()) # popup is ready to use.
```

Parameters
----------
state : Union["domcontentloaded", "load", "networkidle", None]
    Optional load state to wait for, defaults to `load`. If the state has been already reached while loading current
    document, the method resolves immediately. Can be one of:
    - `'load'` - wait for the `load` event to be fired.
    - `'domcontentloaded'` - wait for the `DOMContentLoaded` event to be fired.
    - `'networkidle'` - **DISCOURAGED** wait until there are no network connections for at least `500` ms. Don't use
      this method for testing, rely on web assertions to assess readiness instead.
timeout : Union[float, None]
    Maximum operation time in milliseconds, defaults to 30 seconds, pass `0` to disable timeout. The default value can
    be changed by using the `browser_context.set_default_navigation_timeout()`,
    `browser_context.set_default_timeout()`, `page.set_default_navigation_timeout()` or
    `page.set_default_timeout()` methods.
r  Nr  r  s      rJ   r  Page.wait_for_load_stateK#  s6     f &&..4454RR
 	
Rr   r  c                   #    [         R                  " U R                  R                  U R	                  U5      X#S9I Sh  vN 5      $  N7f)af  Page.wait_for_url

Waits for the main frame to navigate to the given URL.

**Usage**

```py
await page.click("a.delayed-navigation") # clicking the link will indirectly cause a navigation
await page.wait_for_url("**/target.html")
```

Parameters
----------
url : Union[Callable[[str], bool], Pattern[str], str]
    A glob pattern, regex pattern or predicate receiving [URL] to match while waiting for the navigation. Note that if
    the parameter is a string without wildcard characters, the method will wait for navigation to URL that is exactly
    equal to the string.
wait_until : Union["commit", "domcontentloaded", "load", "networkidle", None]
    When to consider operation succeeded, defaults to `load`. Events can be either:
    - `'domcontentloaded'` - consider operation to be finished when the `DOMContentLoaded` event is fired.
    - `'load'` - consider operation to be finished when the `load` event is fired.
    - `'networkidle'` - **DISCOURAGED** consider operation to be finished when there are no network connections for
      at least `500` ms. Don't use this method for testing, rely on web assertions to assess readiness instead.
    - `'commit'` - consider operation to be finished when network response is received and the document started
      loading.
timeout : Union[float, None]
    Maximum operation time in milliseconds, defaults to 30 seconds, pass `0` to disable timeout. The default value can
    be changed by using the `browser_context.set_default_navigation_timeout()`,
    `browser_context.set_default_timeout()`, `page.set_default_navigation_timeout()` or
    `page.set_default_timeout()` methods.
r  Nr  r  s       rJ   r  Page.wait_for_url#  r   rC  r5  c                   #    [         R                  " U R                  R                  XR	                  U5      US9I Sh  vN 5      $  N7f)a  Page.wait_for_event

**NOTE** In most cases, you should use `page.expect_event()`.

Waits for given `event` to fire. If predicate is provided, it passes event's value into the `predicate` function
and waits for `predicate(event)` to return a truthy value. Will throw an error if the page is closed before the
`event` is fired.

Parameters
----------
event : str
    Event name, same one typically passed into `*.on(event)`.
predicate : Union[Callable, None]
    Receives the event data and resolves to truthy value when the waiting should resolve.
timeout : Union[float, None]
    Maximum time to wait for in milliseconds. Defaults to `30000` (30 seconds). Pass `0` to disable timeout. The
    default value can be changed by using the `browser_context.set_default_timeout()`.

Returns
-------
Any
r7  Nr?  r<  s       rJ   r@  Page.wait_for_event#  rB  rC  c                x   #    [         R                  " U R                  R                  XS9I Sh  vN 5      $  N7f)aJ  Page.go_back

Returns the main resource response. In case of multiple redirects, the navigation will resolve with the response of
the last redirect. If cannot go back, returns `null`.

Navigate to the previous page in history.

Parameters
----------
timeout : Union[float, None]
    Maximum operation time in milliseconds, defaults to 30 seconds, pass `0` to disable timeout. The default value can
    be changed by using the `browser_context.set_default_navigation_timeout()`,
    `browser_context.set_default_timeout()`, `page.set_default_navigation_timeout()` or
    `page.set_default_timeout()` methods.
wait_until : Union["commit", "domcontentloaded", "load", "networkidle", None]
    When to consider operation succeeded, defaults to `load`. Events can be either:
    - `'domcontentloaded'` - consider operation to be finished when the `DOMContentLoaded` event is fired.
    - `'load'` - consider operation to be finished when the `load` event is fired.
    - `'networkidle'` - **DISCOURAGED** consider operation to be finished when there are no network connections for
      at least `500` ms. Don't use this method for testing, rely on web assertions to assess readiness instead.
    - `'commit'` - consider operation to be finished when network response is received and the document started
      loading.

Returns
-------
Union[Response, None]
r  N)r   rd   rF   go_backr  s      rJ   r  Page.go_back#  s6     H ))..(((OO
 	
Or   c                x   #    [         R                  " U R                  R                  XS9I Sh  vN 5      $  N7f)aL  Page.go_forward

Returns the main resource response. In case of multiple redirects, the navigation will resolve with the response of
the last redirect. If cannot go forward, returns `null`.

Navigate to the next page in history.

Parameters
----------
timeout : Union[float, None]
    Maximum operation time in milliseconds, defaults to 30 seconds, pass `0` to disable timeout. The default value can
    be changed by using the `browser_context.set_default_navigation_timeout()`,
    `browser_context.set_default_timeout()`, `page.set_default_navigation_timeout()` or
    `page.set_default_timeout()` methods.
wait_until : Union["commit", "domcontentloaded", "load", "networkidle", None]
    When to consider operation succeeded, defaults to `load`. Events can be either:
    - `'domcontentloaded'` - consider operation to be finished when the `DOMContentLoaded` event is fired.
    - `'load'` - consider operation to be finished when the `load` event is fired.
    - `'networkidle'` - **DISCOURAGED** consider operation to be finished when there are no network connections for
      at least `500` ms. Don't use this method for testing, rely on web assertions to assess readiness instead.
    - `'commit'` - consider operation to be finished when network response is received and the document started
      loading.

Returns
-------
Union[Response, None]
r  N)r   rd   rF   
go_forwardr  s      rJ   r  Page.go_forward#  s6     H ))..++G+RR
 	
Rr   c                 z   #    [         R                  " U R                  R                  5       I Sh  vN 5      $  N7f)a  Page.request_gc

Request the page to perform garbage collection. Note that there is no guarantee that all unreachable objects will
be collected.

This is useful to help detect memory leaks. For example, if your page has a large object `'suspect'` that might be
leaked, you can check that it does not leak by using a
[`WeakRef`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/WeakRef).

```py
# 1. In your page, save a WeakRef for the "suspect".
await page.evaluate("globalThis.suspectWeakRef = new WeakRef(suspect)")
# 2. Request garbage collection.
await page.request_gc()
# 3. Check that weak ref does not deref to the original object.
assert await page.evaluate("!globalThis.suspectWeakRef.deref()")
```
N)r   rE   rF   
request_gcrH   s    rJ   r  Page.request_gc%$  s+     ( &&T^^-F-F-H'HII'Hry   )mediacolor_schemereduced_motionforced_colorscontrastr  )nullprintscreenr  darklightno-preferencer  r  r  r  reducer  activer  r  r  morer  r  c          
         #    [         R                  " U R                  R                  UUUUUS9I Sh  vN 5      $  N7f)u  Page.emulate_media

This method changes the `CSS media type` through the `media` argument, and/or the `'prefers-colors-scheme'` media
feature, using the `colorScheme` argument.

**Usage**

```py
await page.evaluate("matchMedia('screen').matches")
# → True
await page.evaluate("matchMedia('print').matches")
# → False

await page.emulate_media(media="print")
await page.evaluate("matchMedia('screen').matches")
# → False
await page.evaluate("matchMedia('print').matches")
# → True

await page.emulate_media()
await page.evaluate("matchMedia('screen').matches")
# → True
await page.evaluate("matchMedia('print').matches")
# → False
```

```py
await page.emulate_media(color_scheme="dark")
await page.evaluate("matchMedia('(prefers-color-scheme: dark)').matches")
# → True
await page.evaluate("matchMedia('(prefers-color-scheme: light)').matches")
# → False
```

Parameters
----------
media : Union["null", "print", "screen", None]
    Changes the CSS media type of the page. The only allowed values are `'Screen'`, `'Print'` and `'Null'`. Passing
    `'Null'` disables CSS media emulation.
color_scheme : Union["dark", "light", "no-preference", "null", None]
    Emulates [prefers-colors-scheme](https://developer.mozilla.org/en-US/docs/Web/CSS/@media/prefers-color-scheme)
    media feature, supported values are `'light'` and `'dark'`. Passing `'Null'` disables color scheme emulation.
    `'no-preference'` is deprecated.
reduced_motion : Union["no-preference", "null", "reduce", None]
    Emulates `'prefers-reduced-motion'` media feature, supported values are `'reduce'`, `'no-preference'`. Passing
    `null` disables reduced motion emulation.
forced_colors : Union["active", "none", "null", None]
contrast : Union["more", "no-preference", "null", None]
)r  colorSchemereducedMotionforcedColorsr  N)r   rE   rF   emulate_media)rI   r  r  r  r  r  s         rJ   r  Page.emulate_media;$  sK     ~ &&....(,*! /  
 	
rn  rZ  c                 x   #    [         R                  " U R                  R                  US9I Sh  vN 5      $  N7f)a  Page.set_viewport_size

In the case of multiple pages in a single browser, each page can have its own viewport size. However,
`browser.new_context()` allows to set viewport size (and more) for all pages in the context at once.

`page.set_viewport_size()` will resize the page. A lot of websites don't expect phones to change size, so you
should set the viewport size before navigating to the page. `page.set_viewport_size()` will also reset
`screen` size, use `browser.new_context()` with `screen` and `viewport` parameters if you need better
control of these properties.

**Usage**

```py
page = await browser.new_page()
await page.set_viewport_size({"width": 640, "height": 480})
await page.goto("https://example.com")
```

Parameters
----------
viewport_size : {width: int, height: int}
)viewportSizeN)r   rE   rF   set_viewport_size)rI   rZ  s     rJ   r  Page.set_viewport_size$  s5     0 &&..222NN
 	
Nr   c                 z   #    [         R                  " U R                  R                  5       I Sh  vN 5      $  N7f)z;Page.bring_to_front

Brings page to front (activates tab).
N)r   rE   rF   bring_to_frontrH   s    rJ   r  Page.bring_to_front$  s+      &&T^^-J-J-L'LMM'Lry   r  r  c                x   #    [         R                  " U R                  R                  XS9I Sh  vN 5      $  N7f)aQ  Page.add_init_script

Adds a script which would be evaluated in one of the following scenarios:
- Whenever the page is navigated.
- Whenever the child frame is attached or navigated. In this case, the script is evaluated in the context of the
  newly attached frame.

The script is evaluated after the document was created but before any of its scripts were run. This is useful to
amend the JavaScript environment, e.g. to seed `Math.random`.

**Usage**

An example of overriding `Math.random` before the page loads:

```py
# in your playwright script, assuming the preload.js file is in same directory
await page.add_init_script(path="./preload.js")
```

**NOTE** The order of evaluation of multiple scripts installed via `browser_context.add_init_script()` and
`page.add_init_script()` is not defined.

Parameters
----------
script : Union[str, None]
    Script to be evaluated in all pages in the browser context. Optional.
path : Union[pathlib.Path, str, None]
    Path to the JavaScript file. If `path` is a relative path, then it is resolved relative to the current working
    directory. Optional.
r  r   Nr   rE   rF   add_init_scriptrI   r  r   s      rJ   r  Page.add_init_script$  6     J &&..000JJ
 	
Jr   timesr^  r6   r  c                   #    [         R                  " U R                  R                  U R	                  U5      U R	                  U5      US9I Sh  vN 5      $  N7f)ax	  Page.route

Routing provides the capability to modify network requests that are made by a page.

Once routing is enabled, every request matching the url pattern will stall unless it's continued, fulfilled or
aborted.

**NOTE** The handler will only be called for the first url if the response is a redirect.

**NOTE** `page.route()` will not intercept requests intercepted by Service Worker. See
[this](https://github.com/microsoft/playwright/issues/1090) issue. We recommend disabling Service Workers when
using request interception by setting `serviceWorkers` to `'block'`.

**NOTE** `page.route()` will not intercept the first request of a popup page. Use
`browser_context.route()` instead.

**Usage**

An example of a naive handler that aborts all image requests:

```py
page = await browser.new_page()
await page.route("**/*.{png,jpg,jpeg}", lambda route: route.abort())
await page.goto("https://example.com")
await browser.close()
```

or the same snippet using a regex pattern instead:

```py
page = await browser.new_page()
await page.route(re.compile(r"(\.png$)|(\.jpg$)"), lambda route: route.abort())
await page.goto("https://example.com")
await browser.close()
```

It is possible to examine the request to decide the route action. For example, mocking all requests that contain
some post data, and leaving all other requests as is:

```py
async def handle_route(route: Route):
  if ("my-string" in route.request.post_data):
    await route.fulfill(body="mocked-data")
  else:
    await route.continue_()
await page.route("/api/**", handle_route)
```

Page routes take precedence over browser context routes (set up with `browser_context.route()`) when request
matches both handlers.

To remove a route with its handler you can use `page.unroute()`.

**NOTE** Enabling routing disables http cache.

Parameters
----------
url : Union[Callable[[str], bool], Pattern[str], str]
    A glob pattern, regex pattern, or predicate that receives a [URL] to match during routing. If `baseURL` is set in
    the context options and the provided URL is a string that does not start with `*`, it is resolved using the
    [`new URL()`](https://developer.mozilla.org/en-US/docs/Web/API/URL/URL) constructor.
handler : Union[Callable[[Route, Request], Any], Callable[[Route], Any]]
    handler function to route the request.
times : Union[int, None]
    How often a route should be used. By default it will be used every time.
rG   r^  r  Nr   rE   rF   router:  rI   rG   r^  r  s       rJ   r  
Page.route$  s[     Z &&..&&&&s+**73 '  
 	
   AAA	Ac                    #    [         R                  " U R                  R                  U R	                  U5      U R	                  U5      S9I Sh  vN 5      $  N7f)a  Page.unroute

Removes a route created with `page.route()`. When `handler` is not specified, removes all routes for the
`url`.

Parameters
----------
url : Union[Callable[[str], bool], Pattern[str], str]
    A glob pattern, regex pattern or predicate receiving [URL] to match while routing.
handler : Union[Callable[[Route, Request], Any], Callable[[Route], Any], None]
    Optional handler function to route the request.
rG   r^  Nr   rE   rF   unrouter:  rI   rG   r^  s      rJ   r  Page.unroute&%  sV     . &&..((&&s+T5G5G5P )  
 	
   AAA	Ar8   c                    #    [         R                  " U R                  R                  U R	                  U5      U R	                  U5      S9I Sh  vN 5      $  N7f)a  Page.route_web_socket

This method allows to modify websocket connections that are made by the page.

Note that only `WebSocket`s created after this method was called will be routed. It is recommended to call this
method before navigating the page.

**Usage**

Below is an example of a simple mock that responds to a single message. See `WebSocketRoute` for more details and
examples.

```py
def message_handler(ws: WebSocketRoute, message: Union[str, bytes]):
  if message == "request":
    ws.send("response")

def handler(ws: WebSocketRoute):
  ws.on_message(lambda message: message_handler(ws, message))

await page.route_web_socket("/ws", handler)
```

Parameters
----------
url : Union[Callable[[str], bool], Pattern[str], str]
    Only WebSockets with the url matching this pattern will be routed. A string pattern can be relative to the
    `baseURL` context option.
handler : Callable[[WebSocketRoute], Any]
    Handler function to route the WebSocket.
r  Nr   rE   rF   route_web_socketr:  r  s      rJ   r  Page.route_web_socketC%  sW     J &&..11&&s+T5G5G5P 2  
 	
r  behaviorr  defaultignoreErrorswaitc                x   #    [         R                  " U R                  R                  US9I Sh  vN 5      $  N7f)a  Page.unroute_all

Removes all routes created with `page.route()` and `page.route_from_har()`.

Parameters
----------
behavior : Union["default", "ignoreErrors", "wait", None]
    Specifies whether to wait for already running handlers and what to do if they throw errors:
    - `'default'` - do not wait for current handler calls (if any) to finish, if unrouted handler throws, it may
      result in unhandled error
    - `'wait'` - wait for current handler calls (if any) to finish
    - `'ignoreErrors'` - do not wait for current handler calls (if any) to finish, all errors thrown by the handlers
      after unrouting are silently caught
r  Nr   rE   rF   unroute_allrI   r  s     rJ   r  Page.unroute_alln%  5     ( &&..,,h,??
 	
?r   rG   	not_foundupdateupdate_contentupdate_modeharr	  r   r  r
  r  attachembedr  fullminimalc                   #    [         R                  " U R                  R                  UUUUUUS9I Sh  vN 5      $  N7f)a  Page.route_from_har

If specified the network requests that are made in the page will be served from the HAR file. Read more about
[Replaying from HAR](https://playwright.dev/python/docs/mock#replaying-from-har).

Playwright will not serve requests intercepted by Service Worker from the HAR file. See
[this](https://github.com/microsoft/playwright/issues/1090) issue. We recommend disabling Service Workers when
using request interception by setting `serviceWorkers` to `'block'`.

Parameters
----------
har : Union[pathlib.Path, str]
    Path to a [HAR](http://www.softwareishard.com/blog/har-12-spec) file with prerecorded network data. If `path` is a
    relative path, then it is resolved relative to the current working directory.
url : Union[Pattern[str], str, None]
    A glob pattern, regular expression or predicate to match the request URL. Only requests with URL matching the
    pattern will be served from the HAR file. If not specified, all requests are served from the HAR file.
not_found : Union["abort", "fallback", None]
    - If set to 'abort' any request not found in the HAR file will be aborted.
    - If set to 'fallback' missing requests will be sent to the network.

    Defaults to abort.
update : Union[bool, None]
    If specified, updates the given HAR with the actual network information instead of serving from file. The file is
    written to disk when `browser_context.close()` is called.
update_content : Union["attach", "embed", None]
    Optional setting to control resource content management. If `attach` is specified, resources are persisted as
    separate files or entries in the ZIP archive. If `embed` is specified, content is stored inline the HAR file.
update_mode : Union["full", "minimal", None]
    When set to `minimal`, only record information necessary for routing from HAR. This omits sizes, timing, page,
    cookies, security and other types of HAR information that are not used when replaying from HAR. Defaults to
    `minimal`.
r  rG   notFoundr
  updateContent
updateModeNr   rE   rF   route_from_harrI   r  rG   r	  r
  r  r  s          rJ   r  Page.route_from_har%  N     X &&..//",& 0  	
 		
rg  )r   ry  r   rx  ry  	full_pagecliprz  r{  r|  r}  r~  r  r  rx  ry  r  r   rz  r  r{  r  r|  r  r}  r3   r~  r  c                   #    [         R                  " U R                  R                  UUUUUUUUU	U
[         R                  " U5      UUS9I Sh  vN 5      $  N7f)a  Page.screenshot

Returns the buffer with the captured screenshot.

Parameters
----------
timeout : Union[float, None]
    Maximum time in milliseconds. Defaults to `30000` (30 seconds). Pass `0` to disable timeout. The default value can
    be changed by using the `browser_context.set_default_timeout()` or `page.set_default_timeout()` methods.
type : Union["jpeg", "png", None]
    Specify screenshot type, defaults to `png`.
path : Union[pathlib.Path, str, None]
    The file path to save the image to. The screenshot type will be inferred from file extension. If `path` is a
    relative path, then it is resolved relative to the current working directory. If no path is provided, the image
    won't be saved to the disk.
quality : Union[int, None]
    The quality of the image, between 0-100. Not applicable to `png` images.
omit_background : Union[bool, None]
    Hides default white background and allows capturing screenshots with transparency. Not applicable to `jpeg` images.
    Defaults to `false`.
full_page : Union[bool, None]
    When true, takes a screenshot of the full scrollable page, instead of the currently visible viewport. Defaults to
    `false`.
clip : Union[{x: float, y: float, width: float, height: float}, None]
    An object which specifies clipping of the resulting image.
animations : Union["allow", "disabled", None]
    When set to `"disabled"`, stops CSS animations, CSS transitions and Web Animations. Animations get different
    treatment depending on their duration:
    - finite animations are fast-forwarded to completion, so they'll fire `transitionend` event.
    - infinite animations are canceled to initial state, and then played over after the screenshot.

    Defaults to `"allow"` that leaves animations untouched.
caret : Union["hide", "initial", None]
    When set to `"hide"`, screenshot will hide text caret. When set to `"initial"`, text caret behavior will not be
    changed.  Defaults to `"hide"`.
scale : Union["css", "device", None]
    When set to `"css"`, screenshot will have a single pixel per each css pixel on the page. For high-dpi devices, this
    will keep screenshots small. Using `"device"` option will produce a single pixel per each device pixel, so
    screenshots of high-dpi devices will be twice as large or even larger.

    Defaults to `"device"`.
mask : Union[Sequence[Locator], None]
    Specify locators that should be masked when the screenshot is taken. Masked elements will be overlaid with a pink
    box `#FF00FF` (customized by `maskColor`) that completely covers its bounding box. The mask is also applied to
    invisible elements, see [Matching only visible elements](../locators.md#matching-only-visible-elements) to disable
    that.
mask_color : Union[str, None]
    Specify the color of the overlay box for masked elements, in
    [CSS color format](https://developer.mozilla.org/en-US/docs/Web/CSS/color_value). Default color is pink `#FF00FF`.
style : Union[str, None]
    Text of the stylesheet to apply while making the screenshot. This is where you can hide dynamic elements, make
    elements invisible or change their properties to help you creating repeatable screenshots. This stylesheet pierces
    the Shadow DOM and applies to the inner frames.

Returns
-------
bytes
)r   ry  r   rx  r  fullPager   rz  r{  r|  r}  r  r  Nr  )rI   r   ry  r   rx  ry  r  r   rz  r{  r|  r}  r~  r  s                 rJ   r  Page.screenshot%  sl     X &&..++."%__T*$ ,  
 	
r  c                 z   #    [         R                  " U R                  R                  5       I Sh  vN 5      $  N7f)z;Page.title

Returns the page's title.

Returns
-------
str
NrA  rH   s    rJ   rB  
Page.title&  rD  ry   )run_before_unloadrS  r&  rS  c                x   #    [         R                  " U R                  R                  XS9I Sh  vN 5      $  N7f)a  Page.close

If `runBeforeUnload` is `false`, does not run any unload handlers and waits for the page to be closed. If
`runBeforeUnload` is `true` the method will run unload handlers, but will **not** wait for the page to close.

By default, `page.close()` **does not** run `beforeunload` handlers.

**NOTE** if `runBeforeUnload` is passed as true, a `beforeunload` dialog might be summoned and should be handled
manually via `page.on('dialog')` event.

Parameters
----------
run_before_unload : Union[bool, None]
    Defaults to `false`. Whether to run the
    [before unload](https://developer.mozilla.org/en-US/docs/Web/Events/beforeunload) page handlers.
reason : Union[str, None]
    The reason to be reported to the operations interrupted by the page closure.
)runBeforeUnloadrS  NrU  )rI   r&  rS  s      rJ   r  
Page.close'&  s6     2 &&..&&7H&XX
 	
Xr   c                 ^    [         R                  " U R                  R                  5       5      $ )zOPage.is_closed

Indicates that the page has been closed.

Returns
-------
bool
rE  rH   s    rJ   rF  Page.is_closedD&  rH  rM   )
r  r  rv  r  r  r   r
  r	  r  r  r  r  r  rv  r  r  r  r
  r	  r  c       
            #    [         R                  " U R                  R                  U[         R                  " U5      UUUUUUU	U
US9I Sh  vN 5      $  N7f)a:  Page.click

This method clicks an element matching `selector` by performing the following steps:
1. Find an element matching `selector`. If there is none, wait until a matching element is attached to the DOM.
1. Wait for [actionability](https://playwright.dev/python/docs/actionability) checks on the matched element, unless `force` option is set. If
   the element is detached during the checks, the whole action is retried.
1. Scroll the element into view if needed.
1. Use `page.mouse` to click in the center of the element, or the specified `position`.
1. Wait for initiated navigations to either succeed or fail, unless `noWaitAfter` option is set.

When all steps combined have not finished during the specified `timeout`, this method throws a `TimeoutError`.
Passing zero timeout disables this.

Parameters
----------
selector : str
    A selector to search for an element. If there are multiple elements satisfying the selector, the first will be
    used.
modifiers : Union[Sequence[Union["Alt", "Control", "ControlOrMeta", "Meta", "Shift"]], None]
    Modifier keys to press. Ensures that only these modifiers are pressed during the operation, and then restores
    current modifiers back. If not specified, currently pressed modifiers are used. "ControlOrMeta" resolves to
    "Control" on Windows and Linux and to "Meta" on macOS.
position : Union[{x: float, y: float}, None]
    A point to use relative to the top-left corner of element padding box. If not specified, uses some visible point of
    the element.
delay : Union[float, None]
    Time to wait between `mousedown` and `mouseup` in milliseconds. Defaults to 0.
button : Union["left", "middle", "right", None]
    Defaults to `left`.
click_count : Union[int, None]
    defaults to 1. See [UIEvent.detail].
timeout : Union[float, None]
    Maximum time in milliseconds. Defaults to `30000` (30 seconds). Pass `0` to disable timeout. The default value can
    be changed by using the `browser_context.set_default_timeout()` or `page.set_default_timeout()` methods.
force : Union[bool, None]
    Whether to bypass the [actionability](../actionability.md) checks. Defaults to `false`.
no_wait_after : Union[bool, None]
    Actions that initiate navigations are waiting for these navigations to happen and for pages to start loading. You
    can opt out of waiting via setting this flag. You would only need this option in the exceptional cases such as
    navigating to inaccessible pages. Defaults to `false`.
    Deprecated: This option will default to `true` in the future.
trial : Union[bool, None]
    When set, this method only performs the [actionability](../actionability.md) checks and skips the action. Defaults
    to `false`. Useful to wait until the element is ready for the action without performing it. Note that keyboard
    `modifiers` will be pressed regardless of `trial` to allow testing elements which are only visible when those keys
    are pressed.
strict : Union[bool, None]
    When true, the call requires selector to resolve to a single element. If given selector resolves to more than one
    element, the call throws an exception.
)r  r  r  rv  r  r  r   r
  r  r  r  Nr  )rI   r  r  r  rv  r  r  r   r
  r	  r  r  s               rJ   r  
Page.clickP&  sf     H &&..&&!!//)4!&) '  
 	
r  rR  c       	            #    [         R                  " U R                  R                  U[         R                  " U5      UUUUUUU	U
S9
I Sh  vN 5      $  N7f)a
  Page.dblclick

This method double clicks an element matching `selector` by performing the following steps:
1. Find an element matching `selector`. If there is none, wait until a matching element is attached to the DOM.
1. Wait for [actionability](https://playwright.dev/python/docs/actionability) checks on the matched element, unless `force` option is set. If
   the element is detached during the checks, the whole action is retried.
1. Scroll the element into view if needed.
1. Use `page.mouse` to double click in the center of the element, or the specified `position`.

When all steps combined have not finished during the specified `timeout`, this method throws a `TimeoutError`.
Passing zero timeout disables this.

**NOTE** `page.dblclick()` dispatches two `click` events and a single `dblclick` event.

Parameters
----------
selector : str
    A selector to search for an element. If there are multiple elements satisfying the selector, the first will be
    used.
modifiers : Union[Sequence[Union["Alt", "Control", "ControlOrMeta", "Meta", "Shift"]], None]
    Modifier keys to press. Ensures that only these modifiers are pressed during the operation, and then restores
    current modifiers back. If not specified, currently pressed modifiers are used. "ControlOrMeta" resolves to
    "Control" on Windows and Linux and to "Meta" on macOS.
position : Union[{x: float, y: float}, None]
    A point to use relative to the top-left corner of element padding box. If not specified, uses some visible point of
    the element.
delay : Union[float, None]
    Time to wait between `mousedown` and `mouseup` in milliseconds. Defaults to 0.
button : Union["left", "middle", "right", None]
    Defaults to `left`.
timeout : Union[float, None]
    Maximum time in milliseconds. Defaults to `30000` (30 seconds). Pass `0` to disable timeout. The default value can
    be changed by using the `browser_context.set_default_timeout()` or `page.set_default_timeout()` methods.
force : Union[bool, None]
    Whether to bypass the [actionability](../actionability.md) checks. Defaults to `false`.
no_wait_after : Union[bool, None]
    This option has no effect.
    Deprecated: This option has no effect.
strict : Union[bool, None]
    When true, the call requires selector to resolve to a single element. If given selector resolves to more than one
    element, the call throws an exception.
trial : Union[bool, None]
    When set, this method only performs the [actionability](../actionability.md) checks and skips the action. Defaults
    to `false`. Useful to wait until the element is ready for the action without performing it. Note that keyboard
    `modifiers` will be pressed regardless of `trial` to allow testing elements which are only visible when those keys
    are pressed.
rT  Nr$  rU  s              rJ   r  Page.dblclick&  sc     @ &&..))!!//)4!) *  
 	
rW  rX  c                   #    [         R                  " U R                  R                  U[         R                  " U5      UUUUUUS9I Sh  vN 5      $  N7f)a
  Page.tap

This method taps an element matching `selector` by performing the following steps:
1. Find an element matching `selector`. If there is none, wait until a matching element is attached to the DOM.
1. Wait for [actionability](https://playwright.dev/python/docs/actionability) checks on the matched element, unless `force` option is set. If
   the element is detached during the checks, the whole action is retried.
1. Scroll the element into view if needed.
1. Use `page.touchscreen` to tap the center of the element, or the specified `position`.

When all steps combined have not finished during the specified `timeout`, this method throws a `TimeoutError`.
Passing zero timeout disables this.

**NOTE** `page.tap()` the method will throw if `hasTouch` option of the browser context is false.

Parameters
----------
selector : str
    A selector to search for an element. If there are multiple elements satisfying the selector, the first will be
    used.
modifiers : Union[Sequence[Union["Alt", "Control", "ControlOrMeta", "Meta", "Shift"]], None]
    Modifier keys to press. Ensures that only these modifiers are pressed during the operation, and then restores
    current modifiers back. If not specified, currently pressed modifiers are used. "ControlOrMeta" resolves to
    "Control" on Windows and Linux and to "Meta" on macOS.
position : Union[{x: float, y: float}, None]
    A point to use relative to the top-left corner of element padding box. If not specified, uses some visible point of
    the element.
timeout : Union[float, None]
    Maximum time in milliseconds. Defaults to `30000` (30 seconds). Pass `0` to disable timeout. The default value can
    be changed by using the `browser_context.set_default_timeout()` or `page.set_default_timeout()` methods.
force : Union[bool, None]
    Whether to bypass the [actionability](../actionability.md) checks. Defaults to `false`.
no_wait_after : Union[bool, None]
    This option has no effect.
    Deprecated: This option has no effect.
strict : Union[bool, None]
    When true, the call requires selector to resolve to a single element. If given selector resolves to more than one
    element, the call throws an exception.
trial : Union[bool, None]
    When set, this method only performs the [actionability](../actionability.md) checks and skips the action. Defaults
    to `false`. Useful to wait until the element is ready for the action without performing it. Note that keyboard
    `modifiers` will be pressed regardless of `trial` to allow testing elements which are only visible when those keys
    are pressed.
rZ  Nr4  r[  s	            rJ   r  Page.tap&  r]  r'  r^  r+  c                   #    [         R                  " U R                  R                  UUUUUUS9I Sh  vN 5      $  N7f)aK  Page.fill

This method waits for an element matching `selector`, waits for [actionability](https://playwright.dev/python/docs/actionability) checks,
focuses the element, fills it and triggers an `input` event after filling. Note that you can pass an empty string
to clear the input field.

If the target element is not an `<input>`, `<textarea>` or `[contenteditable]` element, this method throws an
error. However, if the element is inside the `<label>` element that has an associated
[control](https://developer.mozilla.org/en-US/docs/Web/API/HTMLLabelElement/control), the control will be filled
instead.

To send fine-grained keyboard events, use `locator.press_sequentially()`.

Parameters
----------
selector : str
    A selector to search for an element. If there are multiple elements satisfying the selector, the first will be
    used.
value : str
    Value to fill for the `<input>`, `<textarea>` or `[contenteditable]` element.
timeout : Union[float, None]
    Maximum time in milliseconds. Defaults to `30000` (30 seconds). Pass `0` to disable timeout. The default value can
    be changed by using the `browser_context.set_default_timeout()` or `page.set_default_timeout()` methods.
no_wait_after : Union[bool, None]
    This option has no effect.
    Deprecated: This option has no effect.
strict : Union[bool, None]
    When true, the call requires selector to resolve to a single element. If given selector resolves to more than one
    element, the call throws an exception.
force : Union[bool, None]
    Whether to bypass the [actionability](../actionability.md) checks. Defaults to `false`.
r`  Nr:  ra  s          rJ   r;  	Page.fill:'  rc  rg  rd  re  rf  rg  rh  c          
          [         R                  " U R                  R                  UUUU(       a  UR                  OSU(       a  UR                  S95      $ SS95      $ )a  Page.locator

The method returns an element locator that can be used to perform actions on this page / frame. Locator is resolved
to the element immediately before performing an action, so a series of actions on the same locator can in fact be
performed on different DOM elements. That would happen if the DOM structure between those actions has changed.

[Learn more about locators](https://playwright.dev/python/docs/locators).

Parameters
----------
selector : str
    A selector to use when resolving DOM element.
has_text : Union[Pattern[str], str, None]
    Matches elements containing specified text somewhere inside, possibly in a child or a descendant element. When
    passed a [string], matching is case-insensitive and searches for a substring. For example, `"Playwright"` matches
    `<article><div>Playwright</div></article>`.
has_not_text : Union[Pattern[str], str, None]
    Matches elements that do not contain specified text somewhere inside, possibly in a child or a descendant element.
    When passed a [string], matching is case-insensitive and searches for a substring.
has : Union[Locator, None]
    Narrows down the results of the method to those which contain elements matching this relative locator. For example,
    `article` that has `text=Playwright` matches `<article><div>Playwright</div></article>`.

    Inner locator **must be relative** to the outer locator and is queried starting with the outer locator match, not
    the document root. For example, you can find `content` that has `div` in
    `<article><content><div>Playwright</div></content></article>`. However, looking for `content` that has `article
    div` will fail, because the inner locator must be relative and should not use any elements outside the `content`.

    Note that outer and inner locators must belong to the same frame. Inner locator must not contain `FrameLocator`s.
has_not : Union[Locator, None]
    Matches elements that do not contain an element that matches an inner locator. Inner locator is queried against the
    outer one. For example, `article` that does not have `div` matches `<article><span>Playwright</span></article>`.

    Note that outer and inner locators must belong to the same frame. Inner locator must not contain `FrameLocator`s.

Returns
-------
Locator
Nrj  rn  rp  s         rJ   ro  Page.locatorp'  sg    b   NN""! '%(CMMd,3w(( # 
 	
 :> # 
 	
rM   rr  r   rs  c                \    [         R                  " U R                  R                  XS95      $ )aJ  Page.get_by_alt_text

Allows locating elements by their alt text.

**Usage**

For example, this method will find the image by alt text "Playwright logo":

```html
<img alt='Playwright logo'>
```

```py
await page.get_by_alt_text("Playwright logo").click()
```

Parameters
----------
text : Union[Pattern[str], str]
    Text to locate the element for.
exact : Union[bool, None]
    Whether to find an exact match: case-sensitive and whole-string. Default to false. Ignored when locating by a
    regular expression. Note that exact match still trims whitespace.

Returns
-------
Locator
ru  rv  rx  s      rJ   rw  Page.get_by_alt_text'  rz  rM   c                \    [         R                  " U R                  R                  XS95      $ )a3  Page.get_by_label

Allows locating input elements by the text of the associated `<label>` or `aria-labelledby` element, or by the
`aria-label` attribute.

**Usage**

For example, this method will find inputs by label "Username" and "Password" in the following DOM:

```html
<input aria-label="Username">
<label for="password-input">Password:</label>
<input id="password-input">
```

```py
await page.get_by_label("Username").fill("john")
await page.get_by_label("Password").fill("secret")
```

Parameters
----------
text : Union[Pattern[str], str]
    Text to locate the element for.
exact : Union[bool, None]
    Whether to find an exact match: case-sensitive and whole-string. Default to false. Ignored when locating by a
    regular expression. Note that exact match still trims whitespace.

Returns
-------
Locator
ru  r|  rx  s      rJ   r}  Page.get_by_label'  r  rM   c                \    [         R                  " U R                  R                  XS95      $ )a  Page.get_by_placeholder

Allows locating input elements by the placeholder text.

**Usage**

For example, consider the following DOM structure.

```html
<input type="email" placeholder="name@example.com" />
```

You can fill the input after locating it by the placeholder text:

```py
await page.get_by_placeholder("name@example.com").fill("playwright@microsoft.com")
```

Parameters
----------
text : Union[Pattern[str], str]
    Text to locate the element for.
exact : Union[bool, None]
    Whether to find an exact match: case-sensitive and whole-string. Default to false. Ignored when locating by a
    regular expression. Note that exact match still trims whitespace.

Returns
-------
Locator
ru  r  rx  s      rJ   r  Page.get_by_placeholder'  r  rM   r  r  r  r`  r  r  r  r  r  r  c       	         n    [         R                  " U R                  R                  UUUUUUUUU	U
S9
5      $ )aH  Page.get_by_role

Allows locating elements by their [ARIA role](https://www.w3.org/TR/wai-aria-1.2/#roles),
[ARIA attributes](https://www.w3.org/TR/wai-aria-1.2/#aria-attributes) and
[accessible name](https://w3c.github.io/accname/#dfn-accessible-name).

**Usage**

Consider the following DOM structure.

```html
<h3>Sign up</h3>
<label>
  <input type="checkbox" /> Subscribe
</label>
<br/>
<button>Submit</button>
```

You can locate each element by it's implicit role:

```py
await expect(page.get_by_role("heading", name="Sign up")).to_be_visible()

await page.get_by_role("checkbox", name="Subscribe").check()

await page.get_by_role("button", name=re.compile("submit", re.IGNORECASE)).click()
```

**Details**

Role selector **does not replace** accessibility audits and conformance tests, but rather gives early feedback
about the ARIA guidelines.

Many html elements have an implicitly [defined role](https://w3c.github.io/html-aam/#html-element-role-mappings)
that is recognized by the role selector. You can find all the
[supported roles here](https://www.w3.org/TR/wai-aria-1.2/#role_definitions). ARIA guidelines **do not recommend**
duplicating implicit roles and attributes by setting `role` and/or `aria-*` attributes to default values.

Parameters
----------
role : Union["alert", "alertdialog", "application", "article", "banner", "blockquote", "button", "caption", "cell", "checkbox", "code", "columnheader", "combobox", "complementary", "contentinfo", "definition", "deletion", "dialog", "directory", "document", "emphasis", "feed", "figure", "form", "generic", "grid", "gridcell", "group", "heading", "img", "insertion", "link", "list", "listbox", "listitem", "log", "main", "marquee", "math", "menu", "menubar", "menuitem", "menuitemcheckbox", "menuitemradio", "meter", "navigation", "none", "note", "option", "paragraph", "presentation", "progressbar", "radio", "radiogroup", "region", "row", "rowgroup", "rowheader", "scrollbar", "search", "searchbox", "separator", "slider", "spinbutton", "status", "strong", "subscript", "superscript", "switch", "tab", "table", "tablist", "tabpanel", "term", "textbox", "time", "timer", "toolbar", "tooltip", "tree", "treegrid", "treeitem"]
    Required aria role.
checked : Union[bool, None]
    An attribute that is usually set by `aria-checked` or native `<input type=checkbox>` controls.

    Learn more about [`aria-checked`](https://www.w3.org/TR/wai-aria-1.2/#aria-checked).
disabled : Union[bool, None]
    An attribute that is usually set by `aria-disabled` or `disabled`.

    **NOTE** Unlike most other attributes, `disabled` is inherited through the DOM hierarchy. Learn more about
    [`aria-disabled`](https://www.w3.org/TR/wai-aria-1.2/#aria-disabled).

expanded : Union[bool, None]
    An attribute that is usually set by `aria-expanded`.

    Learn more about [`aria-expanded`](https://www.w3.org/TR/wai-aria-1.2/#aria-expanded).
include_hidden : Union[bool, None]
    Option that controls whether hidden elements are matched. By default, only non-hidden elements, as
    [defined by ARIA](https://www.w3.org/TR/wai-aria-1.2/#tree_exclusion), are matched by role selector.

    Learn more about [`aria-hidden`](https://www.w3.org/TR/wai-aria-1.2/#aria-hidden).
level : Union[int, None]
    A number attribute that is usually present for roles `heading`, `listitem`, `row`, `treeitem`, with default values
    for `<h1>-<h6>` elements.

    Learn more about [`aria-level`](https://www.w3.org/TR/wai-aria-1.2/#aria-level).
name : Union[Pattern[str], str, None]
    Option to match the [accessible name](https://w3c.github.io/accname/#dfn-accessible-name). By default, matching is
    case-insensitive and searches for a substring, use `exact` to control this behavior.

    Learn more about [accessible name](https://w3c.github.io/accname/#dfn-accessible-name).
pressed : Union[bool, None]
    An attribute that is usually set by `aria-pressed`.

    Learn more about [`aria-pressed`](https://www.w3.org/TR/wai-aria-1.2/#aria-pressed).
selected : Union[bool, None]
    An attribute that is usually set by `aria-selected`.

    Learn more about [`aria-selected`](https://www.w3.org/TR/wai-aria-1.2/#aria-selected).
exact : Union[bool, None]
    Whether `name` is matched exactly: case-sensitive and whole-string. Defaults to false. Ignored when `name` is a
    regular expression. Note that exact match still trims whitespace.

Returns
-------
Locator
r  r  r  s              rJ   r  Page.get_by_role"(  r  rM   r  c                 \    [         R                  " U R                  R                  US95      $ )u2  Page.get_by_test_id

Locate element by the test id.

**Usage**

Consider the following DOM structure.

```html
<button data-testid="directions">Itinéraire</button>
```

You can locate the element by it's test id:

```py
await page.get_by_test_id("directions").click()
```

**Details**

By default, the `data-testid` attribute is used as a test id. Use `selectors.set_test_id_attribute()` to
configure a different test id attribute if necessary.

Parameters
----------
test_id : Union[Pattern[str], str]
    Id to locate the element by.

Returns
-------
Locator
r  r  r  s     rJ   r  Page.get_by_test_id(  r  rM   c                \    [         R                  " U R                  R                  XS95      $ )a  Page.get_by_text

Allows locating elements that contain given text.

See also `locator.filter()` that allows to match by another criteria, like an accessible role, and then
filter by the text content.

**Usage**

Consider the following DOM structure:

```html
<div>Hello <span>world</span></div>
<div>Hello</div>
```

You can locate by text substring, exact string, or a regular expression:

```py
# Matches <span>
page.get_by_text("world")

# Matches first <div>
page.get_by_text("Hello world")

# Matches second <div>
page.get_by_text("Hello", exact=True)

# Matches both <div>s
page.get_by_text(re.compile("Hello"))

# Matches second <div>
page.get_by_text(re.compile("^hello$", re.IGNORECASE))
```

**Details**

Matching by text always normalizes whitespace, even with exact match. For example, it turns multiple spaces into
one, turns line breaks into spaces and ignores leading and trailing whitespace.

Input elements of the type `button` and `submit` are matched by their `value` instead of the text content. For
example, locating by text `"Log in"` matches `<input type=button value="Log in">`.

Parameters
----------
text : Union[Pattern[str], str]
    Text to locate the element for.
exact : Union[bool, None]
    Whether to find an exact match: case-sensitive and whole-string. Default to false. Ignored when locating by a
    regular expression. Note that exact match still trims whitespace.

Returns
-------
Locator
ru  r  rx  s      rJ   r  Page.get_by_text)  r  rM   c                \    [         R                  " U R                  R                  XS95      $ )a  Page.get_by_title

Allows locating elements by their title attribute.

**Usage**

Consider the following DOM structure.

```html
<span title='Issues count'>25 issues</span>
```

You can check the issues count after locating it by the title text:

```py
await expect(page.get_by_title("Issues count")).to_have_text("25 issues")
```

Parameters
----------
text : Union[Pattern[str], str]
    Text to locate the element for.
exact : Union[bool, None]
    Whether to find an exact match: case-sensitive and whole-string. Default to false. Ignored when locating by a
    regular expression. Note that exact match still trims whitespace.

Returns
-------
Locator
ru  r  rx  s      rJ   r  Page.get_by_titleQ)  r  rM   r2   c                 \    [         R                  " U R                  R                  US95      $ )a  Page.frame_locator

When working with iframes, you can create a frame locator that will enter the iframe and allow selecting elements
in that iframe.

**Usage**

Following snippet locates element with text "Submit" in the iframe with id `my-frame`, like `<iframe
id="my-frame">`:

```py
locator = page.frame_locator("#my-iframe").get_by_text("Submit")
await locator.click()
```

Parameters
----------
selector : str
    A selector to use when resolving DOM element.

Returns
-------
FrameLocator
r  r  r  s     rJ   r  Page.frame_locatorx)  r  rM   c                z   #    [         R                  " U R                  R                  XUS9I Sh  vN 5      $  N7f)a  Page.focus

This method fetches an element with `selector` and focuses it. If there's no element matching `selector`, the
method waits until a matching element appears in the DOM.

Parameters
----------
selector : str
    A selector to search for an element. If there are multiple elements satisfying the selector, the first will be
    used.
strict : Union[bool, None]
    When true, the call requires selector to resolve to a single element. If given selector resolves to more than one
    element, the call throws an exception.
timeout : Union[float, None]
    Maximum time in milliseconds. Defaults to `30000` (30 seconds). Pass `0` to disable timeout. The default value can
    be changed by using the `browser_context.set_default_timeout()` or `page.set_default_timeout()` methods.
r  NrR  r  s       rJ   rS  
Page.focus)  r  ry   c                z   #    [         R                  " U R                  R                  XUS9I Sh  vN 5      $  N7f)a  Page.text_content

Returns `element.textContent`.

Parameters
----------
selector : str
    A selector to search for an element. If there are multiple elements satisfying the selector, the first will be
    used.
strict : Union[bool, None]
    When true, the call requires selector to resolve to a single element. If given selector resolves to more than one
    element, the call throws an exception.
timeout : Union[float, None]
    Maximum time in milliseconds. Defaults to `30000` (30 seconds). Pass `0` to disable timeout. The default value can
    be changed by using the `browser_context.set_default_timeout()` or `page.set_default_timeout()` methods.

Returns
-------
Union[str, None]
r  Nr  r  s       rJ   r  Page.text_content)  r  ry   c                z   #    [         R                  " U R                  R                  XUS9I Sh  vN 5      $  N7f)a  Page.inner_text

Returns `element.innerText`.

Parameters
----------
selector : str
    A selector to search for an element. If there are multiple elements satisfying the selector, the first will be
    used.
strict : Union[bool, None]
    When true, the call requires selector to resolve to a single element. If given selector resolves to more than one
    element, the call throws an exception.
timeout : Union[float, None]
    Maximum time in milliseconds. Defaults to `30000` (30 seconds). Pass `0` to disable timeout. The default value can
    be changed by using the `browser_context.set_default_timeout()` or `page.set_default_timeout()` methods.

Returns
-------
str
r  Nr  r  s       rJ   r  Page.inner_text)  r  ry   c                z   #    [         R                  " U R                  R                  XUS9I Sh  vN 5      $  N7f)a  Page.inner_html

Returns `element.innerHTML`.

Parameters
----------
selector : str
    A selector to search for an element. If there are multiple elements satisfying the selector, the first will be
    used.
strict : Union[bool, None]
    When true, the call requires selector to resolve to a single element. If given selector resolves to more than one
    element, the call throws an exception.
timeout : Union[float, None]
    Maximum time in milliseconds. Defaults to `30000` (30 seconds). Pass `0` to disable timeout. The default value can
    be changed by using the `browser_context.set_default_timeout()` or `page.set_default_timeout()` methods.

Returns
-------
str
r  Nr  r  s       rJ   r  Page.inner_html)  r  ry   c          	      z   #    [         R                  " U R                  R                  XX4S9I Sh  vN 5      $  N7f)a  Page.get_attribute

Returns element attribute value.

Parameters
----------
selector : str
    A selector to search for an element. If there are multiple elements satisfying the selector, the first will be
    used.
name : str
    Attribute name to get the value for.
strict : Union[bool, None]
    When true, the call requires selector to resolve to a single element. If given selector resolves to more than one
    element, the call throws an exception.
timeout : Union[float, None]
    Maximum time in milliseconds. Defaults to `30000` (30 seconds). Pass `0` to disable timeout. The default value can
    be changed by using the `browser_context.set_default_timeout()` or `page.set_default_timeout()` methods.

Returns
-------
Union[str, None]
r  Nr  r  s        rJ   r  Page.get_attribute*  r
  ry   r  c                   #    [         R                  " U R                  R                  U[         R                  " U5      UUUUUUS9I Sh  vN 5      $  N7f)a	  Page.hover

This method hovers over an element matching `selector` by performing the following steps:
1. Find an element matching `selector`. If there is none, wait until a matching element is attached to the DOM.
1. Wait for [actionability](https://playwright.dev/python/docs/actionability) checks on the matched element, unless `force` option is set. If
   the element is detached during the checks, the whole action is retried.
1. Scroll the element into view if needed.
1. Use `page.mouse` to hover over the center of the element, or the specified `position`.

When all steps combined have not finished during the specified `timeout`, this method throws a `TimeoutError`.
Passing zero timeout disables this.

Parameters
----------
selector : str
    A selector to search for an element. If there are multiple elements satisfying the selector, the first will be
    used.
modifiers : Union[Sequence[Union["Alt", "Control", "ControlOrMeta", "Meta", "Shift"]], None]
    Modifier keys to press. Ensures that only these modifiers are pressed during the operation, and then restores
    current modifiers back. If not specified, currently pressed modifiers are used. "ControlOrMeta" resolves to
    "Control" on Windows and Linux and to "Meta" on macOS.
position : Union[{x: float, y: float}, None]
    A point to use relative to the top-left corner of element padding box. If not specified, uses some visible point of
    the element.
timeout : Union[float, None]
    Maximum time in milliseconds. Defaults to `30000` (30 seconds). Pass `0` to disable timeout. The default value can
    be changed by using the `browser_context.set_default_timeout()` or `page.set_default_timeout()` methods.
no_wait_after : Union[bool, None]
    This option has no effect.
    Deprecated: This option has no effect.
force : Union[bool, None]
    Whether to bypass the [actionability](../actionability.md) checks. Defaults to `false`.
strict : Union[bool, None]
    When true, the call requires selector to resolve to a single element. If given selector resolves to more than one
    element, the call throws an exception.
trial : Union[bool, None]
    When set, this method only performs the [actionability](../actionability.md) checks and skips the action. Defaults
    to `false`. Useful to wait until the element is ready for the action without performing it. Note that keyboard
    `modifiers` will be pressed regardless of `trial` to allow testing elements which are only visible when those keys
    are pressed.
r  Nr  r  s	            rJ   r  
Page.hover>*  r  r'  )r  r  r
  r	  r   r  r  r  r  r  r  c                   #    [         R                  " U R                  R                  UUUUUUUUU	S9	I Sh  vN 5      $  N7f)aq  Page.drag_and_drop

This method drags the source element to the target element. It will first move to the source element, perform a
`mousedown`, then move to the target element and perform a `mouseup`.

**Usage**

```py
await page.drag_and_drop("#source", "#target")
# or specify exact positions relative to the top-left corners of the elements:
await page.drag_and_drop(
  "#source",
  "#target",
  source_position={"x": 34, "y": 7},
  target_position={"x": 10, "y": 20}
)
```

Parameters
----------
source : str
    A selector to search for an element to drag. If there are multiple elements satisfying the selector, the first will
    be used.
target : str
    A selector to search for an element to drop onto. If there are multiple elements satisfying the selector, the first
    will be used.
source_position : Union[{x: float, y: float}, None]
    Clicks on the source element at this point relative to the top-left corner of the element's padding box. If not
    specified, some visible point of the element is used.
target_position : Union[{x: float, y: float}, None]
    Drops on the target element at this point relative to the top-left corner of the element's padding box. If not
    specified, some visible point of the element is used.
force : Union[bool, None]
    Whether to bypass the [actionability](../actionability.md) checks. Defaults to `false`.
no_wait_after : Union[bool, None]
    This option has no effect.
    Deprecated: This option has no effect.
timeout : Union[float, None]
    Maximum time in milliseconds. Defaults to `30000` (30 seconds). Pass `0` to disable timeout. The default value can
    be changed by using the `browser_context.set_default_timeout()` or `page.set_default_timeout()` methods.
strict : Union[bool, None]
    When true, the call requires selector to resolve to a single element. If given selector resolves to more than one
    element, the call throws an exception.
trial : Union[bool, None]
    When set, this method only performs the [actionability](../actionability.md) checks and skips the action. Defaults
    to `false`. Useful to wait until the element is ready for the action without performing it.
)	r  r  r  r  r
  r  r   r  r  Nr  )
rI   r  r  r  r  r
  r	  r   r  r  s
             rJ   r  Page.drag_and_drop*  sW     z &&......) / 
 

 	

r  )r(  r)  r*  r   r	  r
  r  r(  r)  r*  c                (  #    [         R                  " U R                  R                  U[         R                  " U5      [         R                  " U5      [         R                  " U5      [         R                  " U5      UUUU	S9	I Sh  vN 5      $  N7f)a	  Page.select_option

This method waits for an element matching `selector`, waits for [actionability](https://playwright.dev/python/docs/actionability) checks, waits
until all specified options are present in the `<select>` element and selects these options.

If the target element is not a `<select>` element, this method throws an error. However, if the element is inside
the `<label>` element that has an associated
[control](https://developer.mozilla.org/en-US/docs/Web/API/HTMLLabelElement/control), the control will be used
instead.

Returns the array of option values that have been successfully selected.

Triggers a `change` and `input` event once all the provided options have been selected.

**Usage**

```py
# Single selection matching the value or label
await page.select_option("select#colors", "blue")
# single selection matching the label
await page.select_option("select#colors", label="blue")
# multiple selection
await page.select_option("select#colors", value=["red", "green", "blue"])
```

Parameters
----------
selector : str
    A selector to search for an element. If there are multiple elements satisfying the selector, the first will be
    used.
value : Union[Sequence[str], str, None]
    Options to select by value. If the `<select>` has the `multiple` attribute, all given options are selected,
    otherwise only the first option matching one of the passed options is selected. Optional.
index : Union[Sequence[int], int, None]
    Options to select by index. Optional.
label : Union[Sequence[str], str, None]
    Options to select by label. If the `<select>` has the `multiple` attribute, all given options are selected,
    otherwise only the first option matching one of the passed options is selected. Optional.
element : Union[ElementHandle, Sequence[ElementHandle], None]
    Option elements to select. Optional.
timeout : Union[float, None]
    Maximum time in milliseconds. Defaults to `30000` (30 seconds). Pass `0` to disable timeout. The default value can
    be changed by using the `browser_context.set_default_timeout()` or `page.set_default_timeout()` methods.
no_wait_after : Union[bool, None]
    This option has no effect.
    Deprecated: This option has no effect.
force : Union[bool, None]
    Whether to bypass the [actionability](../actionability.md) checks. Defaults to `false`.
strict : Union[bool, None]
    When true, the call requires selector to resolve to a single element. If given selector resolves to more than one
    element, the call throws an exception.

Returns
-------
List[str]
)	r  r+  r(  r)  r*  r   r  r
  r  Nr-  )
rI   r  r+  r(  r)  r*  r   r	  r
  r  s
             rJ   r.  Page.select_option*  s{     P &&....!ooe,ooe,ooe,0) / 
 

 	

r  c                z   #    [         R                  " U R                  R                  XUS9I Sh  vN 5      $  N7f)a  Page.input_value

Returns `input.value` for the selected `<input>` or `<textarea>` or `<select>` element.

Throws for non-input elements. However, if the element is inside the `<label>` element that has an associated
[control](https://developer.mozilla.org/en-US/docs/Web/API/HTMLLabelElement/control), returns the value of the
control.

Parameters
----------
selector : str
    A selector to search for an element. If there are multiple elements satisfying the selector, the first will be
    used.
strict : Union[bool, None]
    When true, the call requires selector to resolve to a single element. If given selector resolves to more than one
    element, the call throws an exception.
timeout : Union[float, None]
    Maximum time in milliseconds. Defaults to `30000` (30 seconds). Pass `0` to disable timeout. The default value can
    be changed by using the `browser_context.set_default_timeout()` or `page.set_default_timeout()` methods.

Returns
-------
str
r  NrF  r  s       rJ   rG  Page.input_value$+  r!  ry   )r   r  r	  rJ  c          
         #    [         R                  " U R                  R                  U[         R                  " U5      UUUS9I Sh  vN 5      $  N7f)a  Page.set_input_files

Sets the value of the file input to these file paths or files. If some of the `filePaths` are relative paths, then
they are resolved relative to the current working directory. For empty array, clears the selected files. For inputs
with a `[webkitdirectory]` attribute, only a single directory path is supported.

This method expects `selector` to point to an
[input element](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input). However, if the element is inside
the `<label>` element that has an associated
[control](https://developer.mozilla.org/en-US/docs/Web/API/HTMLLabelElement/control), targets the control instead.

Parameters
----------
selector : str
    A selector to search for an element. If there are multiple elements satisfying the selector, the first will be
    used.
files : Union[Sequence[Union[pathlib.Path, str]], Sequence[{name: str, mimeType: str, buffer: bytes}], pathlib.Path, str, {name: str, mimeType: str, buffer: bytes}]
timeout : Union[float, None]
    Maximum time in milliseconds. Defaults to `30000` (30 seconds). Pass `0` to disable timeout. The default value can
    be changed by using the `browser_context.set_default_timeout()` or `page.set_default_timeout()` methods.
strict : Union[bool, None]
    When true, the call requires selector to resolve to a single element. If given selector resolves to more than one
    element, the call throws an exception.
no_wait_after : Union[bool, None]
    This option has no effect.
    Deprecated: This option has no effect.
)r  rJ  r   r  r  NrM  )rI   r  rJ  r   r  r	  s         rJ   rN  Page.set_input_filesJ+  sT     V &&..00!ooe,) 1  
 	
r+  )rv  r   r	  r  c                   #    [         R                  " U R                  R                  UUUUUUS9I Sh  vN 5      $  N7f)a  Page.type

Sends a `keydown`, `keypress`/`input`, and `keyup` event for each character in the text. `page.type` can be used to
send fine-grained keyboard events. To fill values in form fields, use `page.fill()`.

To press a special key, like `Control` or `ArrowDown`, use `keyboard.press()`.

**Usage**

Parameters
----------
selector : str
    A selector to search for an element. If there are multiple elements satisfying the selector, the first will be
    used.
text : str
    A text to type into a focused element.
delay : Union[float, None]
    Time to wait between key presses in milliseconds. Defaults to 0.
timeout : Union[float, None]
    Maximum time in milliseconds. Defaults to `30000` (30 seconds). Pass `0` to disable timeout. The default value can
    be changed by using the `browser_context.set_default_timeout()` or `page.set_default_timeout()` methods.
no_wait_after : Union[bool, None]
    This option has no effect.
    Deprecated: This option has no effect.
strict : Union[bool, None]
    When true, the call requires selector to resolve to a single element. If given selector resolves to more than one
    element, the call throws an exception.
)r  r   rv  r   r  r  Nrx  )rI   r  r   rv  r   r	  r  s          rJ   ry  	Page.type+  sN     N &&..%%!) &  	
 		
rg  rh  c                   #    [         R                  " U R                  R                  UUUUUUS9I Sh  vN 5      $  N7f)a  Page.press

Focuses the element, and then uses `keyboard.down()` and `keyboard.up()`.

`key` can specify the intended
[keyboardEvent.key](https://developer.mozilla.org/en-US/docs/Web/API/KeyboardEvent/key) value or a single character
to generate the text for. A superset of the `key` values can be found
[here](https://developer.mozilla.org/en-US/docs/Web/API/KeyboardEvent/key/Key_Values). Examples of the keys are:

`F1` - `F12`, `Digit0`- `Digit9`, `KeyA`- `KeyZ`, `Backquote`, `Minus`, `Equal`, `Backslash`, `Backspace`, `Tab`,
`Delete`, `Escape`, `ArrowDown`, `End`, `Enter`, `Home`, `Insert`, `PageDown`, `PageUp`, `ArrowRight`, `ArrowUp`,
etc.

Following modification shortcuts are also supported: `Shift`, `Control`, `Alt`, `Meta`, `ShiftLeft`,
`ControlOrMeta`. `ControlOrMeta` resolves to `Control` on Windows and Linux and to `Meta` on macOS.

Holding down `Shift` will type the text that corresponds to the `key` in the upper case.

If `key` is a single character, it is case-sensitive, so the values `a` and `A` will generate different respective
texts.

Shortcuts such as `key: "Control+o"`, `key: "Control++` or `key: "Control+Shift+T"` are supported as well. When
specified with the modifier, modifier is pressed and being held while the subsequent key is being pressed.

**Usage**

```py
page = await browser.new_page()
await page.goto("https://keycode.info")
await page.press("body", "A")
await page.screenshot(path="a.png")
await page.press("body", "ArrowLeft")
await page.screenshot(path="arrow_left.png")
await page.press("body", "Shift+O")
await page.screenshot(path="o.png")
await browser.close()
```

Parameters
----------
selector : str
    A selector to search for an element. If there are multiple elements satisfying the selector, the first will be
    used.
key : str
    Name of the key to press or a character to generate, such as `ArrowLeft` or `a`.
delay : Union[float, None]
    Time to wait between `keydown` and `keyup` in milliseconds. Defaults to 0.
timeout : Union[float, None]
    Maximum time in milliseconds. Defaults to `30000` (30 seconds). Pass `0` to disable timeout. The default value can
    be changed by using the `browser_context.set_default_timeout()` or `page.set_default_timeout()` methods.
no_wait_after : Union[bool, None]
    Actions that initiate navigations are waiting for these navigations to happen and for pages to start loading. You
    can opt out of waiting via setting this flag. You would only need this option in the exceptional cases such as
    navigating to inaccessible pages. Defaults to `false`.
    Deprecated: This option will default to `true` in the future.
strict : Union[bool, None]
    When true, the call requires selector to resolve to a single element. If given selector resolves to more than one
    element, the call throws an exception.
)r  rh  rv  r   r  r  Nr|  )rI   r  rh  rv  r   r	  r  s          rJ   r}  
Page.press+  sN     L &&..&&!) '  	
 		
rg  r(  c                   #    [         R                  " U R                  R                  UUUUUUUS9I Sh  vN 5      $  N7f)av  Page.check

This method checks an element matching `selector` by performing the following steps:
1. Find an element matching `selector`. If there is none, wait until a matching element is attached to the DOM.
1. Ensure that matched element is a checkbox or a radio input. If not, this method throws. If the element is
   already checked, this method returns immediately.
1. Wait for [actionability](https://playwright.dev/python/docs/actionability) checks on the matched element, unless `force` option is set. If
   the element is detached during the checks, the whole action is retried.
1. Scroll the element into view if needed.
1. Use `page.mouse` to click in the center of the element.
1. Ensure that the element is now checked. If not, this method throws.

When all steps combined have not finished during the specified `timeout`, this method throws a `TimeoutError`.
Passing zero timeout disables this.

Parameters
----------
selector : str
    A selector to search for an element. If there are multiple elements satisfying the selector, the first will be
    used.
position : Union[{x: float, y: float}, None]
    A point to use relative to the top-left corner of element padding box. If not specified, uses some visible point of
    the element.
timeout : Union[float, None]
    Maximum time in milliseconds. Defaults to `30000` (30 seconds). Pass `0` to disable timeout. The default value can
    be changed by using the `browser_context.set_default_timeout()` or `page.set_default_timeout()` methods.
force : Union[bool, None]
    Whether to bypass the [actionability](../actionability.md) checks. Defaults to `false`.
no_wait_after : Union[bool, None]
    This option has no effect.
    Deprecated: This option has no effect.
strict : Union[bool, None]
    When true, the call requires selector to resolve to a single element. If given selector resolves to more than one
    element, the call throws an exception.
trial : Union[bool, None]
    When set, this method only performs the [actionability](../actionability.md) checks and skips the action. Defaults
    to `false`. Useful to wait until the element is ready for the action without performing it.
r*  Nrj  r+  s           rJ   rk  
Page.check,  r-  r.  c                   #    [         R                  " U R                  R                  UUUUUUUS9I Sh  vN 5      $  N7f)a~  Page.uncheck

This method unchecks an element matching `selector` by performing the following steps:
1. Find an element matching `selector`. If there is none, wait until a matching element is attached to the DOM.
1. Ensure that matched element is a checkbox or a radio input. If not, this method throws. If the element is
   already unchecked, this method returns immediately.
1. Wait for [actionability](https://playwright.dev/python/docs/actionability) checks on the matched element, unless `force` option is set. If
   the element is detached during the checks, the whole action is retried.
1. Scroll the element into view if needed.
1. Use `page.mouse` to click in the center of the element.
1. Ensure that the element is now unchecked. If not, this method throws.

When all steps combined have not finished during the specified `timeout`, this method throws a `TimeoutError`.
Passing zero timeout disables this.

Parameters
----------
selector : str
    A selector to search for an element. If there are multiple elements satisfying the selector, the first will be
    used.
position : Union[{x: float, y: float}, None]
    A point to use relative to the top-left corner of element padding box. If not specified, uses some visible point of
    the element.
timeout : Union[float, None]
    Maximum time in milliseconds. Defaults to `30000` (30 seconds). Pass `0` to disable timeout. The default value can
    be changed by using the `browser_context.set_default_timeout()` or `page.set_default_timeout()` methods.
force : Union[bool, None]
    Whether to bypass the [actionability](../actionability.md) checks. Defaults to `false`.
no_wait_after : Union[bool, None]
    This option has no effect.
    Deprecated: This option has no effect.
strict : Union[bool, None]
    When true, the call requires selector to resolve to a single element. If given selector resolves to more than one
    element, the call throws an exception.
trial : Union[bool, None]
    When set, this method only performs the [actionability](../actionability.md) checks and skips the action. Defaults
    to `false`. Useful to wait until the element is ready for the action without performing it.
r*  Nrp  r+  s           rJ   rq  Page.uncheck@,  r1  r.  c                 x   #    [         R                  " U R                  R                  US9I Sh  vN 5      $  N7f)a  Page.wait_for_timeout

Waits for the given `timeout` in milliseconds.

Note that `page.waitForTimeout()` should only be used for debugging. Tests using the timer in production are going
to be flaky. Use signals such as network events, selectors becoming visible and others instead.

**Usage**

```py
# wait for 1 second
await page.wait_for_timeout(1000)
```

Parameters
----------
timeout : float
    A timeout to wait for
r4  Nr3  r  s     rJ   r4  Page.wait_for_timeout~,  s5     * &&..11'1BB
 	
Br   r6  r7  r8  c          	         #    [         R                  " U R                  R                  U[         R                  " U5      UUS9I Sh  vN 5      $  N7f)a  Page.wait_for_function

Returns when the `expression` returns a truthy value. It resolves to a JSHandle of the truthy value.

**Usage**

The `page.wait_for_function()` can be used to observe viewport size change:

```py
import asyncio
from playwright.async_api import async_playwright, Playwright

async def run(playwright: Playwright):
    webkit = playwright.webkit
    browser = await webkit.launch()
    page = await browser.new_page()
    await page.evaluate("window.x = 0; setTimeout(() => { window.x = 100 }, 1000);")
    await page.wait_for_function("() => window.x > 0")
    await browser.close()

async def main():
    async with async_playwright() as playwright:
        await run(playwright)
asyncio.run(main())
```

To pass an argument to the predicate of `page.wait_for_function()` function:

```py
selector = ".foo"
await page.wait_for_function("selector => !!document.querySelector(selector)", selector)
```

Parameters
----------
expression : str
    JavaScript expression to be evaluated in the browser context. If the expression evaluates to a function, the
    function is automatically invoked.
arg : Union[Any, None]
    Optional argument to pass to `expression`.
timeout : Union[float, None]
    Maximum time to wait for in milliseconds. Defaults to `30000` (30 seconds). Pass `0` to disable timeout. The
    default value can be changed by using the `browser_context.set_default_timeout()` or
    `page.set_default_timeout()` methods.
polling : Union["raf", float, None]
    If `polling` is `'raf'`, then `expression` is constantly executed in `requestAnimationFrame` callback. If `polling`
    is a number, then it is treated as an interval in milliseconds at which the function would be executed. Defaults to
    `raf`.

Returns
-------
JSHandle
r:  Nr;  r=  s        rJ   r<  Page.wait_for_function,  r?  r0  c                 z   #    [         R                  " U R                  R                  5       I Sh  vN 5      $  N7f)a  Page.pause

Pauses script execution. Playwright will stop executing the script and wait for the user to either press 'Resume'
button in the page overlay or to call `playwright.resume()` in the DevTools console.

User can inspect selectors or perform manual steps while paused. Resume will continue running the original script
from the place it was paused.

**NOTE** This method requires Playwright to be started in a headed mode, with a falsy `headless` option.
N)r   rE   rF   pauserH   s    rJ   rg  
Page.pause,  s+      &&T^^-A-A-C'CDD'Cry   )r|  display_header_footerheader_templatefooter_templateprint_background	landscapepage_rangesformatwidthheightprefer_css_page_sizemarginr   outlinetaggedri  rj  rk  rl  rm  rn  ro  rp  rq  rr  rs  rt  ru  c                   #    [         R                  " U R                  R                  UUUUUUUUU	U
UUUUUS9I Sh  vN 5      $  N7f)a  Page.pdf

Returns the PDF buffer.

`page.pdf()` generates a pdf of the page with `print` css media. To generate a pdf with `screen` media, call
`page.emulate_media()` before calling `page.pdf()`:

**NOTE** By default, `page.pdf()` generates a pdf with modified colors for printing. Use the
[`-webkit-print-color-adjust`](https://developer.mozilla.org/en-US/docs/Web/CSS/-webkit-print-color-adjust)
property to force rendering of exact colors.

**Usage**

```py
# generates a pdf with "screen" media type.
await page.emulate_media(media="screen")
await page.pdf(path="page.pdf")
```

The `width`, `height`, and `margin` options accept values labeled with units. Unlabeled values are treated as
pixels.

A few examples:
- `page.pdf({width: 100})` - prints with width set to 100 pixels
- `page.pdf({width: '100px'})` - prints with width set to 100 pixels
- `page.pdf({width: '10cm'})` - prints with width set to 10 centimeters.

All possible units are:
- `px` - pixel
- `in` - inch
- `cm` - centimeter
- `mm` - millimeter

The `format` options are:
- `Letter`: 8.5in x 11in
- `Legal`: 8.5in x 14in
- `Tabloid`: 11in x 17in
- `Ledger`: 17in x 11in
- `A0`: 33.1in x 46.8in
- `A1`: 23.4in x 33.1in
- `A2`: 16.54in x 23.4in
- `A3`: 11.7in x 16.54in
- `A4`: 8.27in x 11.7in
- `A5`: 5.83in x 8.27in
- `A6`: 4.13in x 5.83in

**NOTE** `headerTemplate` and `footerTemplate` markup have the following limitations: > 1. Script tags inside
templates are not evaluated. > 2. Page styles are not visible inside templates.

Parameters
----------
scale : Union[float, None]
    Scale of the webpage rendering. Defaults to `1`. Scale amount must be between 0.1 and 2.
display_header_footer : Union[bool, None]
    Display header and footer. Defaults to `false`.
header_template : Union[str, None]
    HTML template for the print header. Should be valid HTML markup with following classes used to inject printing
    values into them:
    - `'date'` formatted print date
    - `'title'` document title
    - `'url'` document location
    - `'pageNumber'` current page number
    - `'totalPages'` total pages in the document
footer_template : Union[str, None]
    HTML template for the print footer. Should use the same format as the `headerTemplate`.
print_background : Union[bool, None]
    Print background graphics. Defaults to `false`.
landscape : Union[bool, None]
    Paper orientation. Defaults to `false`.
page_ranges : Union[str, None]
    Paper ranges to print, e.g., '1-5, 8, 11-13'. Defaults to the empty string, which means print all pages.
format : Union[str, None]
    Paper format. If set, takes priority over `width` or `height` options. Defaults to 'Letter'.
width : Union[float, str, None]
    Paper width, accepts values labeled with units.
height : Union[float, str, None]
    Paper height, accepts values labeled with units.
prefer_css_page_size : Union[bool, None]
    Give any CSS `@page` size declared in the page priority over what is declared in `width` and `height` or `format`
    options. Defaults to `false`, which will scale the content to fit the paper size.
margin : Union[{top: Union[float, str, None], right: Union[float, str, None], bottom: Union[float, str, None], left: Union[float, str, None]}, None]
    Paper margins, defaults to none.
path : Union[pathlib.Path, str, None]
    The file path to save the PDF to. If `path` is a relative path, then it is resolved relative to the current working
    directory. If no path is provided, the PDF won't be saved to the disk.
outline : Union[bool, None]
    Whether or not to embed the document outline into the PDF. Defaults to `false`.
tagged : Union[bool, None]
    Whether or not to generate tagged (accessible) PDF. Defaults to `false`.

Returns
-------
bytes
)r|  displayHeaderFooterheaderTemplatefooterTemplateprintBackgroundrm  
pageRangesro  rp  rq  preferCSSPageSizers  r   rt  ru  N)r   rE   rF   pdf)rI   r|  ri  rj  rk  rl  rm  rn  ro  rp  rq  rr  rs  r   rt  ru  s                   rJ   r}  Page.pdf,  si     d &&..$$$9.. 0#&"6 %  
 	
s   ;AA	Ac                z    [        U R                  R                  XR                  U5      US9R                  5      $ )ap  Page.expect_event

Waits for event to fire and passes its value into the predicate function. Returns when the predicate returns truthy
value. Will throw an error if the page is closed before the event is fired. Returns the event data value.

**Usage**

```py
async with page.expect_event("framenavigated") as event_info:
    await page.get_by_role("button")
frame = await event_info.value
```

Parameters
----------
event : str
    Event name, same one typically passed into `*.on(event)`.
predicate : Union[Callable, None]
    Receives the event data and resolves to truthy value when the waiting should resolve.
timeout : Union[float, None]
    Maximum time to wait for in milliseconds. Defaults to `30000` (30 seconds). Pass `0` to disable timeout. The
    default value can be changed by using the `browser_context.set_default_timeout()`.

Returns
-------
EventContextManager
r7  r8  r<  s       rJ   r9  Page.expect_eventr-  >    F (NN'''9'9)'Dg ( f
 	
rM   c                z    [        U R                  R                  U R                  U5      US9R                  5      $ )a-  Page.expect_console_message

Performs action and waits for a `ConsoleMessage` to be logged by in the page. If predicate is provided, it passes
`ConsoleMessage` value into the `predicate` function and waits for `predicate(message)` to return a truthy value.
Will throw an error if the page is closed before the `page.on('console')` event is fired.

Parameters
----------
predicate : Union[Callable[[ConsoleMessage], bool], None]
    Receives the `ConsoleMessage` object and resolves to truthy value when the waiting should resolve.
timeout : Union[float, None]
    Maximum time to wait for in milliseconds. Defaults to `30000` (30 seconds). Pass `0` to disable timeout. The
    default value can be changed by using the `browser_context.set_default_timeout()`.

Returns
-------
EventContextManager[ConsoleMessage]
r5  r   r   rF   expect_console_messager:  r;  rI   r5  r   s      rJ   r  Page.expect_console_message-  s=    2 (NN11,,Y7 2 f
 	
rM   c                z    [        U R                  R                  U R                  U5      US9R                  5      $ )a  Page.expect_download

Performs action and waits for a new `Download`. If predicate is provided, it passes `Download` value into the
`predicate` function and waits for `predicate(download)` to return a truthy value. Will throw an error if the page
is closed before the download event is fired.

Parameters
----------
predicate : Union[Callable[[Download], bool], None]
    Receives the `Download` object and resolves to truthy value when the waiting should resolve.
timeout : Union[float, None]
    Maximum time to wait for in milliseconds. Defaults to `30000` (30 seconds). Pass `0` to disable timeout. The
    default value can be changed by using the `browser_context.set_default_timeout()`.

Returns
-------
EventContextManager[Download]
r  )r   rF   expect_downloadr:  r;  r  s      rJ   r  Page.expect_download-  s=    2 (NN**,,Y7 + f
 	
rM   c                z    [        U R                  R                  U R                  U5      US9R                  5      $ )a  Page.expect_file_chooser

Performs action and waits for a new `FileChooser` to be created. If predicate is provided, it passes `FileChooser`
value into the `predicate` function and waits for `predicate(fileChooser)` to return a truthy value. Will throw an
error if the page is closed before the file chooser is opened.

Parameters
----------
predicate : Union[Callable[[FileChooser], bool], None]
    Receives the `FileChooser` object and resolves to truthy value when the waiting should resolve.
timeout : Union[float, None]
    Maximum time to wait for in milliseconds. Defaults to `30000` (30 seconds). Pass `0` to disable timeout. The
    default value can be changed by using the `browser_context.set_default_timeout()`.

Returns
-------
EventContextManager[FileChooser]
r  )r   rF   expect_file_chooserr:  r;  r  s      rJ   r  Page.expect_file_chooser-  s=    2 (NN..,,Y7 / f
 	
rM   r  c                z    [        U R                  R                  U R                  U5      X#S9R                  5      $ )ak	  Page.expect_navigation

Waits for the main frame navigation and returns the main resource response. In case of multiple redirects, the
navigation will resolve with the response of the last redirect. In case of navigation to a different anchor or
navigation due to History API usage, the navigation will resolve with `null`.

**Usage**

This resolves when the page navigates to a new URL or reloads. It is useful for when you run code which will
indirectly cause the page to navigate. e.g. The click target has an `onclick` handler that triggers navigation from
a `setTimeout`. Consider this example:

```py
async with page.expect_navigation():
    # This action triggers the navigation after a timeout.
    await page.get_by_text("Navigate after timeout").click()
# Resolves after navigation has finished
```

**NOTE** Usage of the [History API](https://developer.mozilla.org/en-US/docs/Web/API/History_API) to change the URL
is considered a navigation.

Parameters
----------
url : Union[Callable[[str], bool], Pattern[str], str, None]
    A glob pattern, regex pattern or predicate receiving [URL] to match while waiting for the navigation. Note that if
    the parameter is a string without wildcard characters, the method will wait for navigation to URL that is exactly
    equal to the string.
wait_until : Union["commit", "domcontentloaded", "load", "networkidle", None]
    When to consider operation succeeded, defaults to `load`. Events can be either:
    - `'domcontentloaded'` - consider operation to be finished when the `DOMContentLoaded` event is fired.
    - `'load'` - consider operation to be finished when the `load` event is fired.
    - `'networkidle'` - **DISCOURAGED** consider operation to be finished when there are no network connections for
      at least `500` ms. Don't use this method for testing, rely on web assertions to assess readiness instead.
    - `'commit'` - consider operation to be finished when network response is received and the document started
      loading.
timeout : Union[float, None]
    Maximum operation time in milliseconds, defaults to 30 seconds, pass `0` to disable timeout. The default value can
    be changed by using the `browser_context.set_default_navigation_timeout()`,
    `browser_context.set_default_timeout()`, `page.set_default_navigation_timeout()` or
    `page.set_default_timeout()` methods.

Returns
-------
EventContextManager[Response]
r  r  r  s       rJ   r  Page.expect_navigation-  s>    t (NN,,&&s+z - f
 	
rM   c                z    [        U R                  R                  U R                  U5      US9R                  5      $ )a  Page.expect_popup

Performs action and waits for a popup `Page`. If predicate is provided, it passes [Popup] value into the
`predicate` function and waits for `predicate(page)` to return a truthy value. Will throw an error if the page is
closed before the popup event is fired.

Parameters
----------
predicate : Union[Callable[[Page], bool], None]
    Receives the `Page` object and resolves to truthy value when the waiting should resolve.
timeout : Union[float, None]
    Maximum time to wait for in milliseconds. Defaults to `30000` (30 seconds). Pass `0` to disable timeout. The
    default value can be changed by using the `browser_context.set_default_timeout()`.

Returns
-------
EventContextManager[Page]
r  )r   rF   expect_popupr:  r;  r  s      rJ   r  Page.expect_popup8.  s=    2 (NN'',,Y7 ( f
 	
rM   url_or_predicatec                z    [        U R                  R                  U R                  U5      US9R                  5      $ )a  Page.expect_request

Waits for the matching request and returns it. See [waiting for event](https://playwright.dev/python/docs/events#waiting-for-event) for more
details about events.

**Usage**

```py
async with page.expect_request("http://example.com/resource") as first:
    await page.get_by_text("trigger request").click()
first_request = await first.value

# or with a lambda
async with page.expect_request(lambda request: request.url == "http://example.com" and request.method == "get") as second:
    await page.get_by_text("trigger request").click()
second_request = await second.value
```

Parameters
----------
url_or_predicate : Union[Callable[[Request], bool], Pattern[str], str]
    Request URL string, regex or predicate receiving `Request` object. When a `baseURL` via the context options was
    provided and the passed URL is a path, it gets merged via the
    [`new URL()`](https://developer.mozilla.org/en-US/docs/Web/API/URL/URL) constructor.
timeout : Union[float, None]
    Maximum wait time in milliseconds, defaults to 30 seconds, pass `0` to disable the timeout. The default value can
    be changed by using the `page.set_default_timeout()` method.

Returns
-------
EventContextManager[Request]
urlOrPredicater   )r   rF   expect_requestr:  r;  rI   r  r   s      rJ   r  Page.expect_requestW.  s?    R (NN))#112BCW * f
 	
rM   c                z    [        U R                  R                  U R                  U5      US9R                  5      $ )a
  Page.expect_request_finished

Performs action and waits for a `Request` to finish loading. If predicate is provided, it passes `Request` value
into the `predicate` function and waits for `predicate(request)` to return a truthy value. Will throw an error if
the page is closed before the `page.on('request_finished')` event is fired.

Parameters
----------
predicate : Union[Callable[[Request], bool], None]
    Receives the `Request` object and resolves to truthy value when the waiting should resolve.
timeout : Union[float, None]
    Maximum time to wait for in milliseconds. Defaults to `30000` (30 seconds). Pass `0` to disable timeout. The
    default value can be changed by using the `browser_context.set_default_timeout()`.

Returns
-------
EventContextManager[Request]
r  )r   rF   expect_request_finishedr:  r;  r  s      rJ   r  Page.expect_request_finished.  s=    2 (NN22,,Y7 3 f
 	
rM   c                z    [        U R                  R                  U R                  U5      US9R                  5      $ )aJ  Page.expect_response

Returns the matched response. See [waiting for event](https://playwright.dev/python/docs/events#waiting-for-event) for more details about
events.

**Usage**

```py
async with page.expect_response("https://example.com/resource") as response_info:
    await page.get_by_text("trigger response").click()
response = await response_info.value
return response.ok

# or with a lambda
async with page.expect_response(lambda response: response.url == "https://example.com" and response.status == 200 and response.request.method == "get") as response_info:
    await page.get_by_text("trigger response").click()
response = await response_info.value
return response.ok
```

Parameters
----------
url_or_predicate : Union[Callable[[Response], bool], Pattern[str], str]
    Request URL string, regex or predicate receiving `Response` object. When a `baseURL` via the context options was
    provided and the passed URL is a path, it gets merged via the
    [`new URL()`](https://developer.mozilla.org/en-US/docs/Web/API/URL/URL) constructor.
timeout : Union[float, None]
    Maximum wait time in milliseconds, defaults to 30 seconds, pass `0` to disable the timeout. The default value can
    be changed by using the `browser_context.set_default_timeout()` or `page.set_default_timeout()` methods.

Returns
-------
EventContextManager[Response]
r  )r   rF   expect_responser:  r;  r  s      rJ   r  Page.expect_response.  s?    V (NN**#112BCW + f
 	
rM   c                z    [        U R                  R                  U R                  U5      US9R                  5      $ )a  Page.expect_websocket

Performs action and waits for a new `WebSocket`. If predicate is provided, it passes `WebSocket` value into the
`predicate` function and waits for `predicate(webSocket)` to return a truthy value. Will throw an error if the page
is closed before the WebSocket event is fired.

Parameters
----------
predicate : Union[Callable[[WebSocket], bool], None]
    Receives the `WebSocket` object and resolves to truthy value when the waiting should resolve.
timeout : Union[float, None]
    Maximum time to wait for in milliseconds. Defaults to `30000` (30 seconds). Pass `0` to disable timeout. The
    default value can be changed by using the `browser_context.set_default_timeout()`.

Returns
-------
EventContextManager[WebSocket]
r  )r   rF   expect_websocketr:  r;  r  s      rJ   r  Page.expect_websocket.  s=    2 (NN++,,Y7 , f
 	
rM   c                z    [        U R                  R                  U R                  U5      US9R                  5      $ )a  Page.expect_worker

Performs action and waits for a new `Worker`. If predicate is provided, it passes `Worker` value into the
`predicate` function and waits for `predicate(worker)` to return a truthy value. Will throw an error if the page is
closed before the worker event is fired.

Parameters
----------
predicate : Union[Callable[[Worker], bool], None]
    Receives the `Worker` object and resolves to truthy value when the waiting should resolve.
timeout : Union[float, None]
    Maximum time to wait for in milliseconds. Defaults to `30000` (30 seconds). Pass `0` to disable timeout. The
    default value can be changed by using the `browser_context.set_default_timeout()`.

Returns
-------
EventContextManager[Worker]
r  )r   rF   expect_workerr:  r;  r  s      rJ   r  Page.expect_worker.  s=    2 (NN((,,Y7 ) f
 	
rM   c                   #    [         R                  " U R                  R                  UUUUUUUUS9I Sh  vN 5      $  N7f)a  Page.set_checked

This method checks or unchecks an element matching `selector` by performing the following steps:
1. Find an element matching `selector`. If there is none, wait until a matching element is attached to the DOM.
1. Ensure that matched element is a checkbox or a radio input. If not, this method throws.
1. If the element already has the right checked state, this method returns immediately.
1. Wait for [actionability](https://playwright.dev/python/docs/actionability) checks on the matched element, unless `force` option is set. If
   the element is detached during the checks, the whole action is retried.
1. Scroll the element into view if needed.
1. Use `page.mouse` to click in the center of the element.
1. Ensure that the element is now checked or unchecked. If not, this method throws.

When all steps combined have not finished during the specified `timeout`, this method throws a `TimeoutError`.
Passing zero timeout disables this.

Parameters
----------
selector : str
    A selector to search for an element. If there are multiple elements satisfying the selector, the first will be
    used.
checked : bool
    Whether to check or uncheck the checkbox.
position : Union[{x: float, y: float}, None]
    A point to use relative to the top-left corner of element padding box. If not specified, uses some visible point of
    the element.
timeout : Union[float, None]
    Maximum time in milliseconds. Defaults to `30000` (30 seconds). Pass `0` to disable timeout. The default value can
    be changed by using the `browser_context.set_default_timeout()` or `page.set_default_timeout()` methods.
force : Union[bool, None]
    Whether to bypass the [actionability](../actionability.md) checks. Defaults to `false`.
no_wait_after : Union[bool, None]
    This option has no effect.
    Deprecated: This option has no effect.
strict : Union[bool, None]
    When true, the call requires selector to resolve to a single element. If given selector resolves to more than one
    element, the call throws an exception.
trial : Union[bool, None]
    When set, this method only performs the [actionability](../actionability.md) checks and skips the action. Defaults
    to `false`. Useful to wait until the element is ready for the action without performing it.
rF  Nrc  rG  s	            rJ   rd  Page.set_checked/  rI  rJ  )r	  r  ro  c          	         #    [         R                  " U R                  R                  UR                  U R	                  U5      UUS9I Sh  vN 5      $  N7f)a  Page.add_locator_handler

When testing a web page, sometimes unexpected overlays like a "Sign up" dialog appear and block actions you want to
automate, e.g. clicking a button. These overlays don't always show up in the same way or at the same time, making
them tricky to handle in automated tests.

This method lets you set up a special function, called a handler, that activates when it detects that overlay is
visible. The handler's job is to remove the overlay, allowing your test to continue as if the overlay wasn't there.

Things to keep in mind:
- When an overlay is shown predictably, we recommend explicitly waiting for it in your test and dismissing it as
  a part of your normal test flow, instead of using `page.add_locator_handler()`.
- Playwright checks for the overlay every time before executing or retrying an action that requires an
  [actionability check](https://playwright.dev/python/docs/actionability), or before performing an auto-waiting assertion check. When overlay
  is visible, Playwright calls the handler first, and then proceeds with the action/assertion. Note that the
  handler is only called when you perform an action/assertion - if the overlay becomes visible but you don't
  perform any actions, the handler will not be triggered.
- After executing the handler, Playwright will ensure that overlay that triggered the handler is not visible
  anymore. You can opt-out of this behavior with `noWaitAfter`.
- The execution time of the handler counts towards the timeout of the action/assertion that executed the handler.
  If your handler takes too long, it might cause timeouts.
- You can register multiple handlers. However, only a single handler will be running at a time. Make sure the
  actions within a handler don't depend on another handler.

**NOTE** Running the handler will alter your page state mid-test. For example it will change the currently focused
element and move the mouse. Make sure that actions that run after the handler are self-contained and do not rely on
the focus and mouse state being unchanged.

For example, consider a test that calls `locator.focus()` followed by `keyboard.press()`. If your
handler clicks a button between these two actions, the focused element most likely will be wrong, and key press
will happen on the unexpected element. Use `locator.press()` instead to avoid this problem.

Another example is a series of mouse actions, where `mouse.move()` is followed by `mouse.down()`.
Again, when the handler runs between these two actions, the mouse position will be wrong during the mouse down.
Prefer self-contained actions like `locator.click()` that do not rely on the state being unchanged by a
handler.

**Usage**

An example that closes a "Sign up to the newsletter" dialog when it appears:

```py
# Setup the handler.
def handler():
  page.get_by_role("button", name="No thanks").click()
page.add_locator_handler(page.get_by_text("Sign up to the newsletter"), handler)

# Write the test as usual.
page.goto("https://example.com")
page.get_by_role("button", name="Start here").click()
```

An example that skips the "Confirm your security details" page when it is shown:

```py
# Setup the handler.
def handler():
  page.get_by_role("button", name="Remind me later").click()
page.add_locator_handler(page.get_by_text("Confirm your security details"), handler)

# Write the test as usual.
page.goto("https://example.com")
page.get_by_role("button", name="Start here").click()
```

An example with a custom callback on every actionability check. It uses a `<body>` locator that is always visible,
so the handler is called before every actionability check. It is important to specify `noWaitAfter`, because the
handler does not hide the `<body>` element.

```py
# Setup the handler.
def handler():
  page.evaluate("window.removeObstructionsForTestIfNeeded()")
page.add_locator_handler(page.locator("body"), handler, no_wait_after=True)

# Write the test as usual.
page.goto("https://example.com")
page.get_by_role("button", name="Start here").click()
```

Handler takes the original locator as an argument. You can also automatically remove the handler after a number of
invocations by setting `times`:

```py
def handler(locator):
  locator.click()
page.add_locator_handler(page.get_by_label("Close"), handler, times=1)
```

Parameters
----------
locator : Locator
    Locator that triggers the handler.
handler : Union[Callable[[Locator], Any], Callable[[], Any]]
    Function that should be run once `locator` appears. This function should get rid of the element that blocks actions
    like click.
no_wait_after : Union[bool, None]
    By default, after calling the handler Playwright will wait until the overlay becomes hidden, and only then
    Playwright will continue with the action/assertion that triggered the handler. This option allows to opt-out of
    this behavior, so that overlay can stay visible after the handler has run.
times : Union[int, None]
    Specifies the maximum number of times this handler should be called. Unlimited by default.
)ro  r^  r  r  N)r   rE   rF   add_locator_handlerr:  )rI   ro  r^  r	  r  s        rJ   r  Page.add_locator_handlerV/  sY     d &&..44))**73)	 5  
 	
r   c                    #    [         R                  " U R                  R                  UR                  S9I Sh  vN 5      $  N7f)zPage.remove_locator_handler

Removes all locator handlers added by `page.add_locator_handler()` for a specific locator.

Parameters
----------
locator : Locator
    Locator passed to `page.add_locator_handler()`.
ro  N)r   rE   rF   remove_locator_handlerrI   ro  s     rJ   r  Page.remove_locator_handler/  s;      &&..77@Q@Q7RR
 	
Rs   7AA	Ar   )rB   r   )rB   r.   )rB   r/   )rB   r0   )rB   r    rB   r#   r   rB   r*   r  r   )ro  r3   rB   N)r   r   r   r   r   rI  r   rJ  r  r   r	  rK  r*  r   r?  rB  rE  rH  rK  rO  rR  r   rU  rG   r   r   rZ  r]  r   rb  re  rK  r   ra   r  rk  ro  r  r  r  r  r  r  r  r  r  r   r  r   r  r  r  r  r
  r  rG  rM  r  r  r  r5  r=  r  r  r  r  r@  r  r  r  r  r  r  r  r   r  r  r  r  r  r   r  r   r  rB  r  rF  r   r  r  r  r;  ro  rw  r}  r  r  r  r  r  r  rS  r  r  r  r  r  r  r.  rG  r   rN  ry  r}  rk  rq  r4  r<  rg  r   r}  r   r9  r  r  r  r  r  r  r  r  r  r  rd  r  r  r   rL  rM  s   @rJ   r9   r9   u  sn1   __)w) ??F8%QQR) 
	) ) __y! ?? LL
 
 2 __w ??F8%QQR 
	 , __$x $ ??H:'SST$ 
	$ $( __)* ??F8%QQR 
	  __'z"' ??J<)UUV' 
	' ' __}% ??OII
 
  __-'- ??G9&RRS- 
	- - __-'- ??G9&RRS- 
	- - __;'(; ??G9&RRS; 
	; ; __v ??F8%QQR 
	  __{# ??G9&RRS 
	   __#w# ??F8%QQR# 
	# #2 __<y!< ??I;(TTU< 
	< < __' ??I;(TTU 
	 " __N()N ??I;(TTUN 
	N N __Bz"B ??J<)UUVB 
	B B __5{#5 ??K=*VVW5 
	5 5 __x  ??H:'SST 
	 ,, ??3V-=-=d-CT-I JJK, 
	, __)w) ??F8%QQR) 
	) ) __y! ?? LL
 
 2 __w ??F8%QQR 
	 , __$x $ ??H:'SST$ 
	$ $( __)* ??F8%QQR 
	  __'z"' ??J<)UUV' 
	' ' __}% ??OII
 
  __-'- ??G9&RRS- 
	- - __-'- ??G9&RRS- 
	- - __;'(; ??G9&RRS; 
	; ; __v ??F8%QQR 
	  __{# ??G9&RRS 
	   __#w# ??F8%QQR# 
	# #2 __<y!< ??I;(TTU< 
	< < __' ??I;(TTU 
	 " __N()N ??I;(TTUN 
	N N __Bz"B ??J<)UUVB 
	B B __5{#5 ??K=*VVW5 
	5 5 __x  ??H:'SST 
	 .. ??3V-=-=d-CT-I JJK. 
	. ? ? : : 7 7 = = 	9 	9 	7 	7 	< 	< 	=G, 	= 	= ;S ; ; Hv|< H H >X. > > 9 9 	@vw/ 	@ 	@
Ifoof5 
I &* 
  
ooc" 
 __LLfnnS16??C5$;3OOP
	 
 
	! 
D
e 
 
2
5 
T 
$ AE

(.(=
		)
2
 
_9U 
0 +/ (,J
J
 '	J

 ?@
J
 %J
 
	)J
` )-*. 
 
 %	 

 ' 
 
 
L )-*. 
 
 %	 

 ' 
 
 
L )-*. 
 
 %	 

 ' 
 
 
L )-*. 
 
 %	 

 ' 
 
 
L )-*. 
 
 %	 

 ' 
 
 
L )-*. 
 
 %	 

 ' 
 
 
L 48	E
 +/(,E
E
 E
 OOFKK0	E
 'E
 %E
 
E
P CG8
8
$*OOFJJ$?8
	8
v CG4
4
$*OOFJJ$?4
	4
t ,0	1
 )-1
1
 1
 __VZZ(	1
 %1
 
1
h RV$
$
),$
39??6::3N$
	$
R %)AE(,%)#
 __S!#
 oofll3+<=>	#

 %#
 ooc"#
 
#
P %)AE(,
 __S!
 oofll3+<=>	

 %
 

><
# <
 <
T <
F )-C
C
 //C

 %C
 
C
J
FKKS4I 
d 
&
Gs 
G  +/ %
%
 '	%

 OOGH
%
 
%
V +/ (,@
@
 '	@

 OOGH
@
 %@
 
	$@
J +/ %
 '%
 OOGH
	%
 
	$%
V 	5
 +/5
=>
5
 '5
 
5
z *.-
\\#v~~c2FOOSE4K4PPQ-
 OOGH
	-
 '-
 
-
d 7;"

 +/"
"
 ??6??3"

 '"
 
"
N +/ &
 '&
 OOGH
	&
 
	$&
V +/ &
 '&
 OOGH
	&
 
	$&
PJ2 FJ  LPNRG
 w'@ABG
 oo<=
	G
 56
G
 w/G'HIG
 //'*I"JKG
 
G
R
\ 
d 
8N (,'
 BF	'
$'
 oofll3+<=>	'

 
'
b '+S
\\#v~~c2FOOSE4K4PPQS
 OOWIvzz12OOWi0&**<=?
S
 s#S
 
S
z 
\\#v~~c2FOOSE4K4PPQ
 LL	6:: 56) 4fjj @AC

 

:)
\\#v~~c2FOOSE4K4PPQ)
 "2!3VZZ!?@)
 
	)
\ QU
 //'*K"LM
 
	
8 HLCG(,FJCG5
\\',,+,5
 __V\\#v~~c/B*BCD	5

 ??7+>#?@5
 %5
 0A(BC5
 __W->%?@5
 
5
t +/8<AE(,15+/+/DH=A;?<@+/&*\
 '\
 oogm45	\

 oofll3+<=>\
 %\
  .\
 ??4(\
 ooi(\
 OOG,?$@A\
 w'89:\
 w78\
 oofooi89\
 OOC(\
 s#\
  
!\
|
ES 
E 48'+	
 "??40
 $	

 

:
C4 
C$ .2(,FJ,0*.'+/3'+(,R
R
 ??OOG$VWX
	R
 //(+R
 u%R
 (A BCR
 __S)R
 'R
 t$R
 t,R
 t$R
 %R
  
!R
t .2(,FJ*.'+/3(,'+M
M
 ??OOG$VWX
	M
 //(+M
 u%M
 (A BCM
 'M
 t$M
 t,M
 %M
 t$M
 
M
j .2*.'+/3(,'+E
E
 ??OOG$VWX
	E
 //(+E
 'E
 t$E
 t,E
 %E
 t$E
 
E
X +//3(,'+4
4
 4

 '4
 t,4
 %4
 t$4
 
4
t MQPT*..29
9
 //&,,sFNN34G/G"HI	9

 oofll3s8K3K&LM9
 __Y'9
 +9
 
9
~ (,	#Yll3s 334#Y t$	#Y
 
#YR (,	'Vll3s 334'V t$	'V
 
'VZ (,	'
ll3s 334'
 t$	'

 
'
@ *.*.*.04&*HL)-*.'+G
QS
G
n &oG
p //$'qG
r //$'sG
t -uG
v s#wG
x oofll3s0C+CDEyG
z &{G
| //$'}G
~ t$G
@ 
AG
R$P||C)<$<=$P	$PT (,	>Ull3s 334>U t$	>U
 
>UH (,	%Vll3s 334%V t$	%V
 
%VNRc Rn R@ )-*.

 %	

 '
 

F )-*. 
 
 %	 

 ' 
 
	 
L )-*. 
 
 %	 

 ' 
 
 
L )-*. 
 
 %	 

 ' 
 
 
N )-*.#
#
 #

 %#
 '#
 
	#
V .2*./3'+(,'+C
C
 ??OOG$VWX
	C
 //(+C
 'C
 t,C
 t$C
 %C
 t$C
 
C
T 6:59'+/3*.(,'+I
I
 I

  2I
  2I
 t$I
 t,I
 'I
 %I
 t$I
 
I
\ KOT

 KOJN *./3'+(,T
T
 v||C1E,EFGT

 v||C1E,EFGT
 v||C1E,EFGT
 LL&///*JJK
T
 'T
 t,T
 t$T
 %T
 
S	T
t )-*.$
$
 %	$

 '$
 
$
b +/(,/33
3
 ||LLOOFLLgll):;<OOK(	*
3
 '3
 %3
 t,3
 
3
t )-*./3(,0
0
 0

 u%0
 '0
 t,0
 %0
 
0
n )-*./3(,O
O
 O

 u%O
 'O
 t,O
 %O
 
O
j /3*.'+/3(,'+<
<
 //(+	<

 '<
 t$<
 t,<
 %<
 t$<
 
<
D /3*.'+/3(,'+<
<
 //(+	<

 '<
 t$<
 t,<
 %<
 t$<
 
<
|
e 
 
: ,0*.HLE
E
 __VZZ(	E

 'E
 eWU^.C!DEE
 
E
NE" )-7;040426+/,0'+;?<@6:.2AE)-(,#D
 u%D
  &t4	D

  -D
  -D
 !//$/D
 ??4(D
 __S)D
 $D
 v||CJ78D
 S%Z 89D
 %ood3D
 
+D
 oofll3+<=>D
  &!D
" %#D
$ 
%D
R 7;'

 +/'
'
 ??6??3'

 ''
 
"'
V QU
 +/	
??6??4D3Et3K#LM
 '	

 
""2	3
B KO
 +/	
??6??J<3E#FG
 '	

 
"*	-
B NR
 +/	
??6??M?D3H#IJ
 '	

 
"-	0
H  *.>
 __LLfnnS16??C5$;3OOP
>
 OOGH
>
 '>
 
"*	->
D GK
 +/	
??6??F8T>#BC
 '	

 
"&	)
J +/-
 ,,$fooyk46G&HH
-
 '-
 
")	,-
b JN
 +/	
??6??I;3D#EF
 '	

 
")	,
J +//
 ,,$foozlD6H&II
/
 '/
 
"*	-/
f LP
 +/	
??6??K=$3F#GH
 '	

 
"+	.
B IM
 +/	
??6??H:t3C#DE
 '	

 
"(	+
H /3*.'+/3(,'+@
@
 @

 //(+@
 '@
 t$@
 t,@
 %@
 t$@
 
@
R 04&*y
y
 OOYK34foob&**n6UU
y
 t,y
 s#y
 
y
v
 
rM   r9   c                   Z    \ rS rSr\S\R                  S   4S j5       r\SS j5       rSr	g)	r?   i/  rB   r9   c                 V    [         R                  " U R                  R                  5      $ )zkWebError.page

The page that produced this unhandled exception, if any.

Returns
-------
Union[Page, None]
r  rH   s    rJ   r  WebError.page/  r  rM   c                 V    [         R                  " U R                  R                  5      $ )zHWebError.error

Unhandled error that was thrown.

Returns
-------
Error
)r   r`   rF   errorrH   s    rJ   r  WebError.error/  r   rM   r   N)rB   r(   )
r   r   r   r   r   r   r   r  r  r   r   rM   rJ   r?   r?   /  s8    	?foof- 	? 	? 	7 	7rM   r?   c                     ^  \ rS rSr\R
                  S\S   S\R                  S/S4   SS4S	 j5       r\R
                  S\S
   S\R                  S /S4   SS4S j5       r\R
                  S\S   S\R                  S/S4   SS4S j5       r\R
                  S\S   S\R                  S/S4   SS4S j5       r\R
                  S\S   S\R                  S/S4   SS4S j5       r\R
                  S\S   S\R                  S/S4   SS4S j5       r\R
                  S\S   S\R                  S/S4   SS4S j5       r\R
                  S\S   S\R                  S/S4   SS4S j5       r\R
                  S\S   S\R                  S/S4   SS4S j5       r\R
                  S\S   S\R                  S/S4   SS4S  j5       r\R
                  S\S!   S\R                  S"/S4   SS4S# j5       rS\	S\R                  S$\R                  \R                  S   S4   4   SS4U 4S% jjr\R
                  S\S   S\R                  S/S4   SS4S& j5       r\R
                  S\S
   S\R                  S /S4   SS4S' j5       r\R
                  S\S   S\R                  S/S4   SS4S( j5       r\R
                  S\S   S\R                  S/S4   SS4S) j5       r\R
                  S\S   S\R                  S/S4   SS4S* j5       r\R
                  S\S   S\R                  S/S4   SS4S+ j5       r\R
                  S\S   S\R                  S/S4   SS4S, j5       r\R
                  S\S   S\R                  S/S4   SS4S- j5       r\R
                  S\S   S\R                  S/S4   SS4S. j5       r\R
                  S\S   S\R                  S/S4   SS4S/ j5       r\R
                  S\S!   S\R                  S"/S4   SS4S0 j5       rS\	S\R                  S$\R                  \R                  S   S4   4   SS4U 4S1 jjr\S\R                  S   4S2 j5       r\S\R                   S3   4S4 j5       r\S\R                  S   4S5 j5       r\S\R                  S"   4S6 j5       r\SS7 j5       r\SS8 j5       r\SS9 j5       rS:\SS4S; jrS:\SS4S< jrSS= jr SS>\R                   \R                  \	\R6                  \	   4      S\R                  \   4S? jjrS@\R6                  \   SS4SA jrSSSSB.SC\R                   \R                  \	\R@                  \	   4      SD\R                   \R                  \	\R@                  \	   4      SE\R                   \R                  \	\R@                  \	   4      SS4SF jjr!SSG.SH\R6                  \	   SI\R                   \	   SS4SJ jjr"SSK jr# SSL\R                   \$   SS4SM jjr%SN\RL                  \	\	4   SS4SO jr'SP\(SS4SQ jr) SSSR.SS\R                   \	   SE\R                   \R                  \	\*RV                  4      SS4ST jjjr,SSU.SC\	SV\R                  SW\R                   \(   SS4SX jjr-SC\	SV\R                  SS4SY jr.SSZ.S[\R                  \	\R@                  \	   \R                  \	/\(4   4   S\\R                  \R                  S]/\R^                  4   \R                  S]S/\R^                  4   4   S^\R                   \0   SS4S_ jjr1 SS[\R                  \	\R@                  \	   \R                  \	/\(4   4   S\\R                   \R                  \R                  S]/\R^                  4   \R                  S]S/\R^                  4   4      SS4S` jjr2S[\R                  \	\R@                  \	   \R                  \	/\(4   4   S\\R                  Sa/\R^                  4   SS4Sb jr3SSc.Sd\R                   \Se      SS4Sf jjr4SSSSSSg.Sh\R                  \*RV                  \	4   S[\R                   \R                  \	\R@                  \	   4      Si\R                   \Sj      Sk\R                   \(   Sl\R                   \Sm      Sn\R                   \So      SS4Sp jjr5 SSSq.S\	Sr\R                   \R                     S:\R                   \   S\64Ss jjjr7SSt.Su\R                   \	   SS4Sv jjr8SSSw.SE\R                   \R                  \	\*RV                  4      Sx\R                   \(   S\94Sy jjr: SSSq.S\	Sr\R                   \R                     S:\R                   \   S\R^                  4Sz jjjr; SSSq.Sr\R                   \R                  S/\(4      S:\R                   \   S\6S   4S{ jjjr< SSSq.Sr\R                   \R                  S/\(4      S:\R                   \   S\6S   4S| jjjr=S\R                  S}   SS~4S jr>Sr?U =r@$ )r    i0  r  backgroundpager  r9   r  rB   Nc                     gz
**NOTE** Only works with Chromium browser's persistent context.

Emitted when new background page is created in the context.

```py
background_page = await context.wait_for_event("backgroundpage")
```Nr   r  s      rJ   r  BrowserContext.on0  r  rM   r  c                     gz
Emitted when Browser context gets closed. This might happen because of one of the following:
- Browser context is closed.
- Browser application is closed or crashed.
- The `browser.close()` method was called.Nr   r  s      rJ   r  r  0  r  rM   r  r$   c                     ga  
Emitted when JavaScript within the page calls one of console API methods, e.g. `console.log` or `console.dir`.

The arguments passed into `console.log` and the page are available on the `ConsoleMessage` event handler argument.

**Usage**

```py
async def print_args(msg):
    values = []
    for arg in msg.args:
        values.append(await arg.json_value())
    print(values)

context.on("console", print_args)
await page.evaluate("console.log('hello', 5, { foo: 'bar' })")
```Nr   r  s      rJ   r  r  !0  r  rM   r  r%   c                     ga<  
Emitted when a JavaScript dialog appears, such as `alert`, `prompt`, `confirm` or `beforeunload`. Listener **must**
either `dialog.accept()` or `dialog.dismiss()` the dialog - otherwise the page will
[freeze](https://developer.mozilla.org/en-US/docs/Web/JavaScript/EventLoop#never_blocking) waiting for the dialog,
and actions like click will never finish.

**Usage**

```python
context.on("dialog", lambda dialog: dialog.accept())
```

**NOTE** When no `page.on('dialog')` or `browser_context.on('dialog')` listeners are present, all dialogs are
automatically dismissed.Nr   r  s      rJ   r  r  ;0  r  rM   r  c                     ga  
The event is emitted when a new Page is created in the BrowserContext. The page may still be loading. The event
will also fire for popup pages. See also `page.on('popup')` to receive events about popups relevant to a
specific page.

The earliest moment that page is available is when it has navigated to the initial url. For example, when opening a
popup with `window.open('http://example.com')`, this event will fire when the network request to
"http://example.com" is done and its response has started loading in the popup. If you would like to route/listen
to this network request, use `browser_context.route()` and `browser_context.on('request')` respectively
instead of similar methods on the `Page`.

```py
async with context.expect_page() as page_info:
    await page.get_by_text("open new page").click(),
page = await page_info.value
print(await page.evaluate("location.href"))
```

**NOTE** Use `page.wait_for_load_state()` to wait until the page gets to a particular state (you should not
need it in most cases).Nr   r  s      rJ   r  r  P0  r  rM   weberrorr?   c                     gz
Emitted when exception is unhandled in any of the pages in this context. To listen for errors from a particular
page, use `page.on('page_error')` instead.Nr   r  s      rJ   r  r  k0  r  rM   r   r4   c                     ga  
Emitted when a request is issued from any pages created through this context. The [request] object is read-only. To
only listen for requests from a particular page, use `page.on('request')`.

In order to intercept and mutate requests, see `browser_context.route()` or `page.route()`.
Nr   r  s      rJ   r  r  u0  r  rM   r  c                     ga  
Emitted when a request fails, for example by timing out. To only listen for failed requests from a particular page,
use `page.on('request_failed')`.

**NOTE** HTTP Error responses, such as 404 or 503, are still successful responses from HTTP standpoint, so request
will complete with `browser_context.on('request_finished')` event and not with
`browser_context.on('request_failed')`.Nr   r  s      rJ   r  r  0  r  rM   r  c                     ga  
Emitted when a request finishes successfully after downloading the response body. For a successful response, the
sequence of events is `request`, `response` and `requestfinished`. To listen for successful requests from a
particular page, use `page.on('request_finished')`.Nr   r  s      rJ   r  r  0  r  rM   r{   r5   c                     gz
Emitted when [response] status and headers are received for a request. For a successful response, the sequence of
events is `request`, `response` and `requestfinished`. To listen for response events from a particular page, use
`page.on('response')`.Nr   r  s      rJ   r  r  0  r  rM   serviceworkerr:   c                     gz
**NOTE** Service workers are only supported on Chromium-based browsers.

Emitted when new service worker is created in the context.Nr   r  s      rJ   r  r  0  r  rM   .c                    > [         TU ]  XS9$ r"  r$  r&  s      rJ   r  r  0  r(  rM   c                     gr  r   r  s      rJ   r*  BrowserContext.once0  r  rM   c                     gr  r   r  s      rJ   r*  r  0  r  rM   c                     gr  r   r  s      rJ   r*  r  0  r  rM   c                     gr  r   r  s      rJ   r*  r  0  r  rM   c                     gr  r   r  s      rJ   r*  r  1  r  rM   c                     gr  r   r  s      rJ   r*  r  1  r  rM   c                     gr  r   r  s      rJ   r*  r  )1  r  rM   c                     gr  r   r  s      rJ   r*  r  61  r  rM   c                     gr  r   r  s      rJ   r*  r  D1  r  rM   c                     gr  r   r  s      rJ   r*  r  O1  r  rM   c                     gr  r   r  s      rJ   r*  r  Z1  r  rM   c                    > [         TU ]  XS9$ r"  r0  r&  s      rJ   r*  r  e1  r1  rM   c                 V    [         R                  " U R                  R                  5      $ )zYBrowserContext.pages

Returns all open pages in the context.

Returns
-------
List[Page]
)r   r   rF   pagesrH   s    rJ   r  BrowserContext.pagesl1  s     %%dnn&:&:;;rM   r   c                 V    [         R                  " U R                  R                  5      $ )zBrowserContext.browser

Returns the browser instance of the context. If it was launched as a persistent context null gets returned.

Returns
-------
Union[Browser, None]
)r   rd   rF   browserrH   s    rJ   r  BrowserContext.browserx1  s     ))$..*@*@AArM   c                 V    [         R                  " U R                  R                  5      $ )zBrowserContext.background_pages

**NOTE** Background pages are only supported on Chromium-based browsers.

All existing background pages in the context.

Returns
-------
List[Page]
)r   r   rF   background_pagesrH   s    rJ   r  BrowserContext.background_pages1  s     %%dnn&E&EFFrM   c                 V    [         R                  " U R                  R                  5      $ )zBrowserContext.service_workers

**NOTE** Service workers are only supported on Chromium-based browsers.

All existing service workers in the context.

Returns
-------
List[Worker]
)r   r   rF   service_workersrH   s    rJ   r  BrowserContext.service_workers1  s     %%dnn&D&DEErM   c                 V    [         R                  " U R                  R                  5      $ )z0BrowserContext.tracing

Returns
-------
Tracing
)r   r`   rF   tracingrH   s    rJ   r  BrowserContext.tracing1  s       !7!788rM   c                 V    [         R                  " U R                  R                  5      $ )zBrowserContext.request

API testing helper associated with this context. Requests made with this API will use context cookies.

Returns
-------
APIRequestContext
r   rH   s    rJ   r   BrowserContext.request1  r   rM   c                 V    [         R                  " U R                  R                  5      $ )zgBrowserContext.clock

Playwright has ability to mock clock and passage of time.

Returns
-------
Clock
rN  rH   s    rJ   rO  BrowserContext.clock1  r   rM   r   c                 \    [         R                  " U R                  R                  US95      $ )a	  BrowserContext.set_default_navigation_timeout

This setting will change the default maximum navigation time for the following methods and related shortcuts:
- `page.go_back()`
- `page.go_forward()`
- `page.goto()`
- `page.reload()`
- `page.set_content()`
- `page.expect_navigation()`

**NOTE** `page.set_default_navigation_timeout()` and `page.set_default_timeout()` take priority over
`browser_context.set_default_navigation_timeout()`.

Parameters
----------
timeout : float
    Maximum navigation time in milliseconds
r4  rj  r  s     rJ   rk  -BrowserContext.set_default_navigation_timeout1  s,    ( &&NN99'9J
 	
rM   c                 \    [         R                  " U R                  R                  US95      $ )a  BrowserContext.set_default_timeout

This setting will change the default maximum time for all the methods accepting `timeout` option.

**NOTE** `page.set_default_navigation_timeout()`, `page.set_default_timeout()` and
`browser_context.set_default_navigation_timeout()` take priority over
`browser_context.set_default_timeout()`.

Parameters
----------
timeout : float
    Maximum time in milliseconds. Pass `0` to disable timeout.
r4  rn  r  s     rJ   ro  "BrowserContext.set_default_timeout1  s,     &&NN..w.?
 	
rM   c                 z   #    [         R                  " U R                  R                  5       I Sh  vN 5      $  N7f)zZBrowserContext.new_page

Creates a new page in the browser context.

Returns
-------
Page
N)r   r`   rF   new_pagerH   s    rJ   r  BrowserContext.new_page1  s+        t~~'>'>'@!@AA!@ry   urlsc                    #    [         R                  " U R                  R                  [         R                  " U5      S9I Sh  vN 5      $  N7f)a  BrowserContext.cookies

If no URLs are specified, this method returns all cookies. If URLs are specified, only cookies that affect those
URLs are returned.

Parameters
----------
urls : Union[Sequence[str], str, None]
    Optional list of URLs.

Returns
-------
List[{name: str, value: str, domain: str, path: str, expires: float, httpOnly: bool, secure: bool, sameSite: Union["Lax", "None", "Strict"]}]
)r  N)r   r   rF   cookiesr   )rI   r  s     rJ   r  BrowserContext.cookies1  s>     $ %%..((good.C(DD
 	
Dr  r  c                    #    [         R                  " U R                  R                  [         R                  " U5      S9I Sh  vN 5      $  N7f)a)  BrowserContext.add_cookies

Adds cookies into this browser context. All pages within this context will have these cookies installed. Cookies
can be obtained via `browser_context.cookies()`.

**Usage**

```py
await browser_context.add_cookies([cookie_object1, cookie_object2])
```

Parameters
----------
cookies : Sequence[{name: str, value: str, url: Union[str, None], domain: Union[str, None], path: Union[str, None], expires: Union[float, None], httpOnly: Union[bool, None], secure: Union[bool, None], sameSite: Union["Lax", "None", "Strict", None]}]
)r  N)r   rE   rF   add_cookiesr   )rI   r  s     rJ   r   BrowserContext.add_cookies2  s>     " &&..,,W__W5M,NN
 	
Nr  r   domainr   r   r  r   c                z   #    [         R                  " U R                  R                  XUS9I Sh  vN 5      $  N7f)av  BrowserContext.clear_cookies

Removes cookies from context. Accepts optional filter.

**Usage**

```py
await context.clear_cookies()
await context.clear_cookies(name="session-id")
await context.clear_cookies(domain="my-origin.com")
await context.clear_cookies(path="/api/v1")
await context.clear_cookies(name="session-id", domain="my-origin.com")
```

Parameters
----------
name : Union[Pattern[str], str, None]
    Only removes cookies with the given name.
domain : Union[Pattern[str], str, None]
    Only removes cookies with the given domain.
path : Union[Pattern[str], str, None]
    Only removes cookies with the given path.
r  N)r   rE   rF   clear_cookies)rI   r   r  r   s       rJ   r  BrowserContext.clear_cookies$2  s7     > &&....Dd.SS
 	
Sry   )originpermissionsr  c                   #    [         R                  " U R                  R                  [         R                  " U5      US9I Sh  vN 5      $  N7f)a  BrowserContext.grant_permissions

Grants specified permissions to the browser context. Only grants corresponding permissions to the given origin if
specified.

Parameters
----------
permissions : Sequence[str]
    A list of permissions to grant.

    **NOTE** Supported permissions differ between browsers, and even between different versions of the same browser.
    Any permission may stop working after an update.

    Here are some permissions that may be supported by some browsers:
    - `'accelerometer'`
    - `'ambient-light-sensor'`
    - `'background-sync'`
    - `'camera'`
    - `'clipboard-read'`
    - `'clipboard-write'`
    - `'geolocation'`
    - `'gyroscope'`
    - `'magnetometer'`
    - `'microphone'`
    - `'midi-sysex'` (system-exclusive midi)
    - `'midi'`
    - `'notifications'`
    - `'payment-handler'`
    - `'storage-access'`
origin : Union[str, None]
    The [origin] to grant permissions to, e.g. "https://example.com".
)r  r  N)r   rE   rF   grant_permissionsr   )rI   r  r  s      rJ   r
   BrowserContext.grant_permissionsG2  sJ     H &&..22#OOK8 3  
 	
r  c                 z   #    [         R                  " U R                  R                  5       I Sh  vN 5      $  N7f)zBrowserContext.clear_permissions

Clears all permission overrides for the browser context.

**Usage**

```py
context = await browser.new_context()
await context.grant_permissions(["clipboard-read"])
# do stuff ..
context.clear_permissions()
```
N)r   rE   rF   clear_permissionsrH   s    rJ   r   BrowserContext.clear_permissionsq2  s+      &&T^^-M-M-O'OPP'Ory   geolocationc                 x   #    [         R                  " U R                  R                  US9I Sh  vN 5      $  N7f)a  BrowserContext.set_geolocation

Sets the context's geolocation. Passing `null` or `undefined` emulates position unavailable.

**Usage**

```py
await browser_context.set_geolocation({"latitude": 59.95, "longitude": 30.31667})
```

**NOTE** Consider using `browser_context.grant_permissions()` to grant permissions for the browser context
pages to read its geolocation.

Parameters
----------
geolocation : Union[{latitude: float, longitude: float, accuracy: Union[float, None]}, None]
)r  N)r   rE   rF   set_geolocation)rI   r  s     rJ   r  BrowserContext.set_geolocation2  s5     * &&..00[0II
 	
Ir   rs   c                    #    [         R                  " U R                  R                  [         R                  " U5      S9I Sh  vN 5      $  N7f)a  BrowserContext.set_extra_http_headers

The extra HTTP headers will be sent with every request initiated by any page in the context. These headers are
merged with page-specific extra HTTP headers set with `page.set_extra_http_headers()`. If page overrides a
particular header, page-specific header value will be used instead of the browser context header value.

**NOTE** `browser_context.set_extra_http_headers()` does not guarantee the order of headers in the outgoing
requests.

Parameters
----------
headers : Dict[str, str]
    An object containing additional HTTP headers to be sent with every request. All header values must be strings.
r  Nr  r  s     rJ   r  %BrowserContext.set_extra_http_headers2  sG       &&..770 8  
 	
r  offlinec                 x   #    [         R                  " U R                  R                  US9I Sh  vN 5      $  N7f)zBrowserContext.set_offline

Parameters
----------
offline : bool
    Whether to emulate network being offline for the browser context.
)r  N)r   rE   rF   set_offline)rI   r  s     rJ   r  BrowserContext.set_offline2  s5      &&..,,W,==
 	
=r   r  r  c                x   #    [         R                  " U R                  R                  XS9I Sh  vN 5      $  N7f)a  BrowserContext.add_init_script

Adds a script which would be evaluated in one of the following scenarios:
- Whenever a page is created in the browser context or is navigated.
- Whenever a child frame is attached or navigated in any page in the browser context. In this case, the script is
  evaluated in the context of the newly attached frame.

The script is evaluated after the document was created but before any of its scripts were run. This is useful to
amend the JavaScript environment, e.g. to seed `Math.random`.

**Usage**

An example of overriding `Math.random` before the page loads:

```py
# in your playwright script, assuming the preload.js file is in same directory.
await browser_context.add_init_script(path="preload.js")
```

**NOTE** The order of evaluation of multiple scripts installed via `browser_context.add_init_script()` and
`page.add_init_script()` is not defined.

Parameters
----------
script : Union[str, None]
    Script to be evaluated in all pages in the browser context. Optional.
path : Union[pathlib.Path, str, None]
    Path to the JavaScript file. If `path` is a relative path, then it is resolved relative to the current working
    directory. Optional.
r  Nr  r  s      rJ   r  BrowserContext.add_init_script2  r  r   r  r  r  c                   #    [         R                  " U R                  R                  XR	                  U5      US9I Sh  vN 5      $  N7f)a,  BrowserContext.expose_binding

The method adds a function called `name` on the `window` object of every frame in every page in the context. When
called, the function executes `callback` and returns a [Promise] which resolves to the return value of `callback`.
If the `callback` returns a [Promise], it will be awaited.

The first argument of the `callback` function contains information about the caller: `{ browserContext:
BrowserContext, page: Page, frame: Frame }`.

See `page.expose_binding()` for page-only version.

**Usage**

An example of exposing page URL to all frames in all pages in the context:

```py
import asyncio
from playwright.async_api import async_playwright, Playwright

async def run(playwright: Playwright):
    webkit = playwright.webkit
    browser = await webkit.launch(headless=False)
    context = await browser.new_context()
    await context.expose_binding("pageURL", lambda source: source["page"].url)
    page = await context.new_page()
    await page.set_content("""
    <script>
      async function onClick() {
        document.querySelector('div').textContent = await window.pageURL();
      }
    </script>
    <button onclick="onClick()">Click me</button>
    <div></div>
    """)
    await page.get_by_role("button").click()

async def main():
    async with async_playwright() as playwright:
        await run(playwright)
asyncio.run(main())
```

Parameters
----------
name : str
    Name of the function on the window object.
callback : Callable
    Callback function that will be called in the Playwright's context.
handle : Union[bool, None]
    Whether to pass the argument as a handle, instead of passing by value. When passing a handle, only one argument is
    supported. When passing by value, multiple arguments are supported.
    Deprecated: This option will be removed in the future.
r  Nr  r  s       rJ   r  BrowserContext.expose_binding2  sL     z &&..//$6$6x$@ 0  
 	
rC  c                    #    [         R                  " U R                  R                  XR	                  U5      S9I Sh  vN 5      $  N7f)a  BrowserContext.expose_function

The method adds a function called `name` on the `window` object of every frame in every page in the context. When
called, the function executes `callback` and returns a [Promise] which resolves to the return value of `callback`.

If the `callback` returns a [Promise], it will be awaited.

See `page.expose_function()` for page-only version.

**Usage**

An example of adding a `sha256` function to all pages in the context:

```py
import asyncio
import hashlib
from playwright.async_api import async_playwright, Playwright

def sha256(text: str) -> str:
    m = hashlib.sha256()
    m.update(bytes(text, "utf8"))
    return m.hexdigest()

async def run(playwright: Playwright):
    webkit = playwright.webkit
    browser = await webkit.launch(headless=False)
    context = await browser.new_context()
    await context.expose_function("sha256", sha256)
    page = await context.new_page()
    await page.set_content("""
        <script>
          async function onClick() {
            document.querySelector('div').textContent = await window.sha256('PLAYWRIGHT');
          }
        </script>
        <button onclick="onClick()">Click me</button>
        <div></div>
    """)
    await page.get_by_role("button").click()

async def main():
    async with async_playwright() as playwright:
        await run(playwright)
asyncio.run(main())
```

Parameters
----------
name : str
    Name of the function on the window object.
callback : Callable
    Callback function that will be called in the Playwright's context.
r  Nr  r  s      rJ   r  BrowserContext.expose_function*3  sJ     n &&..00$6$6x$@ 1  
 	
r  r  rG   r^  r6   r  c                   #    [         R                  " U R                  R                  U R	                  U5      U R	                  U5      US9I Sh  vN 5      $  N7f)aG	  BrowserContext.route

Routing provides the capability to modify network requests that are made by any page in the browser context. Once
route is enabled, every request matching the url pattern will stall unless it's continued, fulfilled or aborted.

**NOTE** `browser_context.route()` will not intercept requests intercepted by Service Worker. See
[this](https://github.com/microsoft/playwright/issues/1090) issue. We recommend disabling Service Workers when
using request interception by setting `serviceWorkers` to `'block'`.

**Usage**

An example of a naive handler that aborts all image requests:

```py
context = await browser.new_context()
page = await context.new_page()
await context.route("**/*.{png,jpg,jpeg}", lambda route: route.abort())
await page.goto("https://example.com")
await browser.close()
```

or the same snippet using a regex pattern instead:

```py
context = await browser.new_context()
page = await context.new_page()
await context.route(re.compile(r"(\.png$)|(\.jpg$)"), lambda route: route.abort())
page = await context.new_page()
await page.goto("https://example.com")
await browser.close()
```

It is possible to examine the request to decide the route action. For example, mocking all requests that contain
some post data, and leaving all other requests as is:

```py
async def handle_route(route: Route):
  if ("my-string" in route.request.post_data):
    await route.fulfill(body="mocked-data")
  else:
    await route.continue_()
await context.route("/api/**", handle_route)
```

Page routes (set up with `page.route()`) take precedence over browser context routes when request matches
both handlers.

To remove a route with its handler you can use `browser_context.unroute()`.

**NOTE** Enabling routing disables http cache.

Parameters
----------
url : Union[Callable[[str], bool], Pattern[str], str]
    A glob pattern, regex pattern, or predicate that receives a [URL] to match during routing. If `baseURL` is set in
    the context options and the provided URL is a string that does not start with `*`, it is resolved using the
    [`new URL()`](https://developer.mozilla.org/en-US/docs/Web/API/URL/URL) constructor.
handler : Union[Callable[[Route, Request], Any], Callable[[Route], Any]]
    handler function to route the request.
times : Union[int, None]
    How often a route should be used. By default it will be used every time.
r  Nr  r  s       rJ   r  BrowserContext.routeg3  s[     R &&..&&&&s+**73 '  
 	
r  c                    #    [         R                  " U R                  R                  U R	                  U5      U R	                  U5      S9I Sh  vN 5      $  N7f)a  BrowserContext.unroute

Removes a route created with `browser_context.route()`. When `handler` is not specified, removes all routes
for the `url`.

Parameters
----------
url : Union[Callable[[str], bool], Pattern[str], str]
    A glob pattern, regex pattern or predicate receiving [URL] used to register a routing with
    `browser_context.route()`.
handler : Union[Callable[[Route, Request], Any], Callable[[Route], Any], None]
    Optional handler function used to register a routing with `browser_context.route()`.
r  Nr  r  s      rJ   r  BrowserContext.unroute3  sV     0 &&..((&&s+T5G5G5P )  
 	
r  r8   c                    #    [         R                  " U R                  R                  U R	                  U5      U R	                  U5      S9I Sh  vN 5      $  N7f)a  BrowserContext.route_web_socket

This method allows to modify websocket connections that are made by any page in the browser context.

Note that only `WebSocket`s created after this method was called will be routed. It is recommended to call this
method before creating any pages.

**Usage**

Below is an example of a simple handler that blocks some websocket messages. See `WebSocketRoute` for more details
and examples.

```py
def message_handler(ws: WebSocketRoute, message: Union[str, bytes]):
  if message == "to-be-blocked":
    return
  ws.send(message)

async def handler(ws: WebSocketRoute):
  ws.route_send(lambda message: message_handler(ws, message))
  await ws.connect()

await context.route_web_socket("/ws", handler)
```

Parameters
----------
url : Union[Callable[[str], bool], Pattern[str], str]
    Only WebSockets with the url matching this pattern will be routed. A string pattern can be relative to the
    `baseURL` context option.
handler : Callable[[WebSocketRoute], Any]
    Handler function to route the WebSocket.
r  Nr  r  s      rJ   r  BrowserContext.route_web_socket3  sW     N &&..11&&s+T5G5G5P 2  
 	
r  r  r  r  c                x   #    [         R                  " U R                  R                  US9I Sh  vN 5      $  N7f)a  BrowserContext.unroute_all

Removes all routes created with `browser_context.route()` and `browser_context.route_from_har()`.

Parameters
----------
behavior : Union["default", "ignoreErrors", "wait", None]
    Specifies whether to wait for already running handlers and what to do if they throw errors:
    - `'default'` - do not wait for current handler calls (if any) to finish, if unrouted handler throws, it may
      result in unhandled error
    - `'wait'` - wait for current handler calls (if any) to finish
    - `'ignoreErrors'` - do not wait for current handler calls (if any) to finish, all errors thrown by the handlers
      after unrouting are silently caught
r  Nr  r  s     rJ   r  BrowserContext.unroute_all4  r  r   r  r  r	  r  r
  r  r  r  r  c                   #    [         R                  " U R                  R                  UUUUUUS9I Sh  vN 5      $  N7f)a  BrowserContext.route_from_har

If specified the network requests that are made in the context will be served from the HAR file. Read more about
[Replaying from HAR](https://playwright.dev/python/docs/mock#replaying-from-har).

Playwright will not serve requests intercepted by Service Worker from the HAR file. See
[this](https://github.com/microsoft/playwright/issues/1090) issue. We recommend disabling Service Workers when
using request interception by setting `serviceWorkers` to `'block'`.

Parameters
----------
har : Union[pathlib.Path, str]
    Path to a [HAR](http://www.softwareishard.com/blog/har-12-spec) file with prerecorded network data. If `path` is a
    relative path, then it is resolved relative to the current working directory.
url : Union[Pattern[str], str, None]
    A glob pattern, regular expression or predicate to match the request URL. Only requests with URL matching the
    pattern will be served from the HAR file. If not specified, all requests are served from the HAR file.
not_found : Union["abort", "fallback", None]
    - If set to 'abort' any request not found in the HAR file will be aborted.
    - If set to 'fallback' falls through to the next route handler in the handler chain.

    Defaults to abort.
update : Union[bool, None]
    If specified, updates the given HAR with the actual network information instead of serving from file. The file is
    written to disk when `browser_context.close()` is called.
update_content : Union["attach", "embed", None]
    Optional setting to control resource content management. If `attach` is specified, resources are persisted as
    separate files or entries in the ZIP archive. If `embed` is specified, content is stored inline the HAR file.
update_mode : Union["full", "minimal", None]
    When set to `minimal`, only record information necessary for routing from HAR. This omits sizes, timing, page,
    cookies, security and other types of HAR information that are not used when replaying from HAR. Defaults to
    `minimal`.
r  Nr  r  s          rJ   r  BrowserContext.route_from_har4  r  rg  r4  r5  c                z    [        U R                  R                  XR                  U5      US9R                  5      $ )a  BrowserContext.expect_event

Waits for event to fire and passes its value into the predicate function. Returns when the predicate returns truthy
value. Will throw an error if the context closes before the event is fired. Returns the event data value.

**Usage**

```py
async with context.expect_event("page") as event_info:
    await page.get_by_role("button").click()
page = await event_info.value
```

Parameters
----------
event : str
    Event name, same one would pass into `browserContext.on(event)`.
predicate : Union[Callable, None]
    Receives the event data and resolves to truthy value when the waiting should resolve.
timeout : Union[float, None]
    Maximum time to wait for in milliseconds. Defaults to `30000` (30 seconds). Pass `0` to disable timeout. The
    default value can be changed by using the `browser_context.set_default_timeout()`.

Returns
-------
EventContextManager
r7  r8  r<  s       rJ   r9  BrowserContext.expect_eventR4  r  rM   rS  rS  c                x   #    [         R                  " U R                  R                  US9I Sh  vN 5      $  N7f)a0  BrowserContext.close

Closes the browser context. All the pages that belong to the browser context will be closed.

**NOTE** The default browser context cannot be closed.

Parameters
----------
reason : Union[str, None]
    The reason to be reported to the operations interrupted by the context closure.
r+  NrU  rI   rS  s     rJ   r  BrowserContext.close{4  s0      &&T^^-A-A-A-P'PQQ'Pr   r   
indexed_dbr0  c                x   #    [         R                  " U R                  R                  XS9I Sh  vN 5      $  N7f)a  BrowserContext.storage_state

Returns storage state for this browser context, contains current cookies, local storage snapshot and IndexedDB
snapshot.

Parameters
----------
path : Union[pathlib.Path, str, None]
    The file path to save the storage state to. If `path` is a relative path, then it is resolved relative to current
    working directory. If no path is provided, storage state is still returned, but won't be saved to the disk.
indexed_db : Union[bool, None]
    Set to `true` to include [IndexedDB](https://developer.mozilla.org/en-US/docs/Web/API/IndexedDB_API) in the storage
    state snapshot. If your application uses IndexedDB to store authentication tokens, like Firebase Authentication,
    enable this.

Returns
-------
{cookies: List[{name: str, value: str, domain: str, path: str, expires: float, httpOnly: bool, secure: bool, sameSite: Union["Lax", "None", "Strict"]}], origins: List[{origin: str, localStorage: List[{name: str, value: str}]}]}
r   	indexedDBNr   r`   rF   storage_staterI   r   r0  s      rJ   r5  BrowserContext.storage_state4  s5     4   ....D.OO
 	
Or   c                   #    [         R                  " U R                  R                  XR	                  U5      US9I Sh  vN 5      $  N7f)a>  BrowserContext.wait_for_event

**NOTE** In most cases, you should use `browser_context.expect_event()`.

Waits for given `event` to fire. If predicate is provided, it passes event's value into the `predicate` function
and waits for `predicate(event)` to return a truthy value. Will throw an error if the browser context is closed
before the `event` is fired.

Parameters
----------
event : str
    Event name, same one typically passed into `*.on(event)`.
predicate : Union[Callable, None]
    Receives the event data and resolves to truthy value when the waiting should resolve.
timeout : Union[float, None]
    Maximum time to wait for in milliseconds. Defaults to `30000` (30 seconds). Pass `0` to disable timeout. The
    default value can be changed by using the `browser_context.set_default_timeout()`.

Returns
-------
Any
r7  Nr?  r<  s       rJ   r@  BrowserContext.wait_for_event4  rB  rC  c                z    [        U R                  R                  U R                  U5      US9R                  5      $ )aR  BrowserContext.expect_console_message

Performs action and waits for a `ConsoleMessage` to be logged by in the pages in the context. If predicate is
provided, it passes `ConsoleMessage` value into the `predicate` function and waits for `predicate(message)` to
return a truthy value. Will throw an error if the page is closed before the `browser_context.on('console')` event
is fired.

Parameters
----------
predicate : Union[Callable[[ConsoleMessage], bool], None]
    Receives the `ConsoleMessage` object and resolves to truthy value when the waiting should resolve.
timeout : Union[float, None]
    Maximum time to wait for in milliseconds. Defaults to `30000` (30 seconds). Pass `0` to disable timeout. The
    default value can be changed by using the `browser_context.set_default_timeout()`.

Returns
-------
EventContextManager[ConsoleMessage]
r  r  r  s      rJ   r  %BrowserContext.expect_console_message4  s=    4 (NN11,,Y7 2 f
 	
rM   c                z    [        U R                  R                  U R                  U5      US9R                  5      $ )a  BrowserContext.expect_page

Performs action and waits for a new `Page` to be created in the context. If predicate is provided, it passes `Page`
value into the `predicate` function and waits for `predicate(event)` to return a truthy value. Will throw an error
if the context closes before new `Page` is created.

Parameters
----------
predicate : Union[Callable[[Page], bool], None]
    Receives the `Page` object and resolves to truthy value when the waiting should resolve.
timeout : Union[float, None]
    Maximum time to wait for in milliseconds. Defaults to `30000` (30 seconds). Pass `0` to disable timeout. The
    default value can be changed by using the `browser_context.set_default_timeout()`.

Returns
-------
EventContextManager[Page]
r  )r   rF   expect_pager:  r;  r  s      rJ   r=  BrowserContext.expect_page4  s=    2 (NN&&,,Y7 ' f
 	
rM   )r9   r-   r"   c                 x   #    [         R                  " U R                  R                  US9I Sh  vN 5      $  N7f)ae  BrowserContext.new_cdp_session

**NOTE** CDP sessions are only supported on Chromium-based browsers.

Returns the newly created session.

Parameters
----------
page : Union[Frame, Page]
    Target to create new session for. For backwards-compatibility, this parameter is named `page`, but it can be a
    `Page` or `Frame` type.

Returns
-------
CDPSession
)r  N)r   r`   rF   new_cdp_session)rI   r  s     rJ   r@  BrowserContext.new_cdp_session5  s0     (   t~~'E'E4'E'P!PQQ!Pr   r   )rB   r=   r  r  r  r  r   )Ar   r   r   r   r   rI  r   rJ  r  r   r	  rK  r*  r   r   r  r   r  r  r  r  r   rO  r  rk  ro  r  r  r   r  r   r   rK  r  r
  r  r	   r  r   r  r   r  r
  r  r  r  r  r   r   r  r  r  r  r  r   r9  r  r   r5  r@  r  r=  r@  r   rL  rM  s   @rJ   r    r    0  s   __'( ??F8%QQR 
	  __6w6 ?? LL
6 
6 6 __y! ?? LL
 
 2 __$x $ ??H:'SST$ 
	$ $( __#v# ??F8%QQR# 
	# #4 __6z"6 ??J<)UUV6 
	6 6 __
y!
 ??I;(TTU
 
	
 
 __3'3 ??I;(TTU3 
	3 3 __?()? ??I;(TTU? 
	? ? __"z"" ??J<)UUV" 
	" " __F'F ??H:'SSTF 
	F F,, ??3V-=-=d-CT-I JJK, 
	, __'( ??F8%QQR 
	  __6w6 ?? LL
6 
6 6 __y! ?? LL
 
 2 __$x $ ??H:'SST$ 
	$ $( __#v# ??F8%QQR# 
	# #4 __6z"6 ??J<)UUV6 
	6 6 __
y!
 ??I;(TTU
 
	
 
 __3'3 ??I;(TTU3 
	3 3 __?()? ??I;(TTU? 
	? ? __"z"" ??J<)UUV" 
	" " __F'F ??H:'SSTF 
	F F.. ??3V-=-=d-CT-I JJK. 
	. 	<v{{6* 	< 	< 	B3 	B 	B G&++f"5 G G FX!6 F F 9 9 	9 	9 	7 	7
e 
 
0
5 
T 
&
B PT
OOFLLfooc6J1J$KL
	V	
,
)H 
T 
0 IMJNHL!
 oofll3s0C+CDE!
 S&..2E-E FG	!

 oofll3s0C+CDE!
 
!
H TX(
!??3/(
<BOOC<P(
	(
TQ$ ;?
!??;7
	
2
FKKS4I 
d 
,
 
$ 
 (,'
 BF	'
$'
 oofll3+<=>	'

 
'
\ )-A
A
 //A

 %A
 
A
F;
# ;
 ;
T ;
J '+O
\\#v~~c2FOOSE4K4PPQO
 OOWIvzz12OOWi0&**<=?
O
 s#O
 
O
r 
\\#v~~c2FOOSE4K4PPQ
 LL	6:: 56) 4fjj @AC

 

<+
\\#v~~c2FOOSE4K4PPQ+
 "2!3VZZ!?@+
 
	+
` QU
 //'*K"LM
 
	
8 HLCG(,FJCG5
\\',,+,5
 __V\\#v~~c/B*BCD	5

 ??7+>#?@5
 %5
 0A(BC5
 __W->%?@5
 
5
t 7;'

 +/'
'
 ??6??3'

 ''
 
"'
R =A RV__S%9 RT R$ BF,0	
 oofll3+<=>
 OOD)	

 

B 7;"

 +/"
"
 ??6??3"

 '"
 
"
L QU
 +/	
??6??4D3Et3K#LM
 '	

 
""2	3
D GK
 +/	
??6??F8T>#BC
 '	

 
"&	)
>RLL1R	R RrM   r    c                   |    \ rS rSr S	S\S\R                  \R                     S\R                  4S jjrS
S jr	Sr
g)r"   i%5  NrR   paramsrB   c                    #    [         R                  " U R                  R                  U[         R                  " U5      S9I Sh  vN 5      $  N7f)zCDPSession.send

Parameters
----------
method : str
    Protocol method name.
params : Union[Dict, None]
    Optional method parameters.

Returns
-------
Dict
)rR   rC  N)r   rE   rF   r\  r   )rI   rR   rC  s      rJ   r\  CDPSession.send'5  s@     " &&..%%VGOOF<S%TT
 	
Tr  c                 z   #    [         R                  " U R                  R                  5       I Sh  vN 5      $  N7f)zCDPSession.detach

Detaches the CDPSession from the target. Once detached, the CDPSession object won't emit any events and can't be
used to send messages.
N)r   rE   rF   detachrH   s    rJ   rG  CDPSession.detach<5  r  ry   r   r  r   )r   r   r   r   r   r   r   r   r\  rG  r   r   rM   rJ   r"   r"   %5  s=     CG

#)??6;;#?
	
*FrM   r"   c            K         ^  \ rS rSrS\S   S\R                  S /S4   SS4U 4S jjrS\S   S\R                  S /S4   SS4U 4S	 jjr\	S\R                  S
   4S j5       r\	SKS j5       r\	S\4S j5       rS\4S jrSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSS.$S\R"                  \   S\R"                  \   S\R"                  \   S\R"                  \   S\R"                  \   S\R"                  \   S\R"                  \   S\R"                  \   S\R"                  \   S\R"                  \   S\R"                  \R(                  \      S\R"                  \R*                  \\4      S\R"                  \   S\R"                  \   S\R"                  \   S\R"                  \   S \R"                  \   S!\R"                  \S"      S#\R"                  \S$      S%\R"                  \S&      S'\R"                  \S(      S)\R"                  \   S*\R"                  \   S+\R"                  \   S,\R"                  \R2                  \\R6                  4      S-\R"                  \   S.\R"                  \R2                  \\R6                  4      S/\R"                  \   S0\R"                  \R2                  \\\R6                  4      S1\R"                  \   S2\R"                  \   S3\R"                  \S4      S5\R"                  \R2                  \\R:                  \   4      S6\R"                  \S7      S8\R"                  \S9      S:\R"                  \R                  \      SS
4JS; jjrSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSS<.$S\R"                  \   S\R"                  \   S\R"                  \   S\R"                  \   S\R"                  \   S\R"                  \   S\R"                  \   S\R"                  \   S\R"                  \   S\R"                  \   S\R"                  \R(                  \      S\R"                  \R*                  \\4      S\R"                  \   S\R"                  \   S\R"                  \   S\R"                  \   S \R"                  \   S!\R"                  \S"      S%\R"                  \S&      S'\R"                  \S(      S#\R"                  \S$      S)\R"                  \   S*\R"                  \   S+\R"                  \   S,\R"                  \R2                  \\R6                  4      S-\R"                  \   S.\R"                  \R2                  \\R6                  4      S/\R"                  \   S0\R"                  \R2                  \\\R6                  4      S1\R"                  \   S2\R"                  \   S3\R"                  \S4      S5\R"                  \R2                  \\R:                  \   4      S6\R"                  \S7      S8\R"                  \S9      S:\R"                  \R                  \      SS=4JS> jjr SS?.S@\R"                  \   SS4SA jjr!SLSB jr"SSSSSC.SD\R"                  S=   SE\R"                  \R2                  \\R6                  4      SF\R"                  \   SG\R"                  \R(                  \      SS4
SH jjr#S\$4SI jr%SJr&U =r'$ )Mr   iI5  r  disconnectedr  r  rB   Nc                    > [         TU ]  XS9$ z
Emitted when Browser gets disconnected from the browser application. This might happen because of one of the
following:
- Browser application is closed or crashed.
- The `browser.close()` method was called.r#  r$  r&  s      rJ   r  
Browser.onK5  s     wzz++rM   c                    > [         TU ]  XS9$ rL  r0  r&  s      rJ   r*  Browser.onceW5  s     w|%|--rM   r    c                 V    [         R                  " U R                  R                  5      $ )a^  Browser.contexts

Returns an array of all open browser contexts. In a newly created browser, this will return zero browser contexts.

**Usage**

```py
browser = await pw.webkit.launch()
print(len(browser.contexts)) # prints `0`
context = await browser.new_context()
print(len(browser.contexts)) # prints `1`
```

Returns
-------
List[BrowserContext]
)r   r   rF   contextsrH   s    rJ   rQ  Browser.contextsc5  s    & %%dnn&=&=>>rM   c                 V    [         R                  " U R                  R                  5      $ )zBrowser.browser_type

Get the browser type (chromium, firefox or webkit) that the browser belongs to.

Returns
-------
BrowserType
)r   r`   rF   browser_typerH   s    rJ   rT  Browser.browser_typex5  s       !<!<==rM   c                 V    [         R                  " U R                  R                  5      $ )zCBrowser.version

Returns the browser version.

Returns
-------
str
)r   rE   rF   versionrH   s    rJ   rW  Browser.version5  r  rM   c                 ^    [         R                  " U R                  R                  5       5      $ )zUBrowser.is_connected

Indicates that the browser is connected.

Returns
-------
bool
)r   rE   rF   is_connectedrH   s    rJ   rZ  Browser.is_connected5  s"     &&t~~'B'B'DEErM   )$viewportr  no_viewportignore_https_errorsjava_script_enabled
bypass_csp
user_agentlocaletimezone_idr  r  extra_http_headersr  http_credentialsdevice_scale_factor	is_mobile	has_touchr  r  r  r  accept_downloadsdefault_browser_typeproxyrecord_har_pathrecord_har_omit_contentrecord_video_dirrecord_video_sizer5  base_urlstrict_selectorsr  record_har_url_filterrecord_har_moderecord_har_contentclient_certificatesr\  r  r]  r^  r_  r`  ra  rb  rc  r  r  rd  r  re  rf  rg  rh  r  r  r  r  r  r  r  r  ri  rj  rk  rl  rm  rn  ro  r5  rp  rq  r  r  blockrr  rs  r  rt  r  r  omitru  c       $   
        #    [         R                  " U R                  R                  " S&0 SU_SU_SU_SU_SU_SU_SU_SU_S	U	_S
U
_S[         R                  " U5      _S[         R                  " U5      _SU_SU_SU_SU_SU_SU_SU_SU_SU_SU_SU_SU_SU_SU_SU_SU_SU_SU_SU_S U _S!U!_S"U"_S#U#_S$U$_6I S%h  vN 5      $  N7f)'u)  Browser.new_context

Creates a new browser context. It won't share cookies/cache with other browser contexts.

**NOTE** If directly using this method to create `BrowserContext`s, it is best practice to explicitly close the
returned context via `browser_context.close()` when your code is done with the `BrowserContext`, and before
calling `browser.close()`. This will ensure the `context` is closed gracefully and any artifacts—like HARs
and videos—are fully flushed and saved.

**Usage**

```py
browser = await playwright.firefox.launch() # or "chromium" or "webkit".
# create a new incognito browser context.
context = await browser.new_context()
# create a new page in a pristine context.
page = await context.new_page()
await page.goto("https://example.com")

# gracefully close up everything
await context.close()
await browser.close()
```

Parameters
----------
viewport : Union[{width: int, height: int}, None]
    Sets a consistent viewport for each page. Defaults to an 1280x720 viewport. `no_viewport` disables the fixed
    viewport. Learn more about [viewport emulation](../emulation.md#viewport).
screen : Union[{width: int, height: int}, None]
    Emulates consistent window screen size available inside web page via `window.screen`. Is only used when the
    `viewport` is set.
no_viewport : Union[bool, None]
    Does not enforce fixed viewport, allows resizing window in the headed mode.
ignore_https_errors : Union[bool, None]
    Whether to ignore HTTPS errors when sending network requests. Defaults to `false`.
java_script_enabled : Union[bool, None]
    Whether or not to enable JavaScript in the context. Defaults to `true`. Learn more about
    [disabling JavaScript](../emulation.md#javascript-enabled).
bypass_csp : Union[bool, None]
    Toggles bypassing page's Content-Security-Policy. Defaults to `false`.
user_agent : Union[str, None]
    Specific user agent to use in this context.
locale : Union[str, None]
    Specify user locale, for example `en-GB`, `de-DE`, etc. Locale will affect `navigator.language` value,
    `Accept-Language` request header value as well as number and date formatting rules. Defaults to the system default
    locale. Learn more about emulation in our [emulation guide](../emulation.md#locale--timezone).
timezone_id : Union[str, None]
    Changes the timezone of the context. See
    [ICU's metaZones.txt](https://cs.chromium.org/chromium/src/third_party/icu/source/data/misc/metaZones.txt?rcl=faee8bc70570192d82d2978a71e2a615788597d1)
    for a list of supported timezone IDs. Defaults to the system timezone.
geolocation : Union[{latitude: float, longitude: float, accuracy: Union[float, None]}, None]
permissions : Union[Sequence[str], None]
    A list of permissions to grant to all pages in this context. See `browser_context.grant_permissions()` for
    more details. Defaults to none.
extra_http_headers : Union[Dict[str, str], None]
    An object containing additional HTTP headers to be sent with every request. Defaults to none.
offline : Union[bool, None]
    Whether to emulate network being offline. Defaults to `false`. Learn more about
    [network emulation](../emulation.md#offline).
http_credentials : Union[{username: str, password: str, origin: Union[str, None], send: Union["always", "unauthorized", None]}, None]
    Credentials for [HTTP authentication](https://developer.mozilla.org/en-US/docs/Web/HTTP/Authentication). If no
    origin is specified, the username and password are sent to any servers upon unauthorized responses.
device_scale_factor : Union[float, None]
    Specify device scale factor (can be thought of as dpr). Defaults to `1`. Learn more about
    [emulating devices with device scale factor](../emulation.md#devices).
is_mobile : Union[bool, None]
    Whether the `meta viewport` tag is taken into account and touch events are enabled. isMobile is a part of device,
    so you don't actually need to set it manually. Defaults to `false` and is not supported in Firefox. Learn more
    about [mobile emulation](../emulation.md#ismobile).
has_touch : Union[bool, None]
    Specifies if viewport supports touch events. Defaults to false. Learn more about
    [mobile emulation](../emulation.md#devices).
color_scheme : Union["dark", "light", "no-preference", "null", None]
    Emulates [prefers-colors-scheme](https://developer.mozilla.org/en-US/docs/Web/CSS/@media/prefers-color-scheme)
    media feature, supported values are `'light'` and `'dark'`. See `page.emulate_media()` for more details.
    Passing `'null'` resets emulation to system defaults. Defaults to `'light'`.
reduced_motion : Union["no-preference", "null", "reduce", None]
    Emulates `'prefers-reduced-motion'` media feature, supported values are `'reduce'`, `'no-preference'`. See
    `page.emulate_media()` for more details. Passing `'null'` resets emulation to system defaults. Defaults to
    `'no-preference'`.
forced_colors : Union["active", "none", "null", None]
    Emulates `'forced-colors'` media feature, supported values are `'active'`, `'none'`. See
    `page.emulate_media()` for more details. Passing `'null'` resets emulation to system defaults. Defaults to
    `'none'`.
contrast : Union["more", "no-preference", "null", None]
    Emulates `'prefers-contrast'` media feature, supported values are `'no-preference'`, `'more'`. See
    `page.emulate_media()` for more details. Passing `'null'` resets emulation to system defaults. Defaults to
    `'no-preference'`.
accept_downloads : Union[bool, None]
    Whether to automatically download all the attachments. Defaults to `true` where all the downloads are accepted.
proxy : Union[{server: str, bypass: Union[str, None], username: Union[str, None], password: Union[str, None]}, None]
    Network proxy settings to use with this context. Defaults to none.
record_har_path : Union[pathlib.Path, str, None]
    Enables [HAR](http://www.softwareishard.com/blog/har-12-spec) recording for all pages into the specified HAR file
    on the filesystem. If not specified, the HAR is not recorded. Make sure to call `browser_context.close()`
    for the HAR to be saved.
record_har_omit_content : Union[bool, None]
    Optional setting to control whether to omit request content from the HAR. Defaults to `false`.
record_video_dir : Union[pathlib.Path, str, None]
    Enables video recording for all pages into the specified directory. If not specified videos are not recorded. Make
    sure to call `browser_context.close()` for videos to be saved.
record_video_size : Union[{width: int, height: int}, None]
    Dimensions of the recorded videos. If not specified the size will be equal to `viewport` scaled down to fit into
    800x800. If `viewport` is not configured explicitly the video size defaults to 800x450. Actual picture of each page
    will be scaled down if necessary to fit the specified size.
storage_state : Union[pathlib.Path, str, {cookies: Sequence[{name: str, value: str, domain: str, path: str, expires: float, httpOnly: bool, secure: bool, sameSite: Union["Lax", "None", "Strict"]}], origins: Sequence[{origin: str, localStorage: Sequence[{name: str, value: str}]}]}, None]
    Learn more about [storage state and auth](../auth.md).

    Populates context with given storage state. This option can be used to initialize context with logged-in
    information obtained via `browser_context.storage_state()`.
base_url : Union[str, None]
    When using `page.goto()`, `page.route()`, `page.wait_for_url()`,
    `page.expect_request()`, or `page.expect_response()` it takes the base URL in consideration by
    using the [`URL()`](https://developer.mozilla.org/en-US/docs/Web/API/URL/URL) constructor for building the
    corresponding URL. Unset by default. Examples:
    - baseURL: `http://localhost:3000` and navigating to `/bar.html` results in `http://localhost:3000/bar.html`
    - baseURL: `http://localhost:3000/foo/` and navigating to `./bar.html` results in
      `http://localhost:3000/foo/bar.html`
    - baseURL: `http://localhost:3000/foo` (without trailing slash) and navigating to `./bar.html` results in
      `http://localhost:3000/bar.html`
strict_selectors : Union[bool, None]
    If set to true, enables strict selectors mode for this context. In the strict selectors mode all operations on
    selectors that imply single target DOM element will throw when more than one element matches the selector. This
    option does not affect any Locator APIs (Locators are always strict). Defaults to `false`. See `Locator` to learn
    more about the strict mode.
service_workers : Union["allow", "block", None]
    Whether to allow sites to register Service workers. Defaults to `'allow'`.
    - `'allow'`: [Service Workers](https://developer.mozilla.org/en-US/docs/Web/API/Service_Worker_API) can be
      registered.
    - `'block'`: Playwright will block all registration of Service Workers.
record_har_url_filter : Union[Pattern[str], str, None]
record_har_mode : Union["full", "minimal", None]
    When set to `minimal`, only record information necessary for routing from HAR. This omits sizes, timing, page,
    cookies, security and other types of HAR information that are not used when replaying from HAR. Defaults to `full`.
record_har_content : Union["attach", "embed", "omit", None]
    Optional setting to control resource content management. If `omit` is specified, content is not persisted. If
    `attach` is specified, resources are persisted as separate files and all of these files are archived along with the
    HAR file. Defaults to `embed`, which stores content inline the HAR file as per HAR specification.
client_certificates : Union[Sequence[{origin: str, certPath: Union[pathlib.Path, str, None], cert: Union[bytes, None], keyPath: Union[pathlib.Path, str, None], key: Union[bytes, None], pfxPath: Union[pathlib.Path, str, None], pfx: Union[bytes, None], passphrase: Union[str, None]}], None]
    TLS Client Authentication allows the server to request a client certificate and verify it.

    **Details**

    An array of client certificates to be used. Each certificate object must have either both `certPath` and `keyPath`,
    a single `pfxPath`, or their corresponding direct value equivalents (`cert` and `key`, or `pfx`). Optionally,
    `passphrase` property should be provided if the certificate is encrypted. The `origin` property should be provided
    with an exact match to the request origin that the certificate is valid for.

    **NOTE** When using WebKit on macOS, accessing `localhost` will not pick up client certificates. You can make it
    work by replacing `localhost` with `local.playwright`.


Returns
-------
BrowserContext
r\  r  
noViewportignoreHTTPSErrorsjavaScriptEnabled	bypassCSP	userAgentrb  
timezoneIdr  r  extraHTTPHeadersr  httpCredentialsdeviceScaleFactorisMobilehasTouchr  r  r  r  acceptDownloadsdefaultBrowserTyperk  recordHarPathrecordHarOmitContentrecordVideoDirrecordVideoSizestorageStatebaseURLstrictSelectorsserviceWorkersrecordHarUrlFilterrecordHarModerecordHarContentclientCertificatesNr   r   r`   rF   new_contextr   )%rI   r\  r  r]  r^  r_  r`  ra  rb  rc  r  r  rd  r  re  rf  rg  rh  r  r  r  r  ri  rj  rk  rl  rm  rn  ro  r5  rp  rq  r  rr  rs  rt  ru  s%                                        rJ   r  Browser.new_context5  s    \   ..,, %!%% '% #6	%
 #6% %% %% % '% (% $OOK8% ")1C!D%  % !1% #6%  #!%" ##%$ )%%& -'%( +)%* "+%, !1-%. $8/%0 1%2 .3%4 &=5%6  07%8 !29%: +;%< !=%> !1?%@  /A%B $9C%D .E%F "4G%H $7I% %'
 '	
%   CCC	C)$r\  r  r]  r^  r_  r`  ra  rb  rc  r  r  rd  r  re  rf  rg  rh  r  r  r  r  ri  rj  rk  rl  rm  rn  ro  r5  rp  rq  r  rr  rs  rt  ru  r9   c       $   
        #    [         R                  " U R                  R                  " S&0 SU_SU_SU_SU_SU_SU_SU_SU_S	U	_S
U
_S[         R                  " U5      _S[         R                  " U5      _SU_SU_SU_SU_SU_SU_SU_SU_SU_SU_SU_SU_SU_SU_SU_SU_SU_SU_SU_S U _S!U!_S"U"_S#U#_S$U$_6I S%h  vN 5      $  N7f)'a'  Browser.new_page

Creates a new page in a new browser context. Closing this page will close the context as well.

This is a convenience API that should only be used for the single-page scenarios and short snippets. Production
code and testing frameworks should explicitly create `browser.new_context()` followed by the
`browser_context.new_page()` to control their exact life times.

Parameters
----------
viewport : Union[{width: int, height: int}, None]
    Sets a consistent viewport for each page. Defaults to an 1280x720 viewport. `no_viewport` disables the fixed
    viewport. Learn more about [viewport emulation](../emulation.md#viewport).
screen : Union[{width: int, height: int}, None]
    Emulates consistent window screen size available inside web page via `window.screen`. Is only used when the
    `viewport` is set.
no_viewport : Union[bool, None]
    Does not enforce fixed viewport, allows resizing window in the headed mode.
ignore_https_errors : Union[bool, None]
    Whether to ignore HTTPS errors when sending network requests. Defaults to `false`.
java_script_enabled : Union[bool, None]
    Whether or not to enable JavaScript in the context. Defaults to `true`. Learn more about
    [disabling JavaScript](../emulation.md#javascript-enabled).
bypass_csp : Union[bool, None]
    Toggles bypassing page's Content-Security-Policy. Defaults to `false`.
user_agent : Union[str, None]
    Specific user agent to use in this context.
locale : Union[str, None]
    Specify user locale, for example `en-GB`, `de-DE`, etc. Locale will affect `navigator.language` value,
    `Accept-Language` request header value as well as number and date formatting rules. Defaults to the system default
    locale. Learn more about emulation in our [emulation guide](../emulation.md#locale--timezone).
timezone_id : Union[str, None]
    Changes the timezone of the context. See
    [ICU's metaZones.txt](https://cs.chromium.org/chromium/src/third_party/icu/source/data/misc/metaZones.txt?rcl=faee8bc70570192d82d2978a71e2a615788597d1)
    for a list of supported timezone IDs. Defaults to the system timezone.
geolocation : Union[{latitude: float, longitude: float, accuracy: Union[float, None]}, None]
permissions : Union[Sequence[str], None]
    A list of permissions to grant to all pages in this context. See `browser_context.grant_permissions()` for
    more details. Defaults to none.
extra_http_headers : Union[Dict[str, str], None]
    An object containing additional HTTP headers to be sent with every request. Defaults to none.
offline : Union[bool, None]
    Whether to emulate network being offline. Defaults to `false`. Learn more about
    [network emulation](../emulation.md#offline).
http_credentials : Union[{username: str, password: str, origin: Union[str, None], send: Union["always", "unauthorized", None]}, None]
    Credentials for [HTTP authentication](https://developer.mozilla.org/en-US/docs/Web/HTTP/Authentication). If no
    origin is specified, the username and password are sent to any servers upon unauthorized responses.
device_scale_factor : Union[float, None]
    Specify device scale factor (can be thought of as dpr). Defaults to `1`. Learn more about
    [emulating devices with device scale factor](../emulation.md#devices).
is_mobile : Union[bool, None]
    Whether the `meta viewport` tag is taken into account and touch events are enabled. isMobile is a part of device,
    so you don't actually need to set it manually. Defaults to `false` and is not supported in Firefox. Learn more
    about [mobile emulation](../emulation.md#ismobile).
has_touch : Union[bool, None]
    Specifies if viewport supports touch events. Defaults to false. Learn more about
    [mobile emulation](../emulation.md#devices).
color_scheme : Union["dark", "light", "no-preference", "null", None]
    Emulates [prefers-colors-scheme](https://developer.mozilla.org/en-US/docs/Web/CSS/@media/prefers-color-scheme)
    media feature, supported values are `'light'` and `'dark'`. See `page.emulate_media()` for more details.
    Passing `'null'` resets emulation to system defaults. Defaults to `'light'`.
forced_colors : Union["active", "none", "null", None]
    Emulates `'forced-colors'` media feature, supported values are `'active'`, `'none'`. See
    `page.emulate_media()` for more details. Passing `'null'` resets emulation to system defaults. Defaults to
    `'none'`.
contrast : Union["more", "no-preference", "null", None]
    Emulates `'prefers-contrast'` media feature, supported values are `'no-preference'`, `'more'`. See
    `page.emulate_media()` for more details. Passing `'null'` resets emulation to system defaults. Defaults to
    `'no-preference'`.
reduced_motion : Union["no-preference", "null", "reduce", None]
    Emulates `'prefers-reduced-motion'` media feature, supported values are `'reduce'`, `'no-preference'`. See
    `page.emulate_media()` for more details. Passing `'null'` resets emulation to system defaults. Defaults to
    `'no-preference'`.
accept_downloads : Union[bool, None]
    Whether to automatically download all the attachments. Defaults to `true` where all the downloads are accepted.
proxy : Union[{server: str, bypass: Union[str, None], username: Union[str, None], password: Union[str, None]}, None]
    Network proxy settings to use with this context. Defaults to none.
record_har_path : Union[pathlib.Path, str, None]
    Enables [HAR](http://www.softwareishard.com/blog/har-12-spec) recording for all pages into the specified HAR file
    on the filesystem. If not specified, the HAR is not recorded. Make sure to call `browser_context.close()`
    for the HAR to be saved.
record_har_omit_content : Union[bool, None]
    Optional setting to control whether to omit request content from the HAR. Defaults to `false`.
record_video_dir : Union[pathlib.Path, str, None]
    Enables video recording for all pages into the specified directory. If not specified videos are not recorded. Make
    sure to call `browser_context.close()` for videos to be saved.
record_video_size : Union[{width: int, height: int}, None]
    Dimensions of the recorded videos. If not specified the size will be equal to `viewport` scaled down to fit into
    800x800. If `viewport` is not configured explicitly the video size defaults to 800x450. Actual picture of each page
    will be scaled down if necessary to fit the specified size.
storage_state : Union[pathlib.Path, str, {cookies: Sequence[{name: str, value: str, domain: str, path: str, expires: float, httpOnly: bool, secure: bool, sameSite: Union["Lax", "None", "Strict"]}], origins: Sequence[{origin: str, localStorage: Sequence[{name: str, value: str}]}]}, None]
    Learn more about [storage state and auth](../auth.md).

    Populates context with given storage state. This option can be used to initialize context with logged-in
    information obtained via `browser_context.storage_state()`.
base_url : Union[str, None]
    When using `page.goto()`, `page.route()`, `page.wait_for_url()`,
    `page.expect_request()`, or `page.expect_response()` it takes the base URL in consideration by
    using the [`URL()`](https://developer.mozilla.org/en-US/docs/Web/API/URL/URL) constructor for building the
    corresponding URL. Unset by default. Examples:
    - baseURL: `http://localhost:3000` and navigating to `/bar.html` results in `http://localhost:3000/bar.html`
    - baseURL: `http://localhost:3000/foo/` and navigating to `./bar.html` results in
      `http://localhost:3000/foo/bar.html`
    - baseURL: `http://localhost:3000/foo` (without trailing slash) and navigating to `./bar.html` results in
      `http://localhost:3000/bar.html`
strict_selectors : Union[bool, None]
    If set to true, enables strict selectors mode for this context. In the strict selectors mode all operations on
    selectors that imply single target DOM element will throw when more than one element matches the selector. This
    option does not affect any Locator APIs (Locators are always strict). Defaults to `false`. See `Locator` to learn
    more about the strict mode.
service_workers : Union["allow", "block", None]
    Whether to allow sites to register Service workers. Defaults to `'allow'`.
    - `'allow'`: [Service Workers](https://developer.mozilla.org/en-US/docs/Web/API/Service_Worker_API) can be
      registered.
    - `'block'`: Playwright will block all registration of Service Workers.
record_har_url_filter : Union[Pattern[str], str, None]
record_har_mode : Union["full", "minimal", None]
    When set to `minimal`, only record information necessary for routing from HAR. This omits sizes, timing, page,
    cookies, security and other types of HAR information that are not used when replaying from HAR. Defaults to `full`.
record_har_content : Union["attach", "embed", "omit", None]
    Optional setting to control resource content management. If `omit` is specified, content is not persisted. If
    `attach` is specified, resources are persisted as separate files and all of these files are archived along with the
    HAR file. Defaults to `embed`, which stores content inline the HAR file as per HAR specification.
client_certificates : Union[Sequence[{origin: str, certPath: Union[pathlib.Path, str, None], cert: Union[bytes, None], keyPath: Union[pathlib.Path, str, None], key: Union[bytes, None], pfxPath: Union[pathlib.Path, str, None], pfx: Union[bytes, None], passphrase: Union[str, None]}], None]
    TLS Client Authentication allows the server to request a client certificate and verify it.

    **Details**

    An array of client certificates to be used. Each certificate object must have either both `certPath` and `keyPath`,
    a single `pfxPath`, or their corresponding direct value equivalents (`cert` and `key`, or `pfx`). Optionally,
    `passphrase` property should be provided if the certificate is encrypted. The `origin` property should be provided
    with an exact match to the request origin that the certificate is valid for.

    **NOTE** When using WebKit on macOS, accessing `localhost` will not pick up client certificates. You can make it
    work by replacing `localhost` with `local.playwright`.


Returns
-------
Page
r\  r  r{  r|  r}  r~  r  rb  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  rk  r  r  r  r  r  r  r  r  r  r  r  r  Nr   )r   r`   rF   r  r   )%rI   r\  r  r]  r^  r_  r`  ra  rb  rc  r  r  rd  r  re  rf  rg  rh  r  r  r  r  ri  rj  rk  rl  rm  rn  ro  r5  rp  rq  r  rr  rs  rt  ru  s%                                        rJ   r  Browser.new_page6  s    |   ..)) %!%% '% #6	%
 #6% %% %% % '% (% $OOK8% ")1C!D%  % !1% #6%  #!%" ##%$ )%%& +'%( ")%* -+%, !1-%. $8/%0 1%2 .3%4 &=5%6  07%8 !29%: +;%< !=%> !1?%@  /A%B $9C%D .E%F "4G%H $7I% %'
 '	
%r  r+  rS  c                x   #    [         R                  " U R                  R                  US9I Sh  vN 5      $  N7f)a  Browser.close

In case this browser is obtained using `browser_type.launch()`, closes the browser and all of its pages (if
any were opened).

In case this browser is connected to, clears all created contexts belonging to this browser and disconnects from
the browser server.

**NOTE** This is similar to force-quitting the browser. To close pages gracefully and ensure you receive page close
events, call `browser_context.close()` on any `BrowserContext` instances you explicitly created earlier
using `browser.new_context()` **before** calling `browser.close()`.

The `Browser` object itself is considered to be disposed and cannot be used anymore.

Parameters
----------
reason : Union[str, None]
    The reason to be reported to the operations interrupted by the browser closure.
r+  NrU  r-  s     rJ   r  Browser.closez7  s0     * &&T^^-A-A-A-P'PQQ'Pr   c                 z   #    [         R                  " U R                  R                  5       I Sh  vN 5      $  N7f)zBrowser.new_browser_cdp_session

**NOTE** CDP Sessions are only supported on Chromium-based browsers.

Returns the newly created browser session.

Returns
-------
CDPSession
N)r   r`   rF   new_browser_cdp_sessionrH   s    rJ   r  Browser.new_browser_cdp_session7  s+        t~~'M'M'O!OPP!Ory   r  r   screenshots
categoriesr  r   r  r  c          
         #    [         R                  " U R                  R                  U(       a  UR                  OSUU[         R                  " U5      S9I Sh  vN 5      $  N7f)a  Browser.start_tracing

**NOTE** This API controls
[Chromium Tracing](https://www.chromium.org/developers/how-tos/trace-event-profiling-tool) which is a low-level
chromium-specific debugging tool. API to control [Playwright Tracing](https://playwright.dev/python/docs/trace-viewer) could be found
[here](https://playwright.dev/python/docs/api/class-tracing).

You can use `browser.start_tracing()` and `browser.stop_tracing()` to create a trace file that can be
opened in Chrome DevTools performance panel.

**Usage**

```py
await browser.start_tracing(page, path="trace.json")
await page.goto("https://www.google.com")
await browser.stop_tracing()
```

Parameters
----------
page : Union[Page, None]
    Optional, if specified, tracing includes screenshots of the given page.
path : Union[pathlib.Path, str, None]
    A path to write the trace file to.
screenshots : Union[bool, None]
    captures screenshots in the trace.
categories : Union[Sequence[str], None]
    specify custom categories to use instead of default.
Nr  )r   rE   rF   start_tracingr   )rI   r  r   r  r  s        rJ   r  Browser.start_tracing7  sY     L &&....'+T^^'"??:6	 /  
 	
s   AA$A"	A$c                 z   #    [         R                  " U R                  R                  5       I Sh  vN 5      $  N7f)a  Browser.stop_tracing

**NOTE** This API controls
[Chromium Tracing](https://www.chromium.org/developers/how-tos/trace-event-profiling-tool) which is a low-level
chromium-specific debugging tool. API to control [Playwright Tracing](https://playwright.dev/python/docs/trace-viewer) could be found
[here](https://playwright.dev/python/docs/api/class-tracing).

Returns the buffer with trace data.

Returns
-------
bytes
N)r   rE   rF   stop_tracingrH   s    rJ   r  Browser.stop_tracing7  s+      &&T^^-H-H-J'JKK'Jry   r   rB   r!   )rB   r"   )(r   r   r   r   r   r   rJ  r  r*  r   r   rQ  rT  r   rW  r   rZ  r   r   r	   r  r   r
   r  r   r	  r
  r  r   rK  r   r  r  r  r  r  r   r  r   rL  rM  s   @rJ   r   r   I5  s	   
,~&
, ??I;(TTU
, 
	
,
.~&
. ??I;(TTU
. 
	
. ?&++&67 ? ?( 	> 	> 	? 	? 	?
Fd 
F 3704-15959,0+/'+,048=AEI)-=A6:+/+/  LPNR265904LP9=MQ;? )-26FJ GKRVOS]u
 //,/u
 -	u

 __T*u
 $__T2u
 $__T2u
 OOD)u
 OOC(u
 $u
 __S)u
 __[1u
 __V__S%9:u
 #OOFKKS,ABu
 &u
  !///:!u
" $__U3#u
$ ??4(%u
& ??4('u
( oo<=
)u
. 56
/u
4 w/G'HI5u
6 //'*I"JK7u
8 !//$/9u
: %ooc2;u
< }-=u
>  c7<<6G)HI?u
@ "(!6Au
B !//&,,sGLL7H*IJCu
D "??<8Eu
F LLsGLL89
Gu
L //#&Mu
N !//$/Ou
P  1A)BCQu
R  &LLfnnS112 
Su
X  1B)CDYu
Z #OOG4M,NO[u
\ $__V[[9J-KL]u
^ 
_u
t 3704-15959,0+/'+,048=AEI)-=A6:+/+/ LPNR 265904LP9=MQ;? )-26FJ GKRVOS]e
 //,/e
 -	e

 __T*e
 $__T2e
 $__T2e
 OOD)e
 OOC(e
 $e
 __S)e
 __[1e
 __V__S%9:e
 #OOFKKS,ABe
 &e
  !///:!e
" $__U3#e
$ ??4(%e
& ??4('e
( oo<=
)e
. w/G'HI/e
0 //'*I"JK1e
2 56
3e
8 !//$/9e
: %ooc2;e
< }-=e
>  c7<<6G)HI?e
@ "(!6Ae
B !//&,,sGLL7H*IJCe
D "??<8Ee
F LLsGLL89
Ge
L //#&Me
N !//$/Oe
P  1A)BCQe
R  &LLfnnS112 
Se
X  1B)CDYe
Z #OOG4M,NO[e
\ $__V[[9J-KL]e
^ 
_e
N =A RV__S%9 RT R.Q" )-AE-1<@-
 oof%-
 oofll3+<=>	-

 __T*-
 OOFOOC$89-
 
-
^LE L LrM   r   c            i       .   \ rS rSr\S\4S j5       r\S\4S j5       rSSSSSSSSSSSSSSSSSS.S\R                  \R                  \\R                  4      S\R                  \   S	\R                  \R                  \      S
\R                  \R                  \\R                  \   4      S\R                  \   S\R                  \   S\R                  \   S\R                  \   S\R                  \R                   \\R                  \\\4   4      S\R                  \   S\R                  \   S\R                  \   S\R                  \R                  \\R                  4      S\R                  \   S\R                  \R                  \\R                  4      S\R                  \   S\R                  \R                   \\R                  \\\4   4      SS4$S jjrSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSS.2S\R                  \\R                  4   S\R                  \   S\R                  \R                  \\R                  4      S	\R                  \R                  \      S
\R                  \R                  \\R                  \   4      S\R                  \   S\R                  \   S\R                  \   S\R                  \   S\R                  \R                   \\R                  \\\4   4      S\R                  \   S\R                  \   S\R                  \   S\R                  \R                  \\R                  4      S\R                  \   S\R                  \   S\R                  \   S\R                  \   S\R                  \   S \R                  \   S!\R                  \   S"\R                  \   S#\R                  \   S$\R                  \   S%\R                  \   S&\R                  \R                  \      S'\R                  \R                   \\4      S(\R                  \   S)\R                  \   S*\R                  \   S+\R                  \   S,\R                  \   S-\R                  \S.      S/\R                  \S0      S1\R                  \S2      S3\R                  \S4      S5\R                  \   S\R                  \R                  \\R                  4      S\R                  \   S\R                  \R                   \\R                  \\\4   4      S6\R                  \R                  \\R                  4      S7\R                  \   S8\R                  \R                  \\R                  4      S9\R                  \   S:\R                  \   S;\R                  \   S<\R                  \S=      S>\R                  \R                  \\R.                  \   4      S?\R                  \S@      SA\R                  \SB      SC\R                  \R0                  \      SSD4hSE jjrSSSSF.SG\S\R                  \   S\R                  \   SH\R                  \R                   \\4      SS4
SI jjrSSSSSJ.SK\S\R                  \   S\R                  \   SH\R                  \R                   \\4      SL\R                  \   SS4SM jjrSNrg)Or!   i7  rB   c                 V    [         R                  " U R                  R                  5      $ )zsBrowserType.name

Returns browser name. For example: `'chromium'`, `'webkit'` or `'firefox'`.

Returns
-------
str
r  rH   s    rJ   r   BrowserType.name7  r  rM   c                 V    [         R                  " U R                  R                  5      $ )zxBrowserType.executable_path

A path where Playwright expects to find a bundled browser executable.

Returns
-------
str
)r   rE   rF   executable_pathrH   s    rJ   r  BrowserType.executable_path7  s     &&t~~'E'EFFrM   N)r  channelr  ignore_default_argshandle_siginthandle_sigtermhandle_sighupr   envheadlessdevtoolsrk  downloads_pathslow_mo
traces_dirchromium_sandboxfirefox_user_prefsr  r  r  r  r  r  r  r   r  r  r  rk  r  r  r  r  r  r   c                8  #    [         R                  " U R                  R                  UU[         R                  " U5      [         R                  " U5      UUUU[         R                  " U	5      U
UUUUUU[         R                  " U5      S9I Sh  vN 5      $  N7f)a  BrowserType.launch

Returns the browser instance.

**Usage**

You can use `ignoreDefaultArgs` to filter out `--mute-audio` from default arguments:

```py
browser = await playwright.chromium.launch( # or "firefox" or "webkit".
    ignore_default_args=["--mute-audio"]
)
```

> **Chromium-only** Playwright can also be used to control the Google Chrome or Microsoft Edge browsers, but it
works best with the version of Chromium it is bundled with. There is no guarantee it will work with any other
version. Use `executablePath` option with extreme caution.
>
> If Google Chrome (rather than Chromium) is preferred, a
[Chrome Canary](https://www.google.com/chrome/browser/canary.html) or
[Dev Channel](https://www.chromium.org/getting-involved/dev-channel) build is suggested.
>
> Stock browsers like Google Chrome and Microsoft Edge are suitable for tests that require proprietary media codecs
for video playback. See
[this article](https://www.howtogeek.com/202825/what%E2%80%99s-the-difference-between-chromium-and-chrome/) for
other differences between Chromium and Chrome.
[This article](https://chromium.googlesource.com/chromium/src/+/lkgr/docs/chromium_browser_vs_google_chrome.md)
describes some differences for Linux users.

Parameters
----------
executable_path : Union[pathlib.Path, str, None]
    Path to a browser executable to run instead of the bundled one. If `executablePath` is a relative path, then it is
    resolved relative to the current working directory. Note that Playwright only works with the bundled Chromium,
    Firefox or WebKit, use at your own risk.
channel : Union[str, None]
    Browser distribution channel.

    Use "chromium" to [opt in to new headless mode](../browsers.md#chromium-new-headless-mode).

    Use "chrome", "chrome-beta", "chrome-dev", "chrome-canary", "msedge", "msedge-beta", "msedge-dev", or
    "msedge-canary" to use branded [Google Chrome and Microsoft Edge](../browsers.md#google-chrome--microsoft-edge).
args : Union[Sequence[str], None]
    **NOTE** Use custom browser args at your own risk, as some of them may break Playwright functionality.

    Additional arguments to pass to the browser instance. The list of Chromium flags can be found
    [here](https://peter.sh/experiments/chromium-command-line-switches/).
ignore_default_args : Union[Sequence[str], bool, None]
    If `true`, Playwright does not pass its own configurations args and only uses the ones from `args`. If an array is
    given, then filters out the given default arguments. Dangerous option; use with care. Defaults to `false`.
handle_sigint : Union[bool, None]
    Close the browser process on Ctrl-C. Defaults to `true`.
handle_sigterm : Union[bool, None]
    Close the browser process on SIGTERM. Defaults to `true`.
handle_sighup : Union[bool, None]
    Close the browser process on SIGHUP. Defaults to `true`.
timeout : Union[float, None]
    Maximum time in milliseconds to wait for the browser instance to start. Defaults to `30000` (30 seconds). Pass `0`
    to disable timeout.
env : Union[Dict[str, Union[bool, float, str]], None]
    Specify environment variables that will be visible to the browser. Defaults to `process.env`.
headless : Union[bool, None]
    Whether to run browser in headless mode. More details for
    [Chromium](https://developers.google.com/web/updates/2017/04/headless-chrome) and
    [Firefox](https://hacks.mozilla.org/2017/12/using-headless-mode-in-firefox/). Defaults to `true` unless the
    `devtools` option is `true`.
devtools : Union[bool, None]
    **Chromium-only** Whether to auto-open a Developer Tools panel for each tab. If this option is `true`, the
    `headless` option will be set `false`.
    Deprecated: Use [debugging tools](../debug.md) instead.
proxy : Union[{server: str, bypass: Union[str, None], username: Union[str, None], password: Union[str, None]}, None]
    Network proxy settings.
downloads_path : Union[pathlib.Path, str, None]
    If specified, accepted downloads are downloaded into this directory. Otherwise, temporary directory is created and
    is deleted when browser is closed. In either case, the downloads are deleted when the browser context they were
    created in is closed.
slow_mo : Union[float, None]
    Slows down Playwright operations by the specified amount of milliseconds. Useful so that you can see what is going
    on.
traces_dir : Union[pathlib.Path, str, None]
    If specified, traces are saved into this directory.
chromium_sandbox : Union[bool, None]
    Enable Chromium sandboxing. Defaults to `false`.
firefox_user_prefs : Union[Dict[str, Union[bool, float, str]], None]
    Firefox user preferences. Learn more about the Firefox user preferences at
    [`about:config`](https://support.mozilla.org/en-US/kb/about-config-editor-firefox).

Returns
-------
Browser
)executablePathr  r  ignoreDefaultArgshandleSIGINThandleSIGTERMhandleSIGHUPr   r  r  r  rk  downloadsPathslowMo	tracesDirchromiumSandboxfirefoxUserPrefsN)r   r`   rF   launchr   )rI   r  r  r  r  r  r  r  r   r  r  r  rk  r  r  r  r  r  s                     rJ   r  BrowserType.launch7  s     j   ..''.__T*")//2E"F*,*OOC(!!,$ 0!(1C!D# (  
 	
s   BBB	B)2r  r  r  r  r  r  r  r   r  r  r  rk  r  r  r\  r  r]  r^  r_  r`  ra  rb  rc  r  r  rd  r  re  rf  rg  rh  r  r  r  r  ri  r  r  r  rl  rm  rn  ro  rp  rq  r  rr  rs  rt  ru  user_data_dirr\  r  r]  r^  r_  r`  ra  rb  rc  r  r  rd  r  re  rf  rg  rh  r  r  r  r  r  r  r  r  ri  rl  rm  rn  ro  rp  rq  r  rv  rr  rs  r  rt  rx  ru  r    c       2   
        #    [         R                  " U R                  R                  " S50 SU_SU_SU_S[         R                  " U5      _S[         R                  " U5      _SU_SU_SU_S	U	_S
[         R                  " U
5      _SU_SU_SU_SU_SU_SU_SU_SU_SU_SU_SU_SU_SU_SU_SU_S[         R                  " U5      _S[         R                  " U5      _SU_SU_SU_SU_S U _S!U!_S"U"_S#U#_S$U$_S%U%_S&U&_S'U'_S([         R                  " U(5      _S)U)_S*U*_S+U+_S,U,_S-U-_S.U._S/U/_S0U0_S1U1_S2U2_S3U3_6I S4h  vN 5      $  N7f)6a4  BrowserType.launch_persistent_context

Returns the persistent browser context instance.

Launches browser that uses persistent storage located at `userDataDir` and returns the only context. Closing this
context will automatically close the browser.

Parameters
----------
user_data_dir : Union[pathlib.Path, str]
    Path to a User Data Directory, which stores browser session data like cookies and local storage. Pass an empty
    string to create a temporary directory.

    More details for
    [Chromium](https://chromium.googlesource.com/chromium/src/+/master/docs/user_data_dir.md#introduction) and
    [Firefox](https://wiki.mozilla.org/Firefox/CommandLineOptions#User_profile). Chromium's user data directory is the
    **parent** directory of the "Profile Path" seen at `chrome://version`.

    Note that browsers do not allow launching multiple instances with the same User Data Directory.
channel : Union[str, None]
    Browser distribution channel.

    Use "chromium" to [opt in to new headless mode](../browsers.md#chromium-new-headless-mode).

    Use "chrome", "chrome-beta", "chrome-dev", "chrome-canary", "msedge", "msedge-beta", "msedge-dev", or
    "msedge-canary" to use branded [Google Chrome and Microsoft Edge](../browsers.md#google-chrome--microsoft-edge).
executable_path : Union[pathlib.Path, str, None]
    Path to a browser executable to run instead of the bundled one. If `executablePath` is a relative path, then it is
    resolved relative to the current working directory. Note that Playwright only works with the bundled Chromium,
    Firefox or WebKit, use at your own risk.
args : Union[Sequence[str], None]
    **NOTE** Use custom browser args at your own risk, as some of them may break Playwright functionality.

    Additional arguments to pass to the browser instance. The list of Chromium flags can be found
    [here](https://peter.sh/experiments/chromium-command-line-switches/).
ignore_default_args : Union[Sequence[str], bool, None]
    If `true`, Playwright does not pass its own configurations args and only uses the ones from `args`. If an array is
    given, then filters out the given default arguments. Dangerous option; use with care. Defaults to `false`.
handle_sigint : Union[bool, None]
    Close the browser process on Ctrl-C. Defaults to `true`.
handle_sigterm : Union[bool, None]
    Close the browser process on SIGTERM. Defaults to `true`.
handle_sighup : Union[bool, None]
    Close the browser process on SIGHUP. Defaults to `true`.
timeout : Union[float, None]
    Maximum time in milliseconds to wait for the browser instance to start. Defaults to `30000` (30 seconds). Pass `0`
    to disable timeout.
env : Union[Dict[str, Union[bool, float, str]], None]
    Specify environment variables that will be visible to the browser. Defaults to `process.env`.
headless : Union[bool, None]
    Whether to run browser in headless mode. More details for
    [Chromium](https://developers.google.com/web/updates/2017/04/headless-chrome) and
    [Firefox](https://hacks.mozilla.org/2017/12/using-headless-mode-in-firefox/). Defaults to `true` unless the
    `devtools` option is `true`.
devtools : Union[bool, None]
    **Chromium-only** Whether to auto-open a Developer Tools panel for each tab. If this option is `true`, the
    `headless` option will be set `false`.
    Deprecated: Use [debugging tools](../debug.md) instead.
proxy : Union[{server: str, bypass: Union[str, None], username: Union[str, None], password: Union[str, None]}, None]
    Network proxy settings.
downloads_path : Union[pathlib.Path, str, None]
    If specified, accepted downloads are downloaded into this directory. Otherwise, temporary directory is created and
    is deleted when browser is closed. In either case, the downloads are deleted when the browser context they were
    created in is closed.
slow_mo : Union[float, None]
    Slows down Playwright operations by the specified amount of milliseconds. Useful so that you can see what is going
    on.
viewport : Union[{width: int, height: int}, None]
    Sets a consistent viewport for each page. Defaults to an 1280x720 viewport. `no_viewport` disables the fixed
    viewport. Learn more about [viewport emulation](../emulation.md#viewport).
screen : Union[{width: int, height: int}, None]
    Emulates consistent window screen size available inside web page via `window.screen`. Is only used when the
    `viewport` is set.
no_viewport : Union[bool, None]
    Does not enforce fixed viewport, allows resizing window in the headed mode.
ignore_https_errors : Union[bool, None]
    Whether to ignore HTTPS errors when sending network requests. Defaults to `false`.
java_script_enabled : Union[bool, None]
    Whether or not to enable JavaScript in the context. Defaults to `true`. Learn more about
    [disabling JavaScript](../emulation.md#javascript-enabled).
bypass_csp : Union[bool, None]
    Toggles bypassing page's Content-Security-Policy. Defaults to `false`.
user_agent : Union[str, None]
    Specific user agent to use in this context.
locale : Union[str, None]
    Specify user locale, for example `en-GB`, `de-DE`, etc. Locale will affect `navigator.language` value,
    `Accept-Language` request header value as well as number and date formatting rules. Defaults to the system default
    locale. Learn more about emulation in our [emulation guide](../emulation.md#locale--timezone).
timezone_id : Union[str, None]
    Changes the timezone of the context. See
    [ICU's metaZones.txt](https://cs.chromium.org/chromium/src/third_party/icu/source/data/misc/metaZones.txt?rcl=faee8bc70570192d82d2978a71e2a615788597d1)
    for a list of supported timezone IDs. Defaults to the system timezone.
geolocation : Union[{latitude: float, longitude: float, accuracy: Union[float, None]}, None]
permissions : Union[Sequence[str], None]
    A list of permissions to grant to all pages in this context. See `browser_context.grant_permissions()` for
    more details. Defaults to none.
extra_http_headers : Union[Dict[str, str], None]
    An object containing additional HTTP headers to be sent with every request. Defaults to none.
offline : Union[bool, None]
    Whether to emulate network being offline. Defaults to `false`. Learn more about
    [network emulation](../emulation.md#offline).
http_credentials : Union[{username: str, password: str, origin: Union[str, None], send: Union["always", "unauthorized", None]}, None]
    Credentials for [HTTP authentication](https://developer.mozilla.org/en-US/docs/Web/HTTP/Authentication). If no
    origin is specified, the username and password are sent to any servers upon unauthorized responses.
device_scale_factor : Union[float, None]
    Specify device scale factor (can be thought of as dpr). Defaults to `1`. Learn more about
    [emulating devices with device scale factor](../emulation.md#devices).
is_mobile : Union[bool, None]
    Whether the `meta viewport` tag is taken into account and touch events are enabled. isMobile is a part of device,
    so you don't actually need to set it manually. Defaults to `false` and is not supported in Firefox. Learn more
    about [mobile emulation](../emulation.md#ismobile).
has_touch : Union[bool, None]
    Specifies if viewport supports touch events. Defaults to false. Learn more about
    [mobile emulation](../emulation.md#devices).
color_scheme : Union["dark", "light", "no-preference", "null", None]
    Emulates [prefers-colors-scheme](https://developer.mozilla.org/en-US/docs/Web/CSS/@media/prefers-color-scheme)
    media feature, supported values are `'light'` and `'dark'`. See `page.emulate_media()` for more details.
    Passing `'null'` resets emulation to system defaults. Defaults to `'light'`.
reduced_motion : Union["no-preference", "null", "reduce", None]
    Emulates `'prefers-reduced-motion'` media feature, supported values are `'reduce'`, `'no-preference'`. See
    `page.emulate_media()` for more details. Passing `'null'` resets emulation to system defaults. Defaults to
    `'no-preference'`.
forced_colors : Union["active", "none", "null", None]
    Emulates `'forced-colors'` media feature, supported values are `'active'`, `'none'`. See
    `page.emulate_media()` for more details. Passing `'null'` resets emulation to system defaults. Defaults to
    `'none'`.
contrast : Union["more", "no-preference", "null", None]
    Emulates `'prefers-contrast'` media feature, supported values are `'no-preference'`, `'more'`. See
    `page.emulate_media()` for more details. Passing `'null'` resets emulation to system defaults. Defaults to
    `'no-preference'`.
accept_downloads : Union[bool, None]
    Whether to automatically download all the attachments. Defaults to `true` where all the downloads are accepted.
traces_dir : Union[pathlib.Path, str, None]
    If specified, traces are saved into this directory.
chromium_sandbox : Union[bool, None]
    Enable Chromium sandboxing. Defaults to `false`.
firefox_user_prefs : Union[Dict[str, Union[bool, float, str]], None]
    Firefox user preferences. Learn more about the Firefox user preferences at
    [`about:config`](https://support.mozilla.org/en-US/kb/about-config-editor-firefox).
record_har_path : Union[pathlib.Path, str, None]
    Enables [HAR](http://www.softwareishard.com/blog/har-12-spec) recording for all pages into the specified HAR file
    on the filesystem. If not specified, the HAR is not recorded. Make sure to call `browser_context.close()`
    for the HAR to be saved.
record_har_omit_content : Union[bool, None]
    Optional setting to control whether to omit request content from the HAR. Defaults to `false`.
record_video_dir : Union[pathlib.Path, str, None]
    Enables video recording for all pages into the specified directory. If not specified videos are not recorded. Make
    sure to call `browser_context.close()` for videos to be saved.
record_video_size : Union[{width: int, height: int}, None]
    Dimensions of the recorded videos. If not specified the size will be equal to `viewport` scaled down to fit into
    800x800. If `viewport` is not configured explicitly the video size defaults to 800x450. Actual picture of each page
    will be scaled down if necessary to fit the specified size.
base_url : Union[str, None]
    When using `page.goto()`, `page.route()`, `page.wait_for_url()`,
    `page.expect_request()`, or `page.expect_response()` it takes the base URL in consideration by
    using the [`URL()`](https://developer.mozilla.org/en-US/docs/Web/API/URL/URL) constructor for building the
    corresponding URL. Unset by default. Examples:
    - baseURL: `http://localhost:3000` and navigating to `/bar.html` results in `http://localhost:3000/bar.html`
    - baseURL: `http://localhost:3000/foo/` and navigating to `./bar.html` results in
      `http://localhost:3000/foo/bar.html`
    - baseURL: `http://localhost:3000/foo` (without trailing slash) and navigating to `./bar.html` results in
      `http://localhost:3000/bar.html`
strict_selectors : Union[bool, None]
    If set to true, enables strict selectors mode for this context. In the strict selectors mode all operations on
    selectors that imply single target DOM element will throw when more than one element matches the selector. This
    option does not affect any Locator APIs (Locators are always strict). Defaults to `false`. See `Locator` to learn
    more about the strict mode.
service_workers : Union["allow", "block", None]
    Whether to allow sites to register Service workers. Defaults to `'allow'`.
    - `'allow'`: [Service Workers](https://developer.mozilla.org/en-US/docs/Web/API/Service_Worker_API) can be
      registered.
    - `'block'`: Playwright will block all registration of Service Workers.
record_har_url_filter : Union[Pattern[str], str, None]
record_har_mode : Union["full", "minimal", None]
    When set to `minimal`, only record information necessary for routing from HAR. This omits sizes, timing, page,
    cookies, security and other types of HAR information that are not used when replaying from HAR. Defaults to `full`.
record_har_content : Union["attach", "embed", "omit", None]
    Optional setting to control resource content management. If `omit` is specified, content is not persisted. If
    `attach` is specified, resources are persisted as separate files and all of these files are archived along with the
    HAR file. Defaults to `embed`, which stores content inline the HAR file as per HAR specification.
client_certificates : Union[Sequence[{origin: str, certPath: Union[pathlib.Path, str, None], cert: Union[bytes, None], keyPath: Union[pathlib.Path, str, None], key: Union[bytes, None], pfxPath: Union[pathlib.Path, str, None], pfx: Union[bytes, None], passphrase: Union[str, None]}], None]
    TLS Client Authentication allows the server to request a client certificate and verify it.

    **Details**

    An array of client certificates to be used. Each certificate object must have either both `certPath` and `keyPath`,
    a single `pfxPath`, or their corresponding direct value equivalents (`cert` and `key`, or `pfx`). Optionally,
    `passphrase` property should be provided if the certificate is encrypted. The `origin` property should be provided
    with an exact match to the request origin that the certificate is valid for.

    **NOTE** When using WebKit on macOS, accessing `localhost` will not pick up client certificates. You can make it
    work by replacing `localhost` with `local.playwright`.


Returns
-------
BrowserContext
userDataDirr  r  r  r  r  r  r  r   r  r  r  rk  r  r  r\  r  r{  r|  r}  r~  r  rb  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  Nr   )r   r`   rF   launch_persistent_contextr   )4rI   r  r  r  r  r  r  r  r  r   r  r  r  rk  r  r  r\  r  r]  r^  r_  r`  ra  rb  rc  r  r  rd  r  re  rf  rg  rh  r  r  r  r  ri  r  r  r  rl  rm  rn  ro  rp  rq  r  rr  rs  rt  ru  s4                                                       rJ   r  %BrowserType.launch_persistent_context8  s    P   ..:: 4)44  /4 __T*	4
 #*//2E"F4 +4 -4 +4  4 OOC(4 "4 "4 4 -4 4  "!4" #4$ '%4& #6'4( #6)4* %+4, %-4. /40 '142 (344 $OOK8546 ")1C!D748  94: !1;4< #6=4> #?4@ #A4B )C4D -E4F +G4H "I4J !1K4L %M4N !1O4P ")1C!DQ4R .S4T &=U4V  0W4X !2Y4Z ![4\ !1]4^  /_4` $9a4b .c4d "4e4f $7g4 46
 6	
4s   D?EE
	E)r   r  rs   endpoint_urlrs   c          
         #    [         R                  " U R                  R                  UUU[         R                  " U5      S9I Sh  vN 5      $  N7f)a  BrowserType.connect_over_cdp

This method attaches Playwright to an existing browser instance using the Chrome DevTools Protocol.

The default browser context is accessible via `browser.contexts()`.

**NOTE** Connecting over the Chrome DevTools Protocol is only supported for Chromium-based browsers.

**NOTE** This connection is significantly lower fidelity than the Playwright protocol connection via
`browser_type.connect()`. If you are experiencing issues or attempting to use advanced functionality, you
probably want to use `browser_type.connect()`.

**Usage**

```py
browser = await playwright.chromium.connect_over_cdp("http://localhost:9222")
default_context = browser.contexts[0]
page = default_context.pages[0]
```

Parameters
----------
endpoint_url : str
    A CDP websocket endpoint or http url to connect to. For example `http://localhost:9222/` or
    `ws://127.0.0.1:9222/devtools/browser/387adf4c-243f-4051-a181-46798f4a46f4`.
timeout : Union[float, None]
    Maximum time in milliseconds to wait for the connection to be established. Defaults to `30000` (30 seconds). Pass
    `0` to disable timeout.
slow_mo : Union[float, None]
    Slows down Playwright operations by the specified amount of milliseconds. Useful so that you can see what is going
    on. Defaults to 0.
headers : Union[Dict[str, str], None]
    Additional HTTP headers to be sent with connect request. Optional.

Returns
-------
Browser
)endpointURLr   r  rs   N)r   r`   rF   connect_over_cdpr   )rI   r  r   r  rs   s        rJ   r  BrowserType.connect_over_cdp9  sQ     ^   ..11(0	 2  
 	
r0  )r   r  rs   expose_networkws_endpointr  c          
         #    [         R                  " U R                  R                  UUU[         R                  " U5      US9I Sh  vN 5      $  N7f)u  BrowserType.connect

This method attaches Playwright to an existing browser instance created via `BrowserType.launchServer` in Node.js.

**NOTE** The major and minor version of the Playwright instance that connects needs to match the version of
Playwright that launches the browser (1.2.3 → is compatible with 1.2.x).

Parameters
----------
ws_endpoint : str
    A Playwright browser websocket endpoint to connect to. You obtain this endpoint via `BrowserServer.wsEndpoint`.
timeout : Union[float, None]
    Maximum time in milliseconds to wait for the connection to be established. Defaults to `0` (no timeout).
slow_mo : Union[float, None]
    Slows down Playwright operations by the specified amount of milliseconds. Useful so that you can see what is going
    on. Defaults to 0.
headers : Union[Dict[str, str], None]
    Additional HTTP headers to be sent with web socket connect request. Optional.
expose_network : Union[str, None]
    This option exposes network available on the connecting client to the browser being connected to. Consists of a
    list of rules separated by comma.

    Available rules:
    1. Hostname pattern, for example: `example.com`, `*.org:99`, `x.*.y.com`, `*foo.org`.
    1. IP literal, for example: `127.0.0.1`, `0.0.0.0:99`, `[::1]`, `[0:0::1]:99`.
    1. `<loopback>` that matches local loopback interfaces: `localhost`, `*.localhost`, `127.0.0.1`, `[::1]`.

    Some common examples:
    1. `"*"` to expose all network.
    1. `"<loopback>"` to expose localhost network.
    1. `"*.test.internal-domain,*.staging.internal-domain,<loopback>"` to expose test/staging deployments and
       localhost.

Returns
-------
Browser
)
wsEndpointr   r  rs   exposeNetworkN)r   r`   rF   connectr   )rI   r  r   r  rs   r  s         rJ   r  BrowserType.connect :  sT     ^   ..((&0, )  
 	
r+  r   )r   r   r   r   r   r   r   r  r   r   r	  r
  r  r  r   r  r   r   r  r   r	   r
   r   rK  r   r   r  r  r  r   r   rM   rJ   r!   r!   7  sn	   	<c 	< 	< 	G 	G 	G MQ(,6: /304/3*.QU*.*.04KO*.GK26 /I
  c7<<6G)HII
 %	I

 oofooc23I
 $__LLvs334
I
 t,I
 -I
 t,I
 'I
 __V[[fll3t;K.L)LMNI
 //$'I
 //$'I
  }-!I
" S',,5F(GH#I
$ '%I
& OOFLLgll1B$CD'I
( !//$/)I
* #OOKKV\\#ud*:;;<
+I
0 
1I
^ )-LP6: /304/3*.QU*.*.04KO*.2604-15959,0+/'+,048=AEI)-=A6:+/+/  LPNR26GK26 LP9=MQ;?)-26FJ GKRVOS~
||C$56~
 %	~

  c7<<6G)HI~
 oofooc23~
 $__LLvs334
~
 t,~
 -~
 t,~
 '~
 __V[[fll3t;K.L)LMN~
 //$'~
  //$'!~
" }-#~
$ S',,5F(GH%~
& ''~
( //,/)~
* -+~
, __T*-~
. $__T2/~
0 $__T21~
2 OOD)3~
4 OOC(5~
6 $7~
8 __S)9~
: __[1;~
< __V__S%9:=~
> #OOFKKS,AB?~
@ &A~
B !///:C~
D $__U3E~
F ??4(G~
H ??4(I~
J oo<=
K~
P 56
Q~
V w/G'HIW~
X //'*I"JKY~
Z !//$/[~
\ OOFLLgll1B$CD]~
^ !//$/_~
` #OOKKV\\#ud*:;;<
a~
f  c7<<6G)HIg~
h "(!6i~
j !//&,,sGLL7H*IJk~
l "??<8m~
n //#&o~
p !//$/q~
r  1A)BCs~
t  &LLfnnS112 
u~
z  1B)CD{~
| #OOG4M,NO}~
~ $__V[[9J-KL~
@ 
A~
H
 +/*.:>6
6
 '	6

 '6
 S#X!676
 
6
x +/*.:>/37
7
 '	7

 '7
 S#X!677
 ,7
 
7
 7
rM   r!   c                       \ rS rSr\S\R                  4S j5       r\SS j5       r\SS j5       r	\SS j5       r
\SS j5       r\SS	 j5       rS
\SS4S jrSS jrSrg)r;   i=:  rB   c                 V    [         R                  " U R                  R                  5      $ )a  Playwright.devices

Returns a dictionary of devices to be used with `browser.new_context()` or `browser.new_page()`.

```py
import asyncio
from playwright.async_api import async_playwright, Playwright

async def run(playwright: Playwright):
    webkit = playwright.webkit
    iphone = playwright.devices["iPhone 6"]
    browser = await webkit.launch()
    context = await browser.new_context(**iphone)
    page = await context.new_page()
    await page.goto("http://example.com")
    # other actions...
    await browser.close()

async def main():
    async with async_playwright() as playwright:
        await run(playwright)
asyncio.run(main())
```

Returns
-------
Dict
)r   rE   rF   devicesrH   s    rJ   r  Playwright.devices?:  s    < &&t~~'='=>>rM   c                 V    [         R                  " U R                  R                  5      $ )zPlaywright.selectors

Selectors can be used to install custom selector engines. See [extensibility](https://playwright.dev/python/docs/extensibility) for more
information.

Returns
-------
Selectors
)r   r`   rF   	selectorsrH   s    rJ   r  Playwright.selectors_:  s       !9!9::rM   r!   c                 V    [         R                  " U R                  R                  5      $ )zPlaywright.chromium

This object can be used to launch or connect to Chromium, returning instances of `Browser`.

Returns
-------
BrowserType
)r   r`   rF   chromiumrH   s    rJ   r  Playwright.chromiuml:  s       !8!899rM   c                 V    [         R                  " U R                  R                  5      $ )zPlaywright.firefox

This object can be used to launch or connect to Firefox, returning instances of `Browser`.

Returns
-------
BrowserType
)r   r`   rF   firefoxrH   s    rJ   r  Playwright.firefoxx:  r   rM   c                 V    [         R                  " U R                  R                  5      $ )zPlaywright.webkit

This object can be used to launch or connect to WebKit, returning instances of `Browser`.

Returns
-------
BrowserType
)r   r`   rF   webkitrH   s    rJ   r  Playwright.webkit:  s       !6!677rM   c                 V    [         R                  " U R                  R                  5      $ )zfPlaywright.request

Exposes API that can be used for the Web API testing.

Returns
-------
APIRequest
r   rH   s    rJ   r   Playwright.request:  r   rM   r+  c                 \    [         R                  " U R                  R                  US95      $ )N)r+  )r   r`   rF   __getitem__)rI   r+  s     rJ   r  Playwright.__getitem__:  s%      !;!;%!;!HIIrM   Nc                 z   #    [         R                  " U R                  R                  5       I Sh  vN 5      $  N7f)a  Playwright.stop

Terminates this instance of Playwright in case it was created bypassing the Python context manager. This is useful
in REPL applications.

```py
from playwright.sync_api import sync_playwright

playwright = sync_playwright().start()

browser = playwright.chromium.launch()
page = browser.new_page()
page.goto("https://playwright.dev/")
page.screenshot(path="example.png")
browser.close()

playwright.stop()
```
Nr   rE   rF   stoprH   s    rJ   r  Playwright.stop:  s+     * &&T^^-@-@-B'BCC'Bry   r   )rB   r<   r  )rB   r)   r   )r   r   r   r   r   r   r   r  r  r  r  r  r   r   r  r  r   r   rM   rJ   r;   r;   =:  s    ? ? ?> 
; 
; 	: 	: 	9 	9 	8 	8 	9 	9J J JDrM   r;   c                   *   \ rS rSrSSSSSS.S\R
                  \   S\R
                  \   S\R
                  \   S\R
                  \   S\R
                  \   S	S4S
 jjrSSS.S\R
                  \   S\R
                  \   S	S4S jjr	SS.S\R
                  \R                  \\R                  4      S	S4S jjrSS.S\R
                  \R                  \\R                  4      S	S4S jjrSS.S\S\R
                  \   S	S4S jjrSS jrSrg)r=   i:  Nr   rB  	snapshotsr  sourcesr   rB  r  r  r  rB   c          
         #    [         R                  " U R                  R                  UUUUUS9I Sh  vN 5      $  N7f)a  Tracing.start

Start tracing.

**Usage**

```py
await context.tracing.start(screenshots=True, snapshots=True)
page = await context.new_page()
await page.goto("https://playwright.dev")
await context.tracing.stop(path = "trace.zip")
```

Parameters
----------
name : Union[str, None]
    If specified, intermediate trace files are going to be saved into the files with the given name prefix inside the
    `tracesDir` directory specified in `browser_type.launch()`. To specify the final trace zip file name, you
    need to pass `path` option to `tracing.stop()` instead.
title : Union[str, None]
    Trace name to be shown in the Trace Viewer.
snapshots : Union[bool, None]
    If this option is true tracing will
    - capture DOM snapshot on every action
    - record network activity
screenshots : Union[bool, None]
    Whether to capture screenshots during tracing. Screenshots are used to build a timeline preview.
sources : Union[bool, None]
    Whether to include source files for trace actions.
r  N)r   rE   rF   start)rI   r   rB  r  r  r  s         rJ   r  Tracing.start:  sK     P &&..&&#' '  
 	
rn  rB  r   c                x   #    [         R                  " U R                  R                  XS9I Sh  vN 5      $  N7f)a  Tracing.start_chunk

Start a new trace chunk. If you'd like to record multiple traces on the same `BrowserContext`, use
`tracing.start()` once, and then create multiple trace chunks with `tracing.start_chunk()` and
`tracing.stop_chunk()`.

**Usage**

```py
await context.tracing.start(screenshots=True, snapshots=True)
page = await context.new_page()
await page.goto("https://playwright.dev")

await context.tracing.start_chunk()
await page.get_by_text("Get Started").click()
# Everything between start_chunk and stop_chunk will be recorded in the trace.
await context.tracing.stop_chunk(path = "trace1.zip")

await context.tracing.start_chunk()
await page.goto("http://example.com")
# Save a second trace file with different actions.
await context.tracing.stop_chunk(path = "trace2.zip")
```

Parameters
----------
title : Union[str, None]
    Trace name to be shown in the Trace Viewer.
name : Union[str, None]
    If specified, intermediate trace files are going to be saved into the files with the given name prefix inside the
    `tracesDir` directory specified in `browser_type.launch()`. To specify the final trace zip file name, you
    need to pass `path` option to `tracing.stop_chunk()` instead.
r  N)r   rE   rF   start_chunk)rI   rB  r   s      rJ   r  Tracing.start_chunk:  s6     J &&..,,5,DD
 	
Dr   r  r   c                x   #    [         R                  " U R                  R                  US9I Sh  vN 5      $  N7f)a  Tracing.stop_chunk

Stop the trace chunk. See `tracing.start_chunk()` for more details about multiple trace chunks.

Parameters
----------
path : Union[pathlib.Path, str, None]
    Export trace collected since the last `tracing.start_chunk()` call into the file with the given path.
r  N)r   rE   rF   
stop_chunkr  s     rJ   r  Tracing.stop_chunk;  s0      &&T^^-F-FD-F-Q'QRR'Qr   c                x   #    [         R                  " U R                  R                  US9I Sh  vN 5      $  N7f)zTracing.stop

Stop tracing.

Parameters
----------
path : Union[pathlib.Path, str, None]
    Export trace into the file with the given path.
r  Nr  r  s     rJ   r  Tracing.stop';  s0      &&T^^-@-@d-@-K'KLL'Kr   )r  r  c                x   #    [         R                  " U R                  R                  XS9I Sh  vN 5      $  N7f)aF  Tracing.group

**NOTE** Use `test.step` instead when available.

Creates a new group within the trace, assigning any subsequent API calls to this group, until
`tracing.group_end()` is called. Groups can be nested and will be visible in the trace viewer.

**Usage**

```py
# All actions between group and group_end
# will be shown in the trace viewer as a group.
page.context.tracing.group("Open Playwright.dev > API")
page.goto("https://playwright.dev/")
page.get_by_role("link", name="API").click()
page.context.tracing.group_end()
```

Parameters
----------
name : str
    Group name shown in the trace viewer.
location : Union[{file: str, line: Union[int, None], column: Union[int, None]}, None]
    Specifies a custom location for the group to be shown in the trace viewer. Defaults to the location of the
    `tracing.group()` call.
)r   r  N)r   rE   rF   r  )rI   r   r  s      rJ   r  Tracing.group6;  s5     < &&..&&D&DD
 	
Dr   c                 z   #    [         R                  " U R                  R                  5       I Sh  vN 5      $  N7f)zGTracing.group_end

Closes the last group created by `tracing.group()`.
N)r   rE   rF   	group_endrH   s    rJ   r  Tracing.group_endX;  s+      &&T^^-E-E-G'GHH'Gry   r   r   )r   r   r   r   r   r   r   r   r  r  r	  r
  r  r  r  r   r  r  r   r   rM   rJ   r=   r=   :  sc   
 &*&*+/-1)-0
 ooc"0
 s#	0

 ??4(0
 __T*0
 &0
 
0
f 04RV'
,'
;A??3;O'
	'
T KOSv||C4E'FGS	S  KOMv||C4E'FGM	M  OS 
 
&,oo6J&K 
	 
DIrM   r=   c                   l   \ rS rSr\SS j5       r\SS j5       r\SS j5       r\SS j5       rSS	.S
\	R                  \   S\	R                  \   4S jjrSSSSSS.S\	R                  \   S
\	R                  \   S\	R                  \   S\	R                  \   S\	R                  \   SS4S jjrSSSSSSSSSS.	S\	R                  \	R"                  \S         S\	R                  \   S\	R                  \   S\	R                  \S      S\	R                  \   S
\	R                  \   S\	R                  \   S\	R                  \   S\	R                  \   SS4S jjrSSSSSSSSS.S\	R                  \	R"                  \S         S\	R                  \   S\	R                  \   S\	R                  \S      S
\	R                  \   S\	R                  \   S\	R                  \   S\	R                  \   SS4S jjr SSS	.S\S\	R                  \	R.                     S
\	R                  \   SS4S jjjr SSS	.S\S \	R                  \	R2                     S
\	R                  \   S\	R2                  4S! jjjr SS\S \	R                  \	R2                     S\	R2                  4S" jjr SSS	.S\S \	R                  \	R2                     S
\	R                  \   SS#4S$ jjjrSSSS%.S&\S
\	R                  \   S\	R                  \   S\	R                  \   SS4
S' jjrSSSS%.S
\	R                  \   S\	R                  \   S\	R                  \   SS4S( jjrSSSSS).S*\	R>                  \S 4   S+\	R                  \	R>                  \\	R@                  \   4      S,\	R                  \	R>                  \\	R@                  \   4      S-\	R                  S    S.\	R                  S    SS 4S/ jjr!SS0.S1\	R>                  \\	R@                  \   4   S2\	R                  \   SS 4S3 jjr"SS0.S1\	R>                  \\	R@                  \   4   S2\	R                  \   SS 4S4 jjr#SS0.S1\	R>                  \\	R@                  \   4   S2\	R                  \   SS 4S5 jjr$SSSSSSSSSS6.	S7\S8   S9\	R                  \   S:\	R                  \   S;\	R                  \   S<\	R                  \   S=\	R                  \   S>\	R                  \	R>                  \\	R@                  \   4      S?\	R                  \   S@\	R                  \   S2\	R                  \   SS 4SA jjr%SB\	R>                  \\	R@                  \   4   SS 4SC jr&SS0.S1\	R>                  \\	R@                  \   4   S2\	R                  \   SS 4SD jjr'SS0.S1\	R>                  \\	R@                  \   4   S2\	R                  \   SS 4SE jjr(SF\SS4SG jr)SS	.S
\	R                  \   SSH4SI jjr*S\	RV                  SH   4SJ jr,SK\SS 4SL jr-SSSSSSM.S+\	R                  \	R>                  \\	R@                  \   4      S,\	R                  \	R>                  \\	R@                  \   4      S-\	R                  S    S.\	R                  S    SN\	R                  \   SS 4SO jjr.SSP jr/SSQ jr0SS	.S
\	R                  \   SS4SR jjr1SS	.S
\	R                  \   SS4SS jjr2S\	RV                  S    4ST jr3S\4SU jr4SSSSSSSV.SWS S\	R                  \   S\	R                  \   S
\	R                  \   S\	R                  \   SX\	R                  \   SY\	R                  \   SS4SZ jjr5SS	.S>\S
\	R                  \   S\	R                  \   4S[ jjr6SSSSSSS\.S\	R                  \	R"                  \S         S\	R                  \   S
\	R                  \   S\	R                  \   S\	R                  \   S\	R                  \   SS4S] jjr7SS	.S
\	R                  \   S\4S^ jjr8SS	.S
\	R                  \   S\4S_ jjr9SS	.S
\	R                  \   S\4S` jjr:SS	.S
\	R                  \   S\4Sa jjr;SS	.S
\	R                  \   S\4Sb jjr<SS	.S
\	R                  \   S\4Sc jjr=SS	.S
\	R                  \   S\4Sd jjr>SS	.S
\	R                  \   S\4Se jjr?SS	.S
\	R                  \   S\4Sf jjr@SSSSg.Sh\S\	R                  \   S
\	R                  \   S\	R                  \   SS4
Si jjrASSSSSSSSSSSSj.S
\	R                  \   S\	R                  \Sk      Sl\	R                  \	R>                  \\BR                  4      Sm\	R                  \   Sn\	R                  \   So\	R                  \Sp      Sq\	R                  \Sr      Ss\	R                  \St      Su\	R                  \	R"                  S       Sv\	R                  \   Sw\	R                  \   S\D4Sx jjrESSSy.S
\	R                  \   Sz\	R                  \   S\4S{ jjrFSS	.S
\	R                  \   SS4S| jjrG SSSSSSSS}.S&\	R                  \	R>                  \\	R"                  \   4      SK\	R                  \	R>                  \\	R"                  \   4      S~\	R                  \	R>                  \\	R"                  \   4      S\	R                  \	R>                  SH\	R"                  SH   4      S
\	R                  \   S\	R                  \   S\	R                  \   S\	RV                  \   4S jjjrHSSS.S\	R                  \   S
\	R                  \   SS4S jjrISSS.S\	R>                  \\BR                  \J\	R"                  \	R>                  \\BR                  4      \	R"                  \J   4   S
\	R                  \   S\	R                  \   SS4S jjrKSSSSSSS.S\	R                  \	R"                  \S         S\	R                  \   S
\	R                  \   S\	R                  \   S\	R                  \   S\	R                  \   SS4S jjrLSS	.S
\	R                  \   S\	R                  \   4S jjrMSSSSg.S1\S\	R                  \   S
\	R                  \   S\	R                  \   SS4
S jjrNSSSSg.S1\S\	R                  \   S
\	R                  \   S\	R                  \   SS4
S jjrOSSSSSS.S\	R                  \   S
\	R                  \   S\	R                  \   S\	R                  \   S\	R                  \   SS4S jjrPS\	RV                  \   4S jrQS\	RV                  \   4S jrRSSS.S
\	R                  \   S\	R                  \S      SS4S jjrSSSSSSS.S9\S\	R                  \   S
\	R                  \   S\	R                  \   S\	R                  \   S\	R                  \   SS4S jjrTSS jrUSrVg)r3   id;  rB   c                 V    [         R                  " U R                  R                  5      $ )zDLocator.page

A page this locator belongs to.

Returns
-------
Page
r  rH   s    rJ   r  Locator.pagef;  r  rM   c                 V    [         R                  " U R                  R                  5      $ )zWLocator.first

Returns locator to the first matching element.

Returns
-------
Locator
rN  rH   s    rJ   rO  Locator.firstr;  r   rM   c                 V    [         R                  " U R                  R                  5      $ )zLocator.last

Returns locator to the last matching element.

**Usage**

```py
banana = await page.get_by_role("listitem").last
```

Returns
-------
Locator
rR  rH   s    rJ   rS  Locator.last~;  s        !4!455rM   r2   c                 V    [         R                  " U R                  R                  5      $ )a  Locator.content_frame

Returns a `FrameLocator` object pointing to the same `iframe` as this locator.

Useful when you have a `Locator` object obtained somewhere, and later on would like to interact with the content
inside the frame.

For a reverse operation, use `frame_locator.owner()`.

**Usage**

```py
locator = page.locator("iframe[name=\"embedded\"]")
# ...
frame_locator = locator.content_frame
await frame_locator.get_by_role("button").click()
```

Returns
-------
FrameLocator
)r   r`   rF   r  rH   s    rJ   r  Locator.content_frame;  s    0   !=!=>>rM   Nr4  r   c                x   #    [         R                  " U R                  R                  US9I Sh  vN 5      $  N7f)a[  Locator.bounding_box

This method returns the bounding box of the element matching the locator, or `null` if the element is not visible.
The bounding box is calculated relative to the main frame viewport - which is usually the same as the browser
window.

**Details**

Scrolling affects the returned bounding box, similarly to
[Element.getBoundingClientRect](https://developer.mozilla.org/en-US/docs/Web/API/Element/getBoundingClientRect).
That means `x` and/or `y` may be negative.

Elements from child frames return the bounding box relative to the main frame, unlike the
[Element.getBoundingClientRect](https://developer.mozilla.org/en-US/docs/Web/API/Element/getBoundingClientRect).

Assuming the page is static, it is safe to use bounding box coordinates to perform input. For example, the
following snippet should click the center of the element.

**Usage**

```py
box = await page.get_by_role("button").bounding_box()
await page.mouse.click(box["x"] + box["width"] / 2, box["y"] + box["height"] / 2)
```

Parameters
----------
timeout : Union[float, None]
    Maximum time in milliseconds. Defaults to `30000` (30 seconds). Pass `0` to disable timeout. The default value can
    be changed by using the `browser_context.set_default_timeout()` or `page.set_default_timeout()` methods.

Returns
-------
Union[{x: float, y: float, width: float, height: float}, None]
r4  Nrt  r  s     rJ   ru  Locator.bounding_box;  s6     N ))..--g->>
 	
>r   r_  r  r
  r	  r  c          
         #    [         R                  " U R                  R                  UUUUUS9I Sh  vN 5      $  N7f)a  Locator.check

Ensure that checkbox or radio element is checked.

**Details**

Performs the following steps:
1. Ensure that element is a checkbox or a radio input. If not, this method throws. If the element is already
   checked, this method returns immediately.
1. Wait for [actionability](https://playwright.dev/python/docs/actionability) checks on the element, unless `force` option is set.
1. Scroll the element into view if needed.
1. Use `page.mouse` to click in the center of the element.
1. Ensure that the element is now checked. If not, this method throws.

If the element is detached from the DOM at any moment during the action, this method throws.

When all steps combined have not finished during the specified `timeout`, this method throws a `TimeoutError`.
Passing zero timeout disables this.

**Usage**

```py
await page.get_by_role("checkbox").check()
```

Parameters
----------
position : Union[{x: float, y: float}, None]
    A point to use relative to the top-left corner of element padding box. If not specified, uses some visible point of
    the element.
timeout : Union[float, None]
    Maximum time in milliseconds. Defaults to `30000` (30 seconds). Pass `0` to disable timeout. The default value can
    be changed by using the `browser_context.set_default_timeout()` or `page.set_default_timeout()` methods.
force : Union[bool, None]
    Whether to bypass the [actionability](../actionability.md) checks. Defaults to `false`.
no_wait_after : Union[bool, None]
    This option has no effect.
    Deprecated: This option has no effect.
trial : Union[bool, None]
    When set, this method only performs the [actionability](../actionability.md) checks and skips the action. Defaults
    to `false`. Useful to wait until the element is ready for the action without performing it.
ri  Nrj  rl  s         rJ   rk  Locator.check;  sK     h &&..&&!) '  
 	
rn  r  r  r  rv  r  r  r  c       	            #    [         R                  " U R                  R                  [         R                  " U5      UUUUUUUU	S9	I Sh  vN 5      $  N7f)a  Locator.click

Click an element.

**Details**

This method clicks the element by performing the following steps:
1. Wait for [actionability](https://playwright.dev/python/docs/actionability) checks on the element, unless `force` option is set.
1. Scroll the element into view if needed.
1. Use `page.mouse` to click in the center of the element, or the specified `position`.
1. Wait for initiated navigations to either succeed or fail, unless `noWaitAfter` option is set.

If the element is detached from the DOM at any moment during the action, this method throws.

When all steps combined have not finished during the specified `timeout`, this method throws a `TimeoutError`.
Passing zero timeout disables this.

**Usage**

Click a button:

```py
await page.get_by_role("button").click()
```

Shift-right-click at a specific position on a canvas:

```py
await page.locator("canvas").click(
    button="right", modifiers=["Shift"], position={"x": 23, "y": 32}
)
```

Parameters
----------
modifiers : Union[Sequence[Union["Alt", "Control", "ControlOrMeta", "Meta", "Shift"]], None]
    Modifier keys to press. Ensures that only these modifiers are pressed during the operation, and then restores
    current modifiers back. If not specified, currently pressed modifiers are used. "ControlOrMeta" resolves to
    "Control" on Windows and Linux and to "Meta" on macOS.
position : Union[{x: float, y: float}, None]
    A point to use relative to the top-left corner of element padding box. If not specified, uses some visible point of
    the element.
delay : Union[float, None]
    Time to wait between `mousedown` and `mouseup` in milliseconds. Defaults to 0.
button : Union["left", "middle", "right", None]
    Defaults to `left`.
click_count : Union[int, None]
    defaults to 1. See [UIEvent.detail].
timeout : Union[float, None]
    Maximum time in milliseconds. Defaults to `30000` (30 seconds). Pass `0` to disable timeout. The default value can
    be changed by using the `browser_context.set_default_timeout()` or `page.set_default_timeout()` methods.
force : Union[bool, None]
    Whether to bypass the [actionability](../actionability.md) checks. Defaults to `false`.
no_wait_after : Union[bool, None]
    Actions that initiate navigations are waiting for these navigations to happen and for pages to start loading. You
    can opt out of waiting via setting this flag. You would only need this option in the exceptional cases such as
    navigating to inaccessible pages. Defaults to `false`.
    Deprecated: This option will default to `true` in the future.
trial : Union[bool, None]
    When set, this method only performs the [actionability](../actionability.md) checks and skips the action. Defaults
    to `false`. Useful to wait until the element is ready for the action without performing it. Note that keyboard
    `modifiers` will be pressed regardless of `trial` to allow testing elements which are only visible when those keys
    are pressed.
r  Nr  r  s
             rJ   r  Locator.click<  s`     ` &&..&&!//)4!&) ' 
 

 	

r   r!  c                   #    [         R                  " U R                  R                  [         R                  " U5      UUUUUUUS9I Sh  vN 5      $  N7f)aI	  Locator.dblclick

Double-click an element.

**Details**

This method double clicks the element by performing the following steps:
1. Wait for [actionability](https://playwright.dev/python/docs/actionability) checks on the element, unless `force` option is set.
1. Scroll the element into view if needed.
1. Use `page.mouse` to double click in the center of the element, or the specified `position`.

If the element is detached from the DOM at any moment during the action, this method throws.

When all steps combined have not finished during the specified `timeout`, this method throws a `TimeoutError`.
Passing zero timeout disables this.

**NOTE** `element.dblclick()` dispatches two `click` events and a single `dblclick` event.

Parameters
----------
modifiers : Union[Sequence[Union["Alt", "Control", "ControlOrMeta", "Meta", "Shift"]], None]
    Modifier keys to press. Ensures that only these modifiers are pressed during the operation, and then restores
    current modifiers back. If not specified, currently pressed modifiers are used. "ControlOrMeta" resolves to
    "Control" on Windows and Linux and to "Meta" on macOS.
position : Union[{x: float, y: float}, None]
    A point to use relative to the top-left corner of element padding box. If not specified, uses some visible point of
    the element.
delay : Union[float, None]
    Time to wait between `mousedown` and `mouseup` in milliseconds. Defaults to 0.
button : Union["left", "middle", "right", None]
    Defaults to `left`.
timeout : Union[float, None]
    Maximum time in milliseconds. Defaults to `30000` (30 seconds). Pass `0` to disable timeout. The default value can
    be changed by using the `browser_context.set_default_timeout()` or `page.set_default_timeout()` methods.
force : Union[bool, None]
    Whether to bypass the [actionability](../actionability.md) checks. Defaults to `false`.
no_wait_after : Union[bool, None]
    This option has no effect.
    Deprecated: This option has no effect.
trial : Union[bool, None]
    When set, this method only performs the [actionability](../actionability.md) checks and skips the action. Defaults
    to `false`. Useful to wait until the element is ready for the action without performing it. Note that keyboard
    `modifiers` will be pressed regardless of `trial` to allow testing elements which are only visible when those keys
    are pressed.
r#  Nr$  r%  s	            rJ   r  Locator.dblclickq<  s]     x &&..))!//)4!) * 	 	
 	
	r'  ry  r  c                   #    [         R                  " U R                  R                  U[         R                  " U5      US9I Sh  vN 5      $  N7f)a>	  Locator.dispatch_event

Programmatically dispatch an event on the matching element.

**Usage**

```py
await locator.dispatch_event("click")
```

**Details**

The snippet above dispatches the `click` event on the element. Regardless of the visibility state of the element,
`click` is dispatched. This is equivalent to calling
[element.click()](https://developer.mozilla.org/en-US/docs/Web/API/HTMLElement/click).

Under the hood, it creates an instance of an event based on the given `type`, initializes it with `eventInit`
properties and dispatches it on the element. Events are `composed`, `cancelable` and bubble by default.

Since `eventInit` is event-specific, please refer to the events documentation for the lists of initial properties:
- [DeviceMotionEvent](https://developer.mozilla.org/en-US/docs/Web/API/DeviceMotionEvent/DeviceMotionEvent)
- [DeviceOrientationEvent](https://developer.mozilla.org/en-US/docs/Web/API/DeviceOrientationEvent/DeviceOrientationEvent)
- [DragEvent](https://developer.mozilla.org/en-US/docs/Web/API/DragEvent/DragEvent)
- [Event](https://developer.mozilla.org/en-US/docs/Web/API/Event/Event)
- [FocusEvent](https://developer.mozilla.org/en-US/docs/Web/API/FocusEvent/FocusEvent)
- [KeyboardEvent](https://developer.mozilla.org/en-US/docs/Web/API/KeyboardEvent/KeyboardEvent)
- [MouseEvent](https://developer.mozilla.org/en-US/docs/Web/API/MouseEvent/MouseEvent)
- [PointerEvent](https://developer.mozilla.org/en-US/docs/Web/API/PointerEvent/PointerEvent)
- [TouchEvent](https://developer.mozilla.org/en-US/docs/Web/API/TouchEvent/TouchEvent)
- [WheelEvent](https://developer.mozilla.org/en-US/docs/Web/API/WheelEvent/WheelEvent)

You can also specify `JSHandle` as the property value if you want live objects to be passed into the event:

```py
data_transfer = await page.evaluate_handle("new DataTransfer()")
await locator.dispatch_event("#source", "dragstart", {"dataTransfer": data_transfer})
```

Parameters
----------
type : str
    DOM event type: `"click"`, `"dragstart"`, etc.
event_init : Union[Dict, None]
    Optional event-specific initialization properties.
timeout : Union[float, None]
    Maximum time in milliseconds. Defaults to `30000` (30 seconds). Pass `0` to disable timeout. The default value can
    be changed by using the `browser_context.set_default_timeout()` or `page.set_default_timeout()` methods.
)ry  r  r   Nr  )rI   ry  r  r   s       rJ   r  Locator.dispatch_event<  sL     p &&..//W__Z%@' 0  
 	
   AAA	Ar  r  c                   #    [         R                  " U R                  R                  U[         R                  " U5      US9I Sh  vN 5      $  N7f)a  Locator.evaluate

Execute JavaScript code in the page, taking the matching element as an argument.

**Details**

Returns the return value of `expression`, called with the matching element as a first argument, and `arg` as a
second argument.

If `expression` returns a [Promise], this method will wait for the promise to resolve and return its value.

If `expression` throws or rejects, this method throws.

**Usage**

Parameters
----------
expression : str
    JavaScript expression to be evaluated in the browser context. If the expression evaluates to a function, the
    function is automatically invoked.
arg : Union[Any, None]
    Optional argument to pass to `expression`.
timeout : Union[float, None]
    Maximum time in milliseconds to wait for the locator before evaluating. Note that after locator is resolved,
    evaluation itself is not limited by the timeout. Defaults to `30000` (30 seconds). Pass `0` to disable timeout.

Returns
-------
Any
r  r  r   Nr  rI   r  r  r   s       rJ   r  Locator.evaluate<  sL     L &&..))%7??3+? *  
 	
r  c                    #    [         R                  " U R                  R                  U[         R                  " U5      S9I Sh  vN 5      $  N7f)aJ  Locator.evaluate_all

Execute JavaScript code in the page, taking all matching elements as an argument.

**Details**

Returns the return value of `expression`, called with an array of all matching elements as a first argument, and
`arg` as a second argument.

If `expression` returns a [Promise], this method will wait for the promise to resolve and return its value.

If `expression` throws or rejects, this method throws.

**Usage**

```py
locator = page.locator("div")
more_than_ten = await locator.evaluate_all("(divs, min) => divs.length > min", 10)
```

Parameters
----------
expression : str
    JavaScript expression to be evaluated in the browser context. If the expression evaluates to a function, the
    function is automatically invoked.
arg : Union[Any, None]
    Optional argument to pass to `expression`.

Returns
-------
Any
r  N)r   rE   rF   evaluate_allr   r  s      rJ   r!  Locator.evaluate_all$=  sJ     H &&..--%7??3+? .  
 	
r  r1   c                   #    [         R                  " U R                  R                  U[         R                  " U5      US9I Sh  vN 5      $  N7f)a  Locator.evaluate_handle

Execute JavaScript code in the page, taking the matching element as an argument, and return a `JSHandle` with the
result.

**Details**

Returns the return value of `expression` as a`JSHandle`, called with the matching element as a first argument, and
`arg` as a second argument.

The only difference between `locator.evaluate()` and `locator.evaluate_handle()` is that
`locator.evaluate_handle()` returns `JSHandle`.

If `expression` returns a [Promise], this method will wait for the promise to resolve and return its value.

If `expression` throws or rejects, this method throws.

See `page.evaluate_handle()` for more details.

Parameters
----------
expression : str
    JavaScript expression to be evaluated in the browser context. If the expression evaluates to a function, the
    function is automatically invoked.
arg : Union[Any, None]
    Optional argument to pass to `expression`.
timeout : Union[float, None]
    Maximum time in milliseconds to wait for the locator before evaluating. Note that after locator is resolved,
    evaluation itself is not limited by the timeout. Defaults to `30000` (30 seconds). Pass `0` to disable timeout.

Returns
-------
JSHandle
r  Nr  r  s       rJ   r  Locator.evaluate_handleN=  sL     T   ..00%7??3+? 1  
 	
r  r7  r+  c          	      z   #    [         R                  " U R                  R                  XX4S9I Sh  vN 5      $  N7f)aW  Locator.fill

Set a value to the input field.

**Usage**

```py
await page.get_by_role("textbox").fill("example value")
```

**Details**

This method waits for [actionability](https://playwright.dev/python/docs/actionability) checks, focuses the element, fills it and triggers an
`input` event after filling. Note that you can pass an empty string to clear the input field.

If the target element is not an `<input>`, `<textarea>` or `[contenteditable]` element, this method throws an
error. However, if the element is inside the `<label>` element that has an associated
[control](https://developer.mozilla.org/en-US/docs/Web/API/HTMLLabelElement/control), the control will be filled
instead.

To send fine-grained keyboard events, use `locator.press_sequentially()`.

Parameters
----------
value : str
    Value to set for the `<input>`, `<textarea>` or `[contenteditable]` element.
timeout : Union[float, None]
    Maximum time in milliseconds. Defaults to `30000` (30 seconds). Pass `0` to disable timeout. The default value can
    be changed by using the `browser_context.set_default_timeout()` or `page.set_default_timeout()` methods.
no_wait_after : Union[bool, None]
    This option has no effect.
    Deprecated: This option has no effect.
force : Union[bool, None]
    Whether to bypass the [actionability](../actionability.md) checks. Defaults to `false`.
r9  Nr:  r<  s        rJ   r;  Locator.fill~=  sA     X &&..%%- &  
 	
ry   c                z   #    [         R                  " U R                  R                  XUS9I Sh  vN 5      $  N7f)a[  Locator.clear

Clear the input field.

**Details**

This method waits for [actionability](https://playwright.dev/python/docs/actionability) checks, focuses the element, clears it and triggers an
`input` event after clearing.

If the target element is not an `<input>`, `<textarea>` or `[contenteditable]` element, this method throws an
error. However, if the element is inside the `<label>` element that has an associated
[control](https://developer.mozilla.org/en-US/docs/Web/API/HTMLLabelElement/control), the control will be cleared
instead.

**Usage**

```py
await page.get_by_role("textbox").clear()
```

Parameters
----------
timeout : Union[float, None]
    Maximum time in milliseconds. Defaults to `30000` (30 seconds). Pass `0` to disable timeout. The default value can
    be changed by using the `browser_context.set_default_timeout()` or `page.set_default_timeout()` methods.
no_wait_after : Union[bool, None]
    This option has no effect.
    Deprecated: This option has no effect.
force : Union[bool, None]
    Whether to bypass the [actionability](../actionability.md) checks. Defaults to `false`.
)r   r  r
  N)r   rE   rF   clear)rI   r   r	  r
  s       rJ   r(  Locator.clear=  sA     N &&..&&% '  
 	
ry   rd  rX  re  rf  rg  rh  c          
          [         R                  " U R                  R                  UUUU(       a  UR                  OSU(       a  UR                  S95      $ SS95      $ )af  Locator.locator

The method finds an element matching the specified selector in the locator's subtree. It also accepts filter
options, similar to `locator.filter()` method.

[Learn more about locators](https://playwright.dev/python/docs/locators).

Parameters
----------
selector_or_locator : Union[Locator, str]
    A selector or locator to use when resolving DOM element.
has_text : Union[Pattern[str], str, None]
    Matches elements containing specified text somewhere inside, possibly in a child or a descendant element. When
    passed a [string], matching is case-insensitive and searches for a substring. For example, `"Playwright"` matches
    `<article><div>Playwright</div></article>`.
has_not_text : Union[Pattern[str], str, None]
    Matches elements that do not contain specified text somewhere inside, possibly in a child or a descendant element.
    When passed a [string], matching is case-insensitive and searches for a substring.
has : Union[Locator, None]
    Narrows down the results of the method to those which contain elements matching this relative locator. For example,
    `article` that has `text=Playwright` matches `<article><div>Playwright</div></article>`.

    Inner locator **must be relative** to the outer locator and is queried starting with the outer locator match, not
    the document root. For example, you can find `content` that has `div` in
    `<article><content><div>Playwright</div></content></article>`. However, looking for `content` that has `article
    div` will fail, because the inner locator must be relative and should not use any elements outside the `content`.

    Note that outer and inner locators must belong to the same frame. Inner locator must not contain `FrameLocator`s.
has_not : Union[Locator, None]
    Matches elements that do not contain an element that matches an inner locator. Inner locator is queried against the
    outer one. For example, `article` that does not have `div` matches `<article><span>Playwright</span></article>`.

    Note that outer and inner locators must belong to the same frame. Inner locator must not contain `FrameLocator`s.

Returns
-------
Locator
NrZ  rn  r\  s         rJ   ro  Locator.locator=  r^  rM   rr  r   rs  c                \    [         R                  " U R                  R                  XS95      $ )aM  Locator.get_by_alt_text

Allows locating elements by their alt text.

**Usage**

For example, this method will find the image by alt text "Playwright logo":

```html
<img alt='Playwright logo'>
```

```py
await page.get_by_alt_text("Playwright logo").click()
```

Parameters
----------
text : Union[Pattern[str], str]
    Text to locate the element for.
exact : Union[bool, None]
    Whether to find an exact match: case-sensitive and whole-string. Default to false. Ignored when locating by a
    regular expression. Note that exact match still trims whitespace.

Returns
-------
Locator
ru  rv  rx  s      rJ   rw  Locator.get_by_alt_text>  rz  rM   c                \    [         R                  " U R                  R                  XS95      $ )a6  Locator.get_by_label

Allows locating input elements by the text of the associated `<label>` or `aria-labelledby` element, or by the
`aria-label` attribute.

**Usage**

For example, this method will find inputs by label "Username" and "Password" in the following DOM:

```html
<input aria-label="Username">
<label for="password-input">Password:</label>
<input id="password-input">
```

```py
await page.get_by_label("Username").fill("john")
await page.get_by_label("Password").fill("secret")
```

Parameters
----------
text : Union[Pattern[str], str]
    Text to locate the element for.
exact : Union[bool, None]
    Whether to find an exact match: case-sensitive and whole-string. Default to false. Ignored when locating by a
    regular expression. Note that exact match still trims whitespace.

Returns
-------
Locator
ru  r|  rx  s      rJ   r}  Locator.get_by_label<>  r  rM   c                \    [         R                  " U R                  R                  XS95      $ )a  Locator.get_by_placeholder

Allows locating input elements by the placeholder text.

**Usage**

For example, consider the following DOM structure.

```html
<input type="email" placeholder="name@example.com" />
```

You can fill the input after locating it by the placeholder text:

```py
await page.get_by_placeholder("name@example.com").fill("playwright@microsoft.com")
```

Parameters
----------
text : Union[Pattern[str], str]
    Text to locate the element for.
exact : Union[bool, None]
    Whether to find an exact match: case-sensitive and whole-string. Default to false. Ignored when locating by a
    regular expression. Note that exact match still trims whitespace.

Returns
-------
Locator
ru  r  rx  s      rJ   r  Locator.get_by_placeholdere>  r  rM   r  r  r  r`  r  r  r  r  r   r  r  c       	         n    [         R                  " U R                  R                  UUUUUUUUU	U
S9
5      $ )aK  Locator.get_by_role

Allows locating elements by their [ARIA role](https://www.w3.org/TR/wai-aria-1.2/#roles),
[ARIA attributes](https://www.w3.org/TR/wai-aria-1.2/#aria-attributes) and
[accessible name](https://w3c.github.io/accname/#dfn-accessible-name).

**Usage**

Consider the following DOM structure.

```html
<h3>Sign up</h3>
<label>
  <input type="checkbox" /> Subscribe
</label>
<br/>
<button>Submit</button>
```

You can locate each element by it's implicit role:

```py
await expect(page.get_by_role("heading", name="Sign up")).to_be_visible()

await page.get_by_role("checkbox", name="Subscribe").check()

await page.get_by_role("button", name=re.compile("submit", re.IGNORECASE)).click()
```

**Details**

Role selector **does not replace** accessibility audits and conformance tests, but rather gives early feedback
about the ARIA guidelines.

Many html elements have an implicitly [defined role](https://w3c.github.io/html-aam/#html-element-role-mappings)
that is recognized by the role selector. You can find all the
[supported roles here](https://www.w3.org/TR/wai-aria-1.2/#role_definitions). ARIA guidelines **do not recommend**
duplicating implicit roles and attributes by setting `role` and/or `aria-*` attributes to default values.

Parameters
----------
role : Union["alert", "alertdialog", "application", "article", "banner", "blockquote", "button", "caption", "cell", "checkbox", "code", "columnheader", "combobox", "complementary", "contentinfo", "definition", "deletion", "dialog", "directory", "document", "emphasis", "feed", "figure", "form", "generic", "grid", "gridcell", "group", "heading", "img", "insertion", "link", "list", "listbox", "listitem", "log", "main", "marquee", "math", "menu", "menubar", "menuitem", "menuitemcheckbox", "menuitemradio", "meter", "navigation", "none", "note", "option", "paragraph", "presentation", "progressbar", "radio", "radiogroup", "region", "row", "rowgroup", "rowheader", "scrollbar", "search", "searchbox", "separator", "slider", "spinbutton", "status", "strong", "subscript", "superscript", "switch", "tab", "table", "tablist", "tabpanel", "term", "textbox", "time", "timer", "toolbar", "tooltip", "tree", "treegrid", "treeitem"]
    Required aria role.
checked : Union[bool, None]
    An attribute that is usually set by `aria-checked` or native `<input type=checkbox>` controls.

    Learn more about [`aria-checked`](https://www.w3.org/TR/wai-aria-1.2/#aria-checked).
disabled : Union[bool, None]
    An attribute that is usually set by `aria-disabled` or `disabled`.

    **NOTE** Unlike most other attributes, `disabled` is inherited through the DOM hierarchy. Learn more about
    [`aria-disabled`](https://www.w3.org/TR/wai-aria-1.2/#aria-disabled).

expanded : Union[bool, None]
    An attribute that is usually set by `aria-expanded`.

    Learn more about [`aria-expanded`](https://www.w3.org/TR/wai-aria-1.2/#aria-expanded).
include_hidden : Union[bool, None]
    Option that controls whether hidden elements are matched. By default, only non-hidden elements, as
    [defined by ARIA](https://www.w3.org/TR/wai-aria-1.2/#tree_exclusion), are matched by role selector.

    Learn more about [`aria-hidden`](https://www.w3.org/TR/wai-aria-1.2/#aria-hidden).
level : Union[int, None]
    A number attribute that is usually present for roles `heading`, `listitem`, `row`, `treeitem`, with default values
    for `<h1>-<h6>` elements.

    Learn more about [`aria-level`](https://www.w3.org/TR/wai-aria-1.2/#aria-level).
name : Union[Pattern[str], str, None]
    Option to match the [accessible name](https://w3c.github.io/accname/#dfn-accessible-name). By default, matching is
    case-insensitive and searches for a substring, use `exact` to control this behavior.

    Learn more about [accessible name](https://w3c.github.io/accname/#dfn-accessible-name).
pressed : Union[bool, None]
    An attribute that is usually set by `aria-pressed`.

    Learn more about [`aria-pressed`](https://www.w3.org/TR/wai-aria-1.2/#aria-pressed).
selected : Union[bool, None]
    An attribute that is usually set by `aria-selected`.

    Learn more about [`aria-selected`](https://www.w3.org/TR/wai-aria-1.2/#aria-selected).
exact : Union[bool, None]
    Whether `name` is matched exactly: case-sensitive and whole-string. Defaults to false. Ignored when `name` is a
    regular expression. Note that exact match still trims whitespace.

Returns
-------
Locator
r  r  r  s              rJ   r  Locator.get_by_role>  r  rM   r  c                 \    [         R                  " U R                  R                  US95      $ )u5  Locator.get_by_test_id

Locate element by the test id.

**Usage**

Consider the following DOM structure.

```html
<button data-testid="directions">Itinéraire</button>
```

You can locate the element by it's test id:

```py
await page.get_by_test_id("directions").click()
```

**Details**

By default, the `data-testid` attribute is used as a test id. Use `selectors.set_test_id_attribute()` to
configure a different test id attribute if necessary.

Parameters
----------
test_id : Union[Pattern[str], str]
    Id to locate the element by.

Returns
-------
Locator
r  r  r  s     rJ   r  Locator.get_by_test_idW?  r  rM   c                \    [         R                  " U R                  R                  XS95      $ )a  Locator.get_by_text

Allows locating elements that contain given text.

See also `locator.filter()` that allows to match by another criteria, like an accessible role, and then
filter by the text content.

**Usage**

Consider the following DOM structure:

```html
<div>Hello <span>world</span></div>
<div>Hello</div>
```

You can locate by text substring, exact string, or a regular expression:

```py
# Matches <span>
page.get_by_text("world")

# Matches first <div>
page.get_by_text("Hello world")

# Matches second <div>
page.get_by_text("Hello", exact=True)

# Matches both <div>s
page.get_by_text(re.compile("Hello"))

# Matches second <div>
page.get_by_text(re.compile("^hello$", re.IGNORECASE))
```

**Details**

Matching by text always normalizes whitespace, even with exact match. For example, it turns multiple spaces into
one, turns line breaks into spaces and ignores leading and trailing whitespace.

Input elements of the type `button` and `submit` are matched by their `value` instead of the text content. For
example, locating by text `"Log in"` matches `<input type=button value="Log in">`.

Parameters
----------
text : Union[Pattern[str], str]
    Text to locate the element for.
exact : Union[bool, None]
    Whether to find an exact match: case-sensitive and whole-string. Default to false. Ignored when locating by a
    regular expression. Note that exact match still trims whitespace.

Returns
-------
Locator
ru  r  rx  s      rJ   r  Locator.get_by_text}?  r  rM   c                \    [         R                  " U R                  R                  XS95      $ )a  Locator.get_by_title

Allows locating elements by their title attribute.

**Usage**

Consider the following DOM structure.

```html
<span title='Issues count'>25 issues</span>
```

You can check the issues count after locating it by the title text:

```py
await expect(page.get_by_title("Issues count")).to_have_text("25 issues")
```

Parameters
----------
text : Union[Pattern[str], str]
    Text to locate the element for.
exact : Union[bool, None]
    Whether to find an exact match: case-sensitive and whole-string. Default to false. Ignored when locating by a
    regular expression. Note that exact match still trims whitespace.

Returns
-------
Locator
ru  r  rx  s      rJ   r  Locator.get_by_title?  r  rM   r  c                 \    [         R                  " U R                  R                  US95      $ )aw  Locator.frame_locator

When working with iframes, you can create a frame locator that will enter the iframe and allow locating elements in
that iframe:

**Usage**

```py
locator = page.frame_locator("iframe").get_by_text("Submit")
await locator.click()
```

Parameters
----------
selector : str
    A selector to use when resolving DOM element.

Returns
-------
FrameLocator
r  r  r  s     rJ   r  Locator.frame_locator?  s'    .   !=!=x!=!PQQrM   r'   c                x   #    [         R                  " U R                  R                  US9I Sh  vN 5      $  N7f)a  Locator.element_handle

Resolves given locator to the first matching DOM element. If there are no matching elements, waits for one. If
multiple elements match the locator, throws.

Parameters
----------
timeout : Union[float, None]
    Maximum time in milliseconds. Defaults to `30000` (30 seconds). Pass `0` to disable timeout. The default value can
    be changed by using the `browser_context.set_default_timeout()` or `page.set_default_timeout()` methods.

Returns
-------
ElementHandle
r4  N)r   r`   rF   element_handler  s     rJ   r=  Locator.element_handle?  s0     &   t~~'D'DW'D'U!UVV!Ur   c                 z   #    [         R                  " U R                  R                  5       I Sh  vN 5      $  N7f)zLocator.element_handles

Resolves given locator to all matching DOM elements. If there are no matching elements, returns an empty list.

Returns
-------
List[ElementHandle]
N)r   r   rF   element_handlesrH   s    rJ   r@  Locator.element_handles@  s+      %%DNN,J,J,L&LMM&Lry   r(  c                 \    [         R                  " U R                  R                  US95      $ )zLocator.nth

Returns locator to the n-th matching element. It's zero based, `nth(0)` selects the first element.

**Usage**

```py
banana = await page.get_by_role("listitem").nth(2)
```

Parameters
----------
index : int

Returns
-------
Locator
rp  rq  rs  s     rJ   rr  Locator.nth@  s'    (   !3!3%!3!@AArM   )re  rf  rg  rh  r  r  c          
          [         R                  " U R                  R                  UUU(       a  UR                  OSU(       a  UR                  OSUS95      $ )a  Locator.filter

This method narrows existing locator according to the options, for example filters by text. It can be chained to
filter multiple times.

**Usage**

```py
row_locator = page.locator("tr")
# ...
await row_locator.filter(has_text="text in column 1").filter(
    has=page.get_by_role("button", name="column 2 button")
).screenshot()

```

Parameters
----------
has_text : Union[Pattern[str], str, None]
    Matches elements containing specified text somewhere inside, possibly in a child or a descendant element. When
    passed a [string], matching is case-insensitive and searches for a substring. For example, `"Playwright"` matches
    `<article><div>Playwright</div></article>`.
has_not_text : Union[Pattern[str], str, None]
    Matches elements that do not contain specified text somewhere inside, possibly in a child or a descendant element.
    When passed a [string], matching is case-insensitive and searches for a substring.
has : Union[Locator, None]
    Narrows down the results of the method to those which contain elements matching this relative locator. For example,
    `article` that has `text=Playwright` matches `<article><div>Playwright</div></article>`.

    Inner locator **must be relative** to the outer locator and is queried starting with the outer locator match, not
    the document root. For example, you can find `content` that has `div` in
    `<article><content><div>Playwright</div></content></article>`. However, looking for `content` that has `article
    div` will fail, because the inner locator must be relative and should not use any elements outside the `content`.

    Note that outer and inner locators must belong to the same frame. Inner locator must not contain `FrameLocator`s.
has_not : Union[Locator, None]
    Matches elements that do not contain an element that matches an inner locator. Inner locator is queried against the
    outer one. For example, `article` that does not have `div` matches `<article><span>Playwright</span></article>`.

    Note that outer and inner locators must belong to the same frame. Inner locator must not contain `FrameLocator`s.
visible : Union[bool, None]
    Only matches visible or invisible elements.

Returns
-------
Locator
N)rk  rl  rg  rm  r  )r   r`   rF   filter)rI   re  rf  rg  rh  r  s         rJ   rE  Locator.filter4@  sP    r   NN!! '%(CMMd,3w(( " 
 	
rM   c                 p    [         R                  " U R                  R                  UR                  S95      $ )a  Locator.or_

Creates a locator matching all elements that match one or both of the two locators.

Note that when both locators match something, the resulting locator will have multiple matches, potentially causing
a [locator strictness](https://playwright.dev/python/docs/locators#strictness) violation.

**Usage**

Consider a scenario where you'd like to click on a "New email" button, but sometimes a security settings dialog
shows up instead. In this case, you can wait for either a "New email" button, or a dialog and act accordingly.

**NOTE** If both "New email" button and security dialog appear on screen, the "or" locator will match both of them,
possibly throwing the ["strict mode violation" error](https://playwright.dev/python/docs/locators#strictness). In this case, you can use
`locator.first()` to only match one of them.

```py
new_email = page.get_by_role("button", name="New")
dialog = page.get_by_text("Confirm security settings")
await expect(new_email.or_(dialog).first).to_be_visible()
if (await dialog.is_visible()):
  await page.get_by_role("button", name="Dismiss").click()
await new_email.click()
```

Parameters
----------
locator : Locator
    Alternative locator to match.

Returns
-------
Locator
r  )r   r`   rF   or_r  s     rJ   rH  Locator.or_w@  s.    H   !3!3G<M<M!3!NOOrM   c                 p    [         R                  " U R                  R                  UR                  S95      $ )aV  Locator.and_

Creates a locator that matches both this locator and the argument locator.

**Usage**

The following example finds a button with a specific title.

```py
button = page.get_by_role("button").and_(page.getByTitle("Subscribe"))
```

Parameters
----------
locator : Locator
    Additional locator to match.

Returns
-------
Locator
r  )r   r`   rF   and_r  s     rJ   rK  Locator.and_@  s-    .   !4!4W=N=N!4!OPPrM   c                x   #    [         R                  " U R                  R                  US9I Sh  vN 5      $  N7f)a  Locator.focus

Calls [focus](https://developer.mozilla.org/en-US/docs/Web/API/HTMLElement/focus) on the matching element.

Parameters
----------
timeout : Union[float, None]
    Maximum time in milliseconds. Defaults to `30000` (30 seconds). Pass `0` to disable timeout. The default value can
    be changed by using the `browser_context.set_default_timeout()` or `page.set_default_timeout()` methods.
r4  NrR  r  s     rJ   rS  Locator.focus@  s0      &&T^^-A-A'-A-R'RSS'Rr   c                x   #    [         R                  " U R                  R                  US9I Sh  vN 5      $  N7f)a  Locator.blur

Calls [blur](https://developer.mozilla.org/en-US/docs/Web/API/HTMLElement/blur) on the element.

Parameters
----------
timeout : Union[float, None]
    Maximum time in milliseconds. Defaults to `30000` (30 seconds). Pass `0` to disable timeout. The default value can
    be changed by using the `browser_context.set_default_timeout()` or `page.set_default_timeout()` methods.
r4  N)r   rE   rF   blurr  s     rJ   rP  Locator.blur@  s0      &&T^^-@-@-@-Q'QRR'Qr   c                 z   #    [         R                  " U R                  R                  5       I Sh  vN 5      $  N7f)a  Locator.all

When the locator points to a list of elements, this returns an array of locators, pointing to their respective
elements.

**NOTE** `locator.all()` does not wait for elements to match the locator, and instead immediately returns
whatever is present in the page.

When the list of elements changes dynamically, `locator.all()` will produce unpredictable and flaky
results.

When the list of elements is stable, but loaded dynamically, wait for the full list to finish loading before
calling `locator.all()`.

**Usage**

```py
for li in await page.get_by_role('listitem').all():
  await li.click();
```

Returns
-------
List[Locator]
N)r   r   rF   allrH   s    rJ   rS  Locator.all@  s+     6 %%DNN,>,>,@&@AA&@ry   c                 z   #    [         R                  " U R                  R                  5       I Sh  vN 5      $  N7f)a  Locator.count

Returns the number of elements matching the locator.

**NOTE** If you need to assert the number of elements on the page, prefer `locator_assertions.to_have_count()`
to avoid flakiness. See [assertions guide](https://playwright.dev/python/docs/test-assertions) for more details.

**Usage**

```py
count = await page.get_by_role("listitem").count()
```

Returns
-------
int
N)r   rE   rF   countrH   s    rJ   rV  Locator.count@  s+     & &&T^^-A-A-C'CDD'Cry   )r
  r	  r   r  r  r  r  r  r  c                   #    [         R                  " U R                  R                  UR                  UUUUUUS9I Sh  vN 5      $  N7f)aH  Locator.drag_to

Drag the source element towards the target element and drop it.

**Details**

This method drags the locator to another target locator or target position. It will first move to the source
element, perform a `mousedown`, then move to the target element or position and perform a `mouseup`.

**Usage**

```py
source = page.locator("#source")
target = page.locator("#target")

await source.drag_to(target)
# or specify exact positions relative to the top-left corners of the elements:
await source.drag_to(
  target,
  source_position={"x": 34, "y": 7},
  target_position={"x": 10, "y": 20}
)
```

Parameters
----------
target : Locator
    Locator of the element to drag to.
force : Union[bool, None]
    Whether to bypass the [actionability](../actionability.md) checks. Defaults to `false`.
no_wait_after : Union[bool, None]
    This option has no effect.
    Deprecated: This option has no effect.
timeout : Union[float, None]
    Maximum time in milliseconds. Defaults to `30000` (30 seconds). Pass `0` to disable timeout. The default value can
    be changed by using the `browser_context.set_default_timeout()` or `page.set_default_timeout()` methods.
trial : Union[bool, None]
    When set, this method only performs the [actionability](../actionability.md) checks and skips the action. Defaults
    to `false`. Useful to wait until the element is ready for the action without performing it.
source_position : Union[{x: float, y: float}, None]
    Clicks on the source element at this point relative to the top-left corner of the element's padding box. If not
    specified, some visible point of the element is used.
target_position : Union[{x: float, y: float}, None]
    Drops on the target element at this point relative to the top-left corner of the element's padding box. If not
    specified, some visible point of the element is used.
)r  r
  r  r   r  r  r  N)r   rE   rF   drag_to)rI   r  r
  r	  r   r  r  r  s           rJ   rY  Locator.drag_toA  sW     t &&..(('').. )  

 
	
rC  c                x   #    [         R                  " U R                  R                  XS9I Sh  vN 5      $  N7f)a  Locator.get_attribute

Returns the matching element's attribute value.

**NOTE** If you need to assert an element's attribute, prefer `locator_assertions.to_have_attribute()` to
avoid flakiness. See [assertions guide](https://playwright.dev/python/docs/test-assertions) for more details.

Parameters
----------
name : str
    Attribute name to get the value for.
timeout : Union[float, None]
    Maximum time in milliseconds. Defaults to `30000` (30 seconds). Pass `0` to disable timeout. The default value can
    be changed by using the `browser_context.set_default_timeout()` or `page.set_default_timeout()` methods.

Returns
-------
Union[str, None]
)r   r   Nr  )rI   r   r   s      rJ   r  Locator.get_attributeJA  s5     . &&....D.JJ
 	
Jr   r  c                   #    [         R                  " U R                  R                  [         R                  " U5      UUUUUS9I Sh  vN 5      $  N7f)ar  Locator.hover

Hover over the matching element.

**Usage**

```py
await page.get_by_role("link").hover()
```

**Details**

This method hovers over the element by performing the following steps:
1. Wait for [actionability](https://playwright.dev/python/docs/actionability) checks on the element, unless `force` option is set.
1. Scroll the element into view if needed.
1. Use `page.mouse` to hover over the center of the element, or the specified `position`.

If the element is detached from the DOM at any moment during the action, this method throws.

When all steps combined have not finished during the specified `timeout`, this method throws a `TimeoutError`.
Passing zero timeout disables this.

Parameters
----------
modifiers : Union[Sequence[Union["Alt", "Control", "ControlOrMeta", "Meta", "Shift"]], None]
    Modifier keys to press. Ensures that only these modifiers are pressed during the operation, and then restores
    current modifiers back. If not specified, currently pressed modifiers are used. "ControlOrMeta" resolves to
    "Control" on Windows and Linux and to "Meta" on macOS.
position : Union[{x: float, y: float}, None]
    A point to use relative to the top-left corner of element padding box. If not specified, uses some visible point of
    the element.
timeout : Union[float, None]
    Maximum time in milliseconds. Defaults to `30000` (30 seconds). Pass `0` to disable timeout. The default value can
    be changed by using the `browser_context.set_default_timeout()` or `page.set_default_timeout()` methods.
no_wait_after : Union[bool, None]
    This option has no effect.
    Deprecated: This option has no effect.
force : Union[bool, None]
    Whether to bypass the [actionability](../actionability.md) checks. Defaults to `false`.
trial : Union[bool, None]
    When set, this method only performs the [actionability](../actionability.md) checks and skips the action. Defaults
    to `false`. Useful to wait until the element is ready for the action without performing it. Note that keyboard
    `modifiers` will be pressed regardless of `trial` to allow testing elements which are only visible when those keys
    are pressed.
r  Nr  r  s          rJ   r  Locator.hovereA  sW     t &&..&&!//)4!) '  	
 		
r  c                x   #    [         R                  " U R                  R                  US9I Sh  vN 5      $  N7f)a  Locator.inner_html

Returns the [`element.innerHTML`](https://developer.mozilla.org/en-US/docs/Web/API/Element/innerHTML).

Parameters
----------
timeout : Union[float, None]
    Maximum time in milliseconds. Defaults to `30000` (30 seconds). Pass `0` to disable timeout. The default value can
    be changed by using the `browser_context.set_default_timeout()` or `page.set_default_timeout()` methods.

Returns
-------
str
r4  Nr  r  s     rJ   r  Locator.inner_htmlA  s0       &&T^^-F-Fw-F-W'WXX'Wr   c                x   #    [         R                  " U R                  R                  US9I Sh  vN 5      $  N7f)a  Locator.inner_text

Returns the [`element.innerText`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLElement/innerText).

**NOTE** If you need to assert text on the page, prefer `locator_assertions.to_have_text()` with
`useInnerText` option to avoid flakiness. See [assertions guide](https://playwright.dev/python/docs/test-assertions) for more details.

Parameters
----------
timeout : Union[float, None]
    Maximum time in milliseconds. Defaults to `30000` (30 seconds). Pass `0` to disable timeout. The default value can
    be changed by using the `browser_context.set_default_timeout()` or `page.set_default_timeout()` methods.

Returns
-------
str
r4  Nr  r  s     rJ   r  Locator.inner_textA  s0     & &&T^^-F-Fw-F-W'WXX'Wr   c                x   #    [         R                  " U R                  R                  US9I Sh  vN 5      $  N7f)a  Locator.input_value

Returns the value for the matching `<input>` or `<textarea>` or `<select>` element.

**NOTE** If you need to assert input value, prefer `locator_assertions.to_have_value()` to avoid flakiness.
See [assertions guide](https://playwright.dev/python/docs/test-assertions) for more details.

**Usage**

```py
value = await page.get_by_role("textbox").input_value()
```

**Details**

Throws elements that are not an input, textarea or a select. However, if the element is inside the `<label>`
element that has an associated
[control](https://developer.mozilla.org/en-US/docs/Web/API/HTMLLabelElement/control), returns the value of the
control.

Parameters
----------
timeout : Union[float, None]
    Maximum time in milliseconds. Defaults to `30000` (30 seconds). Pass `0` to disable timeout. The default value can
    be changed by using the `browser_context.set_default_timeout()` or `page.set_default_timeout()` methods.

Returns
-------
str
r4  NrF  r  s     rJ   rG  Locator.input_valueA  s6     @ &&..,,W,==
 	
=r   c                x   #    [         R                  " U R                  R                  US9I Sh  vN 5      $  N7f)a  Locator.is_checked

Returns whether the element is checked. Throws if the element is not a checkbox or radio input.

**NOTE** If you need to assert that checkbox is checked, prefer `locator_assertions.to_be_checked()` to avoid
flakiness. See [assertions guide](https://playwright.dev/python/docs/test-assertions) for more details.

**Usage**

```py
checked = await page.get_by_role("checkbox").is_checked()
```

Parameters
----------
timeout : Union[float, None]
    Maximum time in milliseconds. Defaults to `30000` (30 seconds). Pass `0` to disable timeout. The default value can
    be changed by using the `browser_context.set_default_timeout()` or `page.set_default_timeout()` methods.

Returns
-------
bool
r4  Nr  r  s     rJ   r  Locator.is_checkedA  0     2 &&T^^-F-Fw-F-W'WXX'Wr   c                x   #    [         R                  " U R                  R                  US9I Sh  vN 5      $  N7f)a  Locator.is_disabled

Returns whether the element is disabled, the opposite of [enabled](https://playwright.dev/python/docs/actionability#enabled).

**NOTE** If you need to assert that an element is disabled, prefer `locator_assertions.to_be_disabled()` to
avoid flakiness. See [assertions guide](https://playwright.dev/python/docs/test-assertions) for more details.

**Usage**

```py
disabled = await page.get_by_role("button").is_disabled()
```

Parameters
----------
timeout : Union[float, None]
    Maximum time in milliseconds. Defaults to `30000` (30 seconds). Pass `0` to disable timeout. The default value can
    be changed by using the `browser_context.set_default_timeout()` or `page.set_default_timeout()` methods.

Returns
-------
bool
r4  Nr  r  s     rJ   r  Locator.is_disabledB  s5     2 &&..,,W,==
 	
=r   c                x   #    [         R                  " U R                  R                  US9I Sh  vN 5      $  N7f)a  Locator.is_editable

Returns whether the element is [editable](https://playwright.dev/python/docs/actionability#editable). If the target element is not an `<input>`,
`<textarea>`, `<select>`, `[contenteditable]` and does not have a role allowing `[aria-readonly]`, this method
throws an error.

**NOTE** If you need to assert that an element is editable, prefer `locator_assertions.to_be_editable()` to
avoid flakiness. See [assertions guide](https://playwright.dev/python/docs/test-assertions) for more details.

**Usage**

```py
editable = await page.get_by_role("textbox").is_editable()
```

Parameters
----------
timeout : Union[float, None]
    Maximum time in milliseconds. Defaults to `30000` (30 seconds). Pass `0` to disable timeout. The default value can
    be changed by using the `browser_context.set_default_timeout()` or `page.set_default_timeout()` methods.

Returns
-------
bool
r4  Nr  r  s     rJ   r  Locator.is_editable-B  s5     6 &&..,,W,==
 	
=r   c                x   #    [         R                  " U R                  R                  US9I Sh  vN 5      $  N7f)a  Locator.is_enabled

Returns whether the element is [enabled](https://playwright.dev/python/docs/actionability#enabled).

**NOTE** If you need to assert that an element is enabled, prefer `locator_assertions.to_be_enabled()` to
avoid flakiness. See [assertions guide](https://playwright.dev/python/docs/test-assertions) for more details.

**Usage**

```py
enabled = await page.get_by_role("button").is_enabled()
```

Parameters
----------
timeout : Union[float, None]
    Maximum time in milliseconds. Defaults to `30000` (30 seconds). Pass `0` to disable timeout. The default value can
    be changed by using the `browser_context.set_default_timeout()` or `page.set_default_timeout()` methods.

Returns
-------
bool
r4  Nr  r  s     rJ   r  Locator.is_enabledLB  rg  r   c                x   #    [         R                  " U R                  R                  US9I Sh  vN 5      $  N7f)a  Locator.is_hidden

Returns whether the element is hidden, the opposite of [visible](https://playwright.dev/python/docs/actionability#visible).

**NOTE** If you need to assert that element is hidden, prefer `locator_assertions.to_be_hidden()` to avoid
flakiness. See [assertions guide](https://playwright.dev/python/docs/test-assertions) for more details.

**Usage**

```py
hidden = await page.get_by_role("button").is_hidden()
```

Parameters
----------
timeout : Union[float, None]
    Deprecated: This option is ignored. `locator.is_hidden()` does not wait for the element to become hidden and returns immediately.

Returns
-------
bool
r4  Nr  r  s     rJ   r  Locator.is_hiddengB  s0     0 &&T^^-E-Eg-E-V'VWW'Vr   c                x   #    [         R                  " U R                  R                  US9I Sh  vN 5      $  N7f)an  Locator.is_visible

Returns whether the element is [visible](https://playwright.dev/python/docs/actionability#visible).

**NOTE** If you need to assert that element is visible, prefer `locator_assertions.to_be_visible()` to avoid
flakiness. See [assertions guide](https://playwright.dev/python/docs/test-assertions) for more details.

**Usage**

```py
visible = await page.get_by_role("button").is_visible()
```

Parameters
----------
timeout : Union[float, None]
    Deprecated: This option is ignored. `locator.is_visible()` does not wait for the element to become visible and returns immediately.

Returns
-------
bool
r4  Nr  r  s     rJ   r  Locator.is_visibleB  s0     0 &&T^^-F-Fw-F-W'WXX'Wr   rU  rh  c          	      z   #    [         R                  " U R                  R                  XX4S9I Sh  vN 5      $  N7f)a	  Locator.press

Focuses the matching element and presses a combination of the keys.

**Usage**

```py
await page.get_by_role("textbox").press("Backspace")
```

**Details**

Focuses the element, and then uses `keyboard.down()` and `keyboard.up()`.

`key` can specify the intended
[keyboardEvent.key](https://developer.mozilla.org/en-US/docs/Web/API/KeyboardEvent/key) value or a single character
to generate the text for. A superset of the `key` values can be found
[here](https://developer.mozilla.org/en-US/docs/Web/API/KeyboardEvent/key/Key_Values). Examples of the keys are:

`F1` - `F12`, `Digit0`- `Digit9`, `KeyA`- `KeyZ`, `Backquote`, `Minus`, `Equal`, `Backslash`, `Backspace`, `Tab`,
`Delete`, `Escape`, `ArrowDown`, `End`, `Enter`, `Home`, `Insert`, `PageDown`, `PageUp`, `ArrowRight`, `ArrowUp`,
etc.

Following modification shortcuts are also supported: `Shift`, `Control`, `Alt`, `Meta`, `ShiftLeft`,
`ControlOrMeta`. `ControlOrMeta` resolves to `Control` on Windows and Linux and to `Meta` on macOS.

Holding down `Shift` will type the text that corresponds to the `key` in the upper case.

If `key` is a single character, it is case-sensitive, so the values `a` and `A` will generate different respective
texts.

Shortcuts such as `key: "Control+o"`, `key: "Control++` or `key: "Control+Shift+T"` are supported as well. When
specified with the modifier, modifier is pressed and being held while the subsequent key is being pressed.

Parameters
----------
key : str
    Name of the key to press or a character to generate, such as `ArrowLeft` or `a`.
delay : Union[float, None]
    Time to wait between `keydown` and `keyup` in milliseconds. Defaults to 0.
timeout : Union[float, None]
    Maximum time in milliseconds. Defaults to `30000` (30 seconds). Pass `0` to disable timeout. The default value can
    be changed by using the `browser_context.set_default_timeout()` or `page.set_default_timeout()` methods.
no_wait_after : Union[bool, None]
    Actions that initiate navigations are waiting for these navigations to happen and for pages to start loading. You
    can opt out of waiting via setting this flag. You would only need this option in the exceptional cases such as
    navigating to inaccessible pages. Defaults to `false`.
    Deprecated: This option will default to `true` in the future.
r\  Nr|  r]  s        rJ   r}  Locator.pressB  sA     t &&..&&g '  
 	
ry   rw  r  r   rx  ry  rz  r  r{  r  r|  r  r}  r~  r  c                   #    [         R                  " U R                  R                  UUUUUUUU[         R                  " U	5      U
US9I Sh  vN 5      $  N7f)a  Locator.screenshot

Take a screenshot of the element matching the locator.

**Usage**

```py
await page.get_by_role("link").screenshot()
```

Disable animations and save screenshot to a file:

```py
await page.get_by_role("link").screenshot(animations="disabled", path="link.png")
```

**Details**

This method captures a screenshot of the page, clipped to the size and position of a particular element matching
the locator. If the element is covered by other elements, it will not be actually visible on the screenshot. If the
element is a scrollable container, only the currently scrolled content will be visible on the screenshot.

This method waits for the [actionability](https://playwright.dev/python/docs/actionability) checks, then scrolls element into view before taking
a screenshot. If the element is detached from DOM, the method throws an error.

Returns the buffer with the captured screenshot.

Parameters
----------
timeout : Union[float, None]
    Maximum time in milliseconds. Defaults to `30000` (30 seconds). Pass `0` to disable timeout. The default value can
    be changed by using the `browser_context.set_default_timeout()` or `page.set_default_timeout()` methods.
type : Union["jpeg", "png", None]
    Specify screenshot type, defaults to `png`.
path : Union[pathlib.Path, str, None]
    The file path to save the image to. The screenshot type will be inferred from file extension. If `path` is a
    relative path, then it is resolved relative to the current working directory. If no path is provided, the image
    won't be saved to the disk.
quality : Union[int, None]
    The quality of the image, between 0-100. Not applicable to `png` images.
omit_background : Union[bool, None]
    Hides default white background and allows capturing screenshots with transparency. Not applicable to `jpeg` images.
    Defaults to `false`.
animations : Union["allow", "disabled", None]
    When set to `"disabled"`, stops CSS animations, CSS transitions and Web Animations. Animations get different
    treatment depending on their duration:
    - finite animations are fast-forwarded to completion, so they'll fire `transitionend` event.
    - infinite animations are canceled to initial state, and then played over after the screenshot.

    Defaults to `"allow"` that leaves animations untouched.
caret : Union["hide", "initial", None]
    When set to `"hide"`, screenshot will hide text caret. When set to `"initial"`, text caret behavior will not be
    changed.  Defaults to `"hide"`.
scale : Union["css", "device", None]
    When set to `"css"`, screenshot will have a single pixel per each css pixel on the page. For high-dpi devices, this
    will keep screenshots small. Using `"device"` option will produce a single pixel per each device pixel, so
    screenshots of high-dpi devices will be twice as large or even larger.

    Defaults to `"device"`.
mask : Union[Sequence[Locator], None]
    Specify locators that should be masked when the screenshot is taken. Masked elements will be overlaid with a pink
    box `#FF00FF` (customized by `maskColor`) that completely covers its bounding box. The mask is also applied to
    invisible elements, see [Matching only visible elements](../locators.md#matching-only-visible-elements) to disable
    that.
mask_color : Union[str, None]
    Specify the color of the overlay box for masked elements, in
    [CSS color format](https://developer.mozilla.org/en-US/docs/Web/CSS/color_value). Default color is pink `#FF00FF`.
style : Union[str, None]
    Text of the stylesheet to apply while making the screenshot. This is where you can hide dynamic elements, make
    elements invisible or change their properties to help you creating repeatable screenshots. This stylesheet pierces
    the Shadow DOM and applies to the inner frames.

Returns
-------
bytes
r  Nr  r  s               rJ   r  Locator.screenshotB  sf     x &&..++.%__T*$ ,  
 	
r  r   refrw  c                x   #    [         R                  " U R                  R                  XS9I Sh  vN 5      $  N7f)aq  Locator.aria_snapshot

Captures the aria snapshot of the given element. Read more about [aria snapshots](https://playwright.dev/python/docs/aria-snapshots) and
`locator_assertions.to_match_aria_snapshot()` for the corresponding assertion.

**Usage**

```py
await page.get_by_role("link").aria_snapshot()
```

**Details**

This method captures the aria snapshot of the given element. The snapshot is a string that represents the state of
the element and its children. The snapshot can be used to assert the state of the element in the test, or to
compare it to state in the future.

The ARIA snapshot is represented using [YAML](https://yaml.org/spec/1.2.2/) markup language:
- The keys of the objects are the roles and optional accessible names of the elements.
- The values are either text content or an array of child elements.
- Generic static text can be represented with the `text` key.

Below is the HTML markup and the respective ARIA snapshot:

```html
<ul aria-label="Links">
  <li><a href="/">Home</a></li>
  <li><a href="/about">About</a></li>
<ul>
```

```yml
- list "Links":
  - listitem:
    - link "Home"
  - listitem:
    - link "About"
```

Parameters
----------
timeout : Union[float, None]
    Maximum time in milliseconds. Defaults to `30000` (30 seconds). Pass `0` to disable timeout. The default value can
    be changed by using the `browser_context.set_default_timeout()` or `page.set_default_timeout()` methods.
ref : Union[bool, None]
    Generate symbolic reference for each element. One can use `aria-ref=<ref>` locator immediately after capturing the
    snapshot to perform actions on the element.

Returns
-------
str
rv  N)r   rE   rF   aria_snapshot)rI   r   rw  s      rJ   ry  Locator.aria_snapshotGC  s6     v &&....w.HH
 	
Hr   c                x   #    [         R                  " U R                  R                  US9I Sh  vN 5      $  N7f)a  Locator.scroll_into_view_if_needed

This method waits for [actionability](https://playwright.dev/python/docs/actionability) checks, then tries to scroll element into view, unless
it is completely visible as defined by
[IntersectionObserver](https://developer.mozilla.org/en-US/docs/Web/API/Intersection_Observer_API)'s `ratio`.

See [scrolling](https://playwright.dev/python/docs/input#scrolling) for alternative ways to scroll.

Parameters
----------
timeout : Union[float, None]
    Maximum time in milliseconds. Defaults to `30000` (30 seconds). Pass `0` to disable timeout. The default value can
    be changed by using the `browser_context.set_default_timeout()` or `page.set_default_timeout()` methods.
r4  Nr  r  s     rJ   r  "Locator.scroll_into_view_if_neededC  s5     $ &&..;;G;LL
 	
Lr   )r(  r)  r*  r   r	  r
  r)  r*  c                $  #    [         R                  " U R                  R                  [         R                  " U5      [         R                  " U5      [         R                  " U5      [         R                  " U5      UUUS9I Sh  vN 5      $  N7f)aH	  Locator.select_option

Selects option or options in `<select>`.

**Details**

This method waits for [actionability](https://playwright.dev/python/docs/actionability) checks, waits until all specified options are present in
the `<select>` element and selects these options.

If the target element is not a `<select>` element, this method throws an error. However, if the element is inside
the `<label>` element that has an associated
[control](https://developer.mozilla.org/en-US/docs/Web/API/HTMLLabelElement/control), the control will be used
instead.

Returns the array of option values that have been successfully selected.

Triggers a `change` and `input` event once all the provided options have been selected.

**Usage**

```html
<select multiple>
  <option value="red">Red</option>
  <option value="green">Green</option>
  <option value="blue">Blue</option>
</select>
```

```py
# single selection matching the value or label
await element.select_option("blue")
# single selection matching the label
await element.select_option(label="blue")
# multiple selection for blue, red and second option
await element.select_option(value=["red", "green", "blue"])
```

Parameters
----------
value : Union[Sequence[str], str, None]
    Options to select by value. If the `<select>` has the `multiple` attribute, all given options are selected,
    otherwise only the first option matching one of the passed options is selected. Optional.
index : Union[Sequence[int], int, None]
    Options to select by index. Optional.
label : Union[Sequence[str], str, None]
    Options to select by label. If the `<select>` has the `multiple` attribute, all given options are selected,
    otherwise only the first option matching one of the passed options is selected. Optional.
element : Union[ElementHandle, Sequence[ElementHandle], None]
    Option elements to select. Optional.
timeout : Union[float, None]
    Maximum time in milliseconds. Defaults to `30000` (30 seconds). Pass `0` to disable timeout. The default value can
    be changed by using the `browser_context.set_default_timeout()` or `page.set_default_timeout()` methods.
no_wait_after : Union[bool, None]
    This option has no effect.
    Deprecated: This option has no effect.
force : Union[bool, None]
    Whether to bypass the [actionability](../actionability.md) checks. Defaults to `false`.

Returns
-------
List[str]
)r+  r(  r)  r*  r   r  r
  Nr-  )rI   r+  r(  r)  r*  r   r	  r
  s           rJ   r.  Locator.select_optionC  su     X &&....ooe,ooe,ooe,0) /  

 
	
r0  r>  c                x   #    [         R                  " U R                  R                  XS9I Sh  vN 5      $  N7f)a  Locator.select_text

This method waits for [actionability](https://playwright.dev/python/docs/actionability) checks, then focuses the element and selects all its
text content.

If the element is inside the `<label>` element that has an associated
[control](https://developer.mozilla.org/en-US/docs/Web/API/HTMLLabelElement/control), focuses and selects text in
the control instead.

Parameters
----------
force : Union[bool, None]
    Whether to bypass the [actionability](../actionability.md) checks. Defaults to `false`.
timeout : Union[float, None]
    Maximum time in milliseconds. Defaults to `30000` (30 seconds). Pass `0` to disable timeout. The default value can
    be changed by using the `browser_context.set_default_timeout()` or `page.set_default_timeout()` methods.
r>  Nr@  rB  s      rJ   rA  Locator.select_textC  rD  r   rI  rJ  c                   #    [         R                  " U R                  R                  [         R                  " U5      X#S9I Sh  vN 5      $  N7f)aQ  Locator.set_input_files

Upload file or multiple files into `<input type=file>`. For inputs with a `[webkitdirectory]` attribute, only a
single directory path is supported.

**Usage**

```py
# Select one file
await page.get_by_label("Upload file").set_input_files('myfile.pdf')

# Select multiple files
await page.get_by_label("Upload files").set_input_files(['file1.txt', 'file2.txt'])

# Select a directory
await page.get_by_label("Upload directory").set_input_files('mydir')

# Remove all the selected files
await page.get_by_label("Upload file").set_input_files([])

# Upload buffer from memory
await page.get_by_label("Upload file").set_input_files(
    files=[
        {"name": "test.txt", "mimeType": "text/plain", "buffer": b"this is a test"}
    ],
)
```

**Details**

Sets the value of the file input to these file paths or files. If some of the `filePaths` are relative paths, then
they are resolved relative to the current working directory. For empty array, clears the selected files.

This method expects `Locator` to point to an
[input element](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input). However, if the element is inside
the `<label>` element that has an associated
[control](https://developer.mozilla.org/en-US/docs/Web/API/HTMLLabelElement/control), targets the control instead.

Parameters
----------
files : Union[Sequence[Union[pathlib.Path, str]], Sequence[{name: str, mimeType: str, buffer: bytes}], pathlib.Path, str, {name: str, mimeType: str, buffer: bytes}]
timeout : Union[float, None]
    Maximum time in milliseconds. Defaults to `30000` (30 seconds). Pass `0` to disable timeout. The default value can
    be changed by using the `browser_context.set_default_timeout()` or `page.set_default_timeout()` methods.
no_wait_after : Union[bool, None]
    This option has no effect.
    Deprecated: This option has no effect.
rL  NrM  rO  s       rJ   rN  Locator.set_input_filesD  sJ     | &&..00ooe,g 1  
 	
r  r1  c                   #    [         R                  " U R                  R                  [         R                  " U5      UUUUUS9I Sh  vN 5      $  N7f)aX	  Locator.tap

Perform a tap gesture on the element matching the locator. For examples of emulating other gestures by manually
dispatching touch events, see the [emulating legacy touch events](https://playwright.dev/python/docs/touch-events) page.

**Details**

This method taps the element by performing the following steps:
1. Wait for [actionability](https://playwright.dev/python/docs/actionability) checks on the element, unless `force` option is set.
1. Scroll the element into view if needed.
1. Use `page.touchscreen` to tap the center of the element, or the specified `position`.

If the element is detached from the DOM at any moment during the action, this method throws.

When all steps combined have not finished during the specified `timeout`, this method throws a `TimeoutError`.
Passing zero timeout disables this.

**NOTE** `element.tap()` requires that the `hasTouch` option of the browser context be set to true.

Parameters
----------
modifiers : Union[Sequence[Union["Alt", "Control", "ControlOrMeta", "Meta", "Shift"]], None]
    Modifier keys to press. Ensures that only these modifiers are pressed during the operation, and then restores
    current modifiers back. If not specified, currently pressed modifiers are used. "ControlOrMeta" resolves to
    "Control" on Windows and Linux and to "Meta" on macOS.
position : Union[{x: float, y: float}, None]
    A point to use relative to the top-left corner of element padding box. If not specified, uses some visible point of
    the element.
timeout : Union[float, None]
    Maximum time in milliseconds. Defaults to `30000` (30 seconds). Pass `0` to disable timeout. The default value can
    be changed by using the `browser_context.set_default_timeout()` or `page.set_default_timeout()` methods.
force : Union[bool, None]
    Whether to bypass the [actionability](../actionability.md) checks. Defaults to `false`.
no_wait_after : Union[bool, None]
    This option has no effect.
    Deprecated: This option has no effect.
trial : Union[bool, None]
    When set, this method only performs the [actionability](../actionability.md) checks and skips the action. Defaults
    to `false`. Useful to wait until the element is ready for the action without performing it. Note that keyboard
    `modifiers` will be pressed regardless of `trial` to allow testing elements which are only visible when those keys
    are pressed.
r3  Nr4  r5  s          rJ   r  Locator.tapTD  sW     n &&..$$!//)4!) %  	
 		
r  c                x   #    [         R                  " U R                  R                  US9I Sh  vN 5      $  N7f)a  Locator.text_content

Returns the [`node.textContent`](https://developer.mozilla.org/en-US/docs/Web/API/Node/textContent).

**NOTE** If you need to assert text on the page, prefer `locator_assertions.to_have_text()` to avoid
flakiness. See [assertions guide](https://playwright.dev/python/docs/test-assertions) for more details.

Parameters
----------
timeout : Union[float, None]
    Maximum time in milliseconds. Defaults to `30000` (30 seconds). Pass `0` to disable timeout. The default value can
    be changed by using the `browser_context.set_default_timeout()` or `page.set_default_timeout()` methods.

Returns
-------
Union[str, None]
r4  Nr  r  s     rJ   r  Locator.text_contentD  s5     * &&..--g->>
 	
>r   c          	      z   #    [         R                  " U R                  R                  XX4S9I Sh  vN 5      $  N7f)a  Locator.type

Focuses the element, and then sends a `keydown`, `keypress`/`input`, and `keyup` event for each character in the
text.

To press a special key, like `Control` or `ArrowDown`, use `locator.press()`.

**Usage**

Parameters
----------
text : str
    A text to type into a focused element.
delay : Union[float, None]
    Time to wait between key presses in milliseconds. Defaults to 0.
timeout : Union[float, None]
    Maximum time in milliseconds. Defaults to `30000` (30 seconds). Pass `0` to disable timeout. The default value can
    be changed by using the `browser_context.set_default_timeout()` or `page.set_default_timeout()` methods.
no_wait_after : Union[bool, None]
    This option has no effect.
    Deprecated: This option has no effect.
rW  Nrx  rX  s        rJ   ry  Locator.typeD  rZ  ry   c          	      z   #    [         R                  " U R                  R                  XX4S9I Sh  vN 5      $  N7f)a  Locator.press_sequentially

**NOTE** In most cases, you should use `locator.fill()` instead. You only need to press keys one by one if
there is special keyboard handling on the page.

Focuses the element, and then sends a `keydown`, `keypress`/`input`, and `keyup` event for each character in the
text.

To press a special key, like `Control` or `ArrowDown`, use `locator.press()`.

**Usage**

```py
await locator.press_sequentially("hello") # types instantly
await locator.press_sequentially("world", delay=100) # types slower, like a user
```

An example of typing into a text field and then submitting the form:

```py
locator = page.get_by_label("Password")
await locator.press_sequentially("my password")
await locator.press("Enter")
```

Parameters
----------
text : str
    String of characters to sequentially press into a focused element.
delay : Union[float, None]
    Time to wait between key presses in milliseconds. Defaults to 0.
timeout : Union[float, None]
    Maximum time in milliseconds. Defaults to `30000` (30 seconds). Pass `0` to disable timeout. The default value can
    be changed by using the `browser_context.set_default_timeout()` or `page.set_default_timeout()` methods.
no_wait_after : Union[bool, None]
    This option has no effect.
    Deprecated: This option has no effect.
rW  N)r   rE   rF   press_sequentiallyrX  s        rJ   r  Locator.press_sequentiallyD  sA     ^ &&..33 4  
 	
ry   c          
         #    [         R                  " U R                  R                  UUUUUS9I Sh  vN 5      $  N7f)a;  Locator.uncheck

Ensure that checkbox or radio element is unchecked.

**Usage**

```py
await page.get_by_role("checkbox").uncheck()
```

**Details**

This method unchecks the element by performing the following steps:
1. Ensure that element is a checkbox or a radio input. If not, this method throws. If the element is already
   unchecked, this method returns immediately.
1. Wait for [actionability](https://playwright.dev/python/docs/actionability) checks on the element, unless `force` option is set.
1. Scroll the element into view if needed.
1. Use `page.mouse` to click in the center of the element.
1. Ensure that the element is now unchecked. If not, this method throws.

If the element is detached from the DOM at any moment during the action, this method throws.

When all steps combined have not finished during the specified `timeout`, this method throws a `TimeoutError`.
Passing zero timeout disables this.

Parameters
----------
position : Union[{x: float, y: float}, None]
    A point to use relative to the top-left corner of element padding box. If not specified, uses some visible point of
    the element.
timeout : Union[float, None]
    Maximum time in milliseconds. Defaults to `30000` (30 seconds). Pass `0` to disable timeout. The default value can
    be changed by using the `browser_context.set_default_timeout()` or `page.set_default_timeout()` methods.
force : Union[bool, None]
    Whether to bypass the [actionability](../actionability.md) checks. Defaults to `false`.
no_wait_after : Union[bool, None]
    This option has no effect.
    Deprecated: This option has no effect.
trial : Union[bool, None]
    When set, this method only performs the [actionability](../actionability.md) checks and skips the action. Defaults
    to `false`. Useful to wait until the element is ready for the action without performing it.
ri  Nrp  rl  s         rJ   rq  Locator.uncheck	E  sK     h &&..((!) )  
 	
rn  c                 z   #    [         R                  " U R                  R                  5       I Sh  vN 5      $  N7f)a  Locator.all_inner_texts

Returns an array of `node.innerText` values for all matching nodes.

**NOTE** If you need to assert text on the page, prefer `locator_assertions.to_have_text()` with
`useInnerText` option to avoid flakiness. See [assertions guide](https://playwright.dev/python/docs/test-assertions) for more details.

**Usage**

```py
texts = await page.get_by_role("link").all_inner_texts()
```

Returns
-------
List[str]
N)r   rE   rF   all_inner_textsrH   s    rJ   r  Locator.all_inner_textsGE  s+     & &&T^^-K-K-M'MNN'Mry   c                 z   #    [         R                  " U R                  R                  5       I Sh  vN 5      $  N7f)a  Locator.all_text_contents

Returns an array of `node.textContent` values for all matching nodes.

**NOTE** If you need to assert text on the page, prefer `locator_assertions.to_have_text()` to avoid
flakiness. See [assertions guide](https://playwright.dev/python/docs/test-assertions) for more details.

**Usage**

```py
texts = await page.get_by_role("link").all_text_contents()
```

Returns
-------
List[str]
N)r   rE   rF   all_text_contentsrH   s    rJ   r  Locator.all_text_contents\E  s+     & &&T^^-M-M-O'OPP'Ory   r   r  r  r  c                x   #    [         R                  " U R                  R                  XS9I Sh  vN 5      $  N7f)a  Locator.wait_for

Returns when element specified by locator satisfies the `state` option.

If target element already satisfies the condition, the method returns immediately. Otherwise, waits for up to
`timeout` milliseconds until the condition is met.

**Usage**

```py
order_sent = page.locator("#order-sent")
await order_sent.wait_for()
```

Parameters
----------
timeout : Union[float, None]
    Maximum time in milliseconds. Defaults to `30000` (30 seconds). Pass `0` to disable timeout. The default value can
    be changed by using the `browser_context.set_default_timeout()` or `page.set_default_timeout()` methods.
state : Union["attached", "detached", "hidden", "visible", None]
    Defaults to `'visible'`. Can be either:
    - `'attached'` - wait for element to be present in DOM.
    - `'detached'` - wait for element to not be present in DOM.
    - `'visible'` - wait for element to have non-empty bounding box and no `visibility:hidden`. Note that element
      without any content or with `display:none` has an empty bounding box and is not considered visible.
    - `'hidden'` - wait for element to be either detached from DOM, or have an empty bounding box or
      `visibility:hidden`. This is opposite to the `'visible'` option.
r  N)r   rE   rF   wait_for)rI   r   r  s      rJ   r  Locator.wait_forqE  s6     J &&..))')GG
 	
Gr   c                   #    [         R                  " U R                  R                  UUUUUUS9I Sh  vN 5      $  N7f)a  Locator.set_checked

Set the state of a checkbox or a radio element.

**Usage**

```py
await page.get_by_role("checkbox").set_checked(True)
```

**Details**

This method checks or unchecks an element by performing the following steps:
1. Ensure that matched element is a checkbox or a radio input. If not, this method throws.
1. If the element already has the right checked state, this method returns immediately.
1. Wait for [actionability](https://playwright.dev/python/docs/actionability) checks on the matched element, unless `force` option is set. If
   the element is detached during the checks, the whole action is retried.
1. Scroll the element into view if needed.
1. Use `page.mouse` to click in the center of the element.
1. Ensure that the element is now checked or unchecked. If not, this method throws.

When all steps combined have not finished during the specified `timeout`, this method throws a `TimeoutError`.
Passing zero timeout disables this.

Parameters
----------
checked : bool
    Whether to check or uncheck the checkbox.
position : Union[{x: float, y: float}, None]
    A point to use relative to the top-left corner of element padding box. If not specified, uses some visible point of
    the element.
timeout : Union[float, None]
    Maximum time in milliseconds. Defaults to `30000` (30 seconds). Pass `0` to disable timeout. The default value can
    be changed by using the `browser_context.set_default_timeout()` or `page.set_default_timeout()` methods.
force : Union[bool, None]
    Whether to bypass the [actionability](../actionability.md) checks. Defaults to `false`.
no_wait_after : Union[bool, None]
    This option has no effect.
    Deprecated: This option has no effect.
trial : Union[bool, None]
    When set, this method only performs the [actionability](../actionability.md) checks and skips the action. Defaults
    to `false`. Useful to wait until the element is ready for the action without performing it.
rb  Nrc  re  s          rJ   rd  Locator.set_checkedE  sN     l &&..,,!) -  	
 		
rg  c                 z   #    [         R                  " U R                  R                  5       I Sh  vN 5      $  N7f)zLocator.highlight

Highlight the corresponding element(s) on the screen. Useful for debugging, don't commit the code that uses
`locator.highlight()`.
N)r   rE   rF   	highlightrH   s    rJ   r  Locator.highlightE  s+      &&T^^-E-E-G'GHH'Gry   r   r  rv  ru  r  )ro  r3   rB   r3   r   )Wr   r   r   r   r   r  rO  rS  r  r   r   r  r   ru  r   r   rk  r  r   r   r  r  r   r   r  r   r  r!  r  r;  r(  r	  rK  ro  rw  r}  r  r  r  r  r  r  r=  r   r@  rr  rE  rH  rK  rS  rP  rS  rV  rY  r  r  r  r  rG  r  r  r  r  r  r  r}  r
  r  r   r  ry  r  r.  rA  r   rN  r  r  ry  r  rq  r  r  r  rd  r  r   r   rM   rJ   r3   r3   d;  s   	6 	6 	7 	7 6 6" ? ?4 48)
 //%0)
		#)
\ /3*.'+/3'+<
 //(+<
 '	<

 t$<
 t,<
 t$<
 
<
F .2(,FJ,0*.'+/3'+\
 ??OOG$VWX
\
 //(+\
 u%\
 (A BC\
 __S)\
 '\
 t$\
 t,\
 t$\
 
\
F .2(,FJ*.'+/3'+G
 ??OOG$VWX
G
 //(+G
 u%G
 (A BCG
 'G
 t$G
 t,G
 t$G
 
G
X 48<

 +/<
<
 OOFKK0<

 '<
 
<
B ,0*

 +/*
*
 __VZZ(*

 '*
 
*
Z CG(
(
$*OOFJJ$?(
	(
Z ,0.

 +/.
.
 __VZZ(.

 '.
 
.
h +//3'+0
0
 '	0

 t,0
 t$0
 
0
j +//3'++
 '+
 t,	+

 t$+
 
+
b MQPT*..28
#\\#y.98
 //&,,sFNN34G/G"HI	8

 oofll3s8K3K&LM8
 __Y'8
 +8
 
8
| (,	#Yll3s 334#Y t$	#Y
 
#YR (,	'Vll3s 334'V t$	'V
 
'VZ (,	'
ll3s 334'
 t$	'

 
'
@ *.*.*.04&*HL)-*.'+G
QS
G
n &oG
p //$'qG
r //$'sG
t -uG
v s#wG
x oofll3s0C+CDEyG
z &{G
| //$'}G
~ t$G
@ 
AG
R$P||C)<$<=$P	$PT (,	>Ull3s 334>U t$	>U
 
>UH (,	%Vll3s 334%V t$	%V
 
%VNRc Rn R4 48W //%0W	W*
Nv{{?'C 
NB B B2 MQPT*..2)-A
 //&,,sFNN34G/G"HIA
 oofll3s8K3K&LM	A

 __Y'A
 +A
 &A
 
A
F$PLQ2 @D Tfooe&< T T ?C SV__U%; St SB6;;y1 B:ES E2 (,/3*.'+5959D
D
 t$	D

 t,D
 'D
 t$D
  2D
  2D
 
D
N ?C

%+__U%;
		
@ .2*./3'+'+C
 ??OOG$VWX
C
 //(+C
 'C
 t,C
 t$C
 t$C
 
C
J EI Y6??5+A YS Y$ EI Y6??5+A YS Y* FJ "
FOOE,B "
c "
H EI Y6??5+A YT Y6 FJ 
FOOE,B 
d 
: FJ 
FOOE,B 
d 
> EI Y6??5+A YT Y6 DH X&//%*@ XD X4 EI Y6??5+A YT Y< )-*./3>
>
 u%	>

 '>
 t,>
 
>
F +/8<AE(,15DH=A;?<@+/&*j
 'j
 oogm45	j

 oofll3+<=>j
 %j
  .j
 OOG,?$@Aj
 w'89:j
 w78j
 oofooi89j
 OOC(j
 s#j
 
j
^ +/%)	=
 '=
 __T"	=

 
=
@ 48
 //%0
	
0 KOV
 KOJN *./3'+V
v||C1E,EFGV
 v||C1E,EFG	V

 v||C1E,EFGV
 LL&///*JJK
V
 'V
 t,V
 t$V
 
S	V
v (,*.	
 t$
 '	

 

L +//3B
||LLOOFLLgll):;<OOK(	*
B
 'B
 t,B
 
B
R .2*.'+/3'+@
 ??OOG$VWX
@
 //(+@
 '@
 t$@
 t,@
 t$@
 
@
F 48
 //%0
		
: )-*./3#
#
 u%	#

 '#
 t,#
 
#
R )-*./33
3
 u%	3

 '3
 t,3
 
3
p /3*.'+/3'+<
 //(+<
 '	<

 t$<
 t,<
 t$<
 
<
|Ov{{3'7 O*QS)9 Q0 +/ '
 ''
 ?@
	'
 
'
Z /3*.'+/3'+?
?
 //(+	?

 '?
 t$?
 t,?
 t$?
 
?
BIrM   r3   c                   $   \ rS rSr\S\4S j5       r\S\4S j5       r\S\	4S j5       r
\S\4S j5       r\S\R                  \\4   4S j5       r\S\R                  \   4S j5       rS\4S	 jrS\4S
 jrS\R*                  4S jrSS jrSrg)r+   iE  rB   c                 V    [         R                  " U R                  R                  5      $ )zAPIResponse.ok

Contains a boolean stating whether the response was successful (status in the range 200-299) or not.

Returns
-------
bool
r   rH   s    rJ   r   APIResponse.okE  r   rM   c                 V    [         R                  " U R                  R                  5      $ )zHAPIResponse.url

Contains the URL of the response.

Returns
-------
str
rD   rH   s    rJ   rG   APIResponse.urlE  rL   rM   c                 V    [         R                  " U R                  R                  5      $ )zmAPIResponse.status

Contains the status code of the response (e.g., 200 for a success).

Returns
-------
int
r   rH   s    rJ   r   APIResponse.statusF  rT   rM   c                 V    [         R                  " U R                  R                  5      $ )z}APIResponse.status_text

Contains the status text of the response (e.g. usually an "OK" for a success).

Returns
-------
str
r   rH   s    rJ   r   APIResponse.status_textF  r   rM   c                 V    [         R                  " U R                  R                  5      $ )zAPIResponse.headers

An object with all the response HTTP headers associated with this response.

Returns
-------
Dict[str, str]
rr   rH   s    rJ   rs   APIResponse.headersF  r  rM   c                 V    [         R                  " U R                  R                  5      $ )a  APIResponse.headers_array

An array with all the response HTTP headers associated with this response. Header names are not lower-cased.
Headers with multiple entries, such as `Set-Cookie`, appear in the array multiple times.

Returns
-------
List[{name: str, value: str}]
r   rH   s    rJ   r   APIResponse.headers_array&F  s     %%dnn&B&BCCrM   c                 z   #    [         R                  " U R                  R                  5       I Sh  vN 5      $  N7f)zPAPIResponse.body

Returns the buffer with response body.

Returns
-------
bytes
Nr   rH   s    rJ   r   APIResponse.body3F  r   ry   c                 z   #    [         R                  " U R                  R                  5       I Sh  vN 5      $  N7f)zYAPIResponse.text

Returns the text representation of response body.

Returns
-------
str
Nr   rH   s    rJ   r   APIResponse.text?F  r   ry   c                 z   #    [         R                  " U R                  R                  5       I Sh  vN 5      $  N7f)zAPIResponse.json

Returns the JSON representation of response body.

This method will throw if the response body is not parsable via `JSON.parse`.

Returns
-------
Any
Nr   rH   s    rJ   r   APIResponse.jsonKF  r   ry   Nc                 z   #    [         R                  " U R                  R                  5       I Sh  vN 5      $  N7f)zAPIResponse.dispose

Disposes the body of this response. If not called then the body will stay in memory until the context closes.
Nr  rH   s    rJ   r  APIResponse.disposeYF  r  ry   r   r   )r   r   r   r   r   r   r   r   rG   r   r   r   r   r   rs   r   r   r   r   r   r   r   r   r  r   r   rM   rJ   r+   r+   E  s    	:D 	: 	: 	;S 	; 	; 	> 	> 	> 	CS 	C 	C 	?S#X. 	? 	? 
Dv{{95 
D 
D
DE 
D
DC 
DDFJJ DGrM   r+   c                      \ rS rSrSS.S\R
                  \   SS4S jjrSSSSSSSSSSS.
S\S	\R
                  \R                  \R                  \\R                  \\
\4   4   \4      S
\R
                  \R                  \\4      S\R
                  \R                  \R                  \\4      S\R
                  \R                  \\R                  \\
\4   4      S\R
                  \R                  \\R                  \\\
\\4   4      S\R
                  \
   S\R
                  \   S\R
                  \   S\R
                  \   S\R
                  \   SS4S jjrSSSSSSSSSSS.
S\S	\R
                  \R                  \R                  \\R                  \\
\4   4   \4      S
\R
                  \R                  \\4      S\R
                  \R                  \R                  \\4      S\R
                  \R                  \\R                  \\
\4   4      S\R
                  \R                  \\R                  \\\
\\4   4      S\R
                  \
   S\R
                  \   S\R
                  \   S\R
                  \   S\R
                  \   SS4S jjrSSSSSSSSSSS.
S\S	\R
                  \R                  \R                  \\R                  \\
\4   4   \4      S
\R
                  \R                  \\4      S\R
                  \R                  \R                  \\4      S\R
                  \R                  \\R                  \\
\4   4      S\R
                  \R                  \\R                  \\\
\\4   4      S\R
                  \
   S\R
                  \   S\R
                  \   S\R
                  \   S\R
                  \   SS4S jjrSSSSSSSSSSS.
S\S	\R
                  \R                  \R                  \\R                  \\
\4   4   \4      S
\R
                  \R                  \\4      S\R
                  \R                  \R                  \\4      S\R
                  \R                  \\R                  \\
\4   4      S\R
                  \R                  \\R                  \\\
\\4   4      S\R
                  \
   S\R
                  \   S\R
                  \   S\R
                  \   S\R
                  \   SS4S jjrSSSSSSSSSSS.
S\S	\R
                  \R                  \R                  \\R                  \\
\4   4   \4      S
\R
                  \R                  \\4      S\R
                  \R                  \R                  \\4      S\R
                  \R                  \\R                  \\
\4   4      S\R
                  \R                  \\R                  \\\
\\4   4      S\R
                  \
   S\R
                  \   S\R
                  \   S\R
                  \   S\R
                  \   SS4S jjrSSSSSSSSSSS.
S\S	\R
                  \R                  \R                  \\R                  \\
\4   4   \4      S
\R
                  \R                  \\4      S\R
                  \R                  \R                  \\4      S\R
                  \R                  \\R                  \\
\4   4      S\R
                  \R                  \\R                  \\\
\\4   4      S\R
                  \
   S\R
                  \   S\R
                  \   S\R
                  \   S\R
                  \   SS4S jjrSSSSSSSSSSSS.S\R                  \S4   S	\R
                  \R                  \R                  \\R                  \\
\4   4   \4      S\R
                  \   S
\R
                  \R                  \\4      S\R
                  \R                  \R                  \\4      S\R
                  \R                  \\R                  \\
\4   4      S\R
                  \R                  \\R                  \\\
\\4   4      S\R
                  \
   S\R
                  \   S\R
                  \   S\R
                  \   S\R
                  \   SS4S jjrSSS.S \R
                  \R                  \\R0                  4      S!\R
                  \   S\4S" jjrS#rg)$r*   ieF  Nr+  rS  rB   c                x   #    [         R                  " U R                  R                  US9I Sh  vN 5      $  N7f)a  APIRequestContext.dispose

All responses returned by `a_pi_request_context.get()` and similar methods are stored in the memory, so that
you can later call `a_pi_response.body()`.This method discards all its resources, calling any method on
disposed `APIRequestContext` will throw an exception.

Parameters
----------
reason : Union[str, None]
    The reason to be reported to the operations interrupted by the context disposal.
r+  Nr  r-  s     rJ   r  APIRequestContext.disposegF  s0      &&T^^-C-C6-C-R'RSS'Rr   )
rC  rs   datar  	multipartr   fail_on_status_coder^  r   r   rG   rC  rs   r  r  r  r   r  r^  r   r   r+   c       
         T  #    [         R                  " U R                  R                  U[         R                  " U5      [         R                  " U5      [         R                  " U5      [         R                  " U5      [         R                  " U5      UUU	U
US9I Sh  vN 5      $  N7f)a
  APIRequestContext.delete

Sends HTTP(S) [DELETE](https://developer.mozilla.org/en-US/docs/Web/HTTP/Methods/DELETE) request and returns its
response. The method will populate request cookies from the context and update context cookies from the response.
The method will automatically follow redirects.

Parameters
----------
url : str
    Target URL.
params : Union[Dict[str, Union[bool, float, str]], str, None]
    Query parameters to be sent with the URL.
headers : Union[Dict[str, str], None]
    Allows to set HTTP headers. These headers will apply to the fetched request as well as any redirects initiated by
    it.
data : Union[Any, bytes, str, None]
    Allows to set post data of the request. If the data parameter is an object, it will be serialized to json string
    and `content-type` header will be set to `application/json` if not explicitly set. Otherwise the `content-type`
    header will be set to `application/octet-stream` if not explicitly set.
form : Union[Dict[str, Union[bool, float, str]], None]
    Provides an object that will be serialized as html form using `application/x-www-form-urlencoded` encoding and sent
    as this request body. If this parameter is specified `content-type` header will be set to
    `application/x-www-form-urlencoded` unless explicitly provided.
multipart : Union[Dict[str, Union[bool, bytes, float, str, {name: str, mimeType: str, buffer: bytes}]], None]
    Provides an object that will be serialized as html form using `multipart/form-data` encoding and sent as this
    request body. If this parameter is specified `content-type` header will be set to `multipart/form-data` unless
    explicitly provided. File values can be passed as file-like object containing file name, mime-type and its content.
timeout : Union[float, None]
    Request timeout in milliseconds. Defaults to `30000` (30 seconds). Pass `0` to disable timeout.
fail_on_status_code : Union[bool, None]
    Whether to throw on response codes other than 2xx and 3xx. By default response object is returned for all status
    codes.
ignore_https_errors : Union[bool, None]
    Whether to ignore HTTPS errors when sending network requests. Defaults to `false`.
max_redirects : Union[int, None]
    Maximum number of request redirects that will be followed automatically. An error will be thrown if the number is
    exceeded. Defaults to `20`. Pass `0` to not follow redirects.
max_retries : Union[int, None]
    Maximum number of times network errors should be retried. Currently only `ECONNRESET` error is retried. Does not
    retry based on HTTP response codes. An error will be thrown if the limit is exceeded. Defaults to `0` - no retries.

Returns
-------
APIResponse
rG   rC  rs   r  r  r  r   failOnStatusCoder|  r   r   N)r   r`   rF   r  r   rI   rG   rC  rs   r  r  r  r   r  r^  r   r   s               rJ   r  APIRequestContext.deletevF  s     B   ..''v.0__T*__T*!//)4!4"5*& (  
 	
   BB(B&	B(c       
         T  #    [         R                  " U R                  R                  U[         R                  " U5      [         R                  " U5      [         R                  " U5      [         R                  " U5      [         R                  " U5      UUU	U
US9I Sh  vN 5      $  N7f)a
  APIRequestContext.head

Sends HTTP(S) [HEAD](https://developer.mozilla.org/en-US/docs/Web/HTTP/Methods/HEAD) request and returns its
response. The method will populate request cookies from the context and update context cookies from the response.
The method will automatically follow redirects.

Parameters
----------
url : str
    Target URL.
params : Union[Dict[str, Union[bool, float, str]], str, None]
    Query parameters to be sent with the URL.
headers : Union[Dict[str, str], None]
    Allows to set HTTP headers. These headers will apply to the fetched request as well as any redirects initiated by
    it.
data : Union[Any, bytes, str, None]
    Allows to set post data of the request. If the data parameter is an object, it will be serialized to json string
    and `content-type` header will be set to `application/json` if not explicitly set. Otherwise the `content-type`
    header will be set to `application/octet-stream` if not explicitly set.
form : Union[Dict[str, Union[bool, float, str]], None]
    Provides an object that will be serialized as html form using `application/x-www-form-urlencoded` encoding and sent
    as this request body. If this parameter is specified `content-type` header will be set to
    `application/x-www-form-urlencoded` unless explicitly provided.
multipart : Union[Dict[str, Union[bool, bytes, float, str, {name: str, mimeType: str, buffer: bytes}]], None]
    Provides an object that will be serialized as html form using `multipart/form-data` encoding and sent as this
    request body. If this parameter is specified `content-type` header will be set to `multipart/form-data` unless
    explicitly provided. File values can be passed as file-like object containing file name, mime-type and its content.
timeout : Union[float, None]
    Request timeout in milliseconds. Defaults to `30000` (30 seconds). Pass `0` to disable timeout.
fail_on_status_code : Union[bool, None]
    Whether to throw on response codes other than 2xx and 3xx. By default response object is returned for all status
    codes.
ignore_https_errors : Union[bool, None]
    Whether to ignore HTTPS errors when sending network requests. Defaults to `false`.
max_redirects : Union[int, None]
    Maximum number of request redirects that will be followed automatically. An error will be thrown if the number is
    exceeded. Defaults to `20`. Pass `0` to not follow redirects.
max_retries : Union[int, None]
    Maximum number of times network errors should be retried. Currently only `ECONNRESET` error is retried. Does not
    retry based on HTTP response codes. An error will be thrown if the limit is exceeded. Defaults to `0` - no retries.

Returns
-------
APIResponse
r  N)r   r`   rF   headr   r  s               rJ   r  APIRequestContext.headF  s     B   ..%%v.0__T*__T*!//)4!4"5*& &  
 	
r  c       
         T  #    [         R                  " U R                  R                  U[         R                  " U5      [         R                  " U5      [         R                  " U5      [         R                  " U5      [         R                  " U5      UUU	U
US9I Sh  vN 5      $  N7f)a  APIRequestContext.get

Sends HTTP(S) [GET](https://developer.mozilla.org/en-US/docs/Web/HTTP/Methods/GET) request and returns its
response. The method will populate request cookies from the context and update context cookies from the response.
The method will automatically follow redirects.

**Usage**

Request parameters can be configured with `params` option, they will be serialized into the URL search parameters:

```python
query_params = {
  "isbn": "1234",
  "page": "23"
}
api_request_context.get("https://example.com/api/getText", params=query_params)
```

Parameters
----------
url : str
    Target URL.
params : Union[Dict[str, Union[bool, float, str]], str, None]
    Query parameters to be sent with the URL.
headers : Union[Dict[str, str], None]
    Allows to set HTTP headers. These headers will apply to the fetched request as well as any redirects initiated by
    it.
data : Union[Any, bytes, str, None]
    Allows to set post data of the request. If the data parameter is an object, it will be serialized to json string
    and `content-type` header will be set to `application/json` if not explicitly set. Otherwise the `content-type`
    header will be set to `application/octet-stream` if not explicitly set.
form : Union[Dict[str, Union[bool, float, str]], None]
    Provides an object that will be serialized as html form using `application/x-www-form-urlencoded` encoding and sent
    as this request body. If this parameter is specified `content-type` header will be set to
    `application/x-www-form-urlencoded` unless explicitly provided.
multipart : Union[Dict[str, Union[bool, bytes, float, str, {name: str, mimeType: str, buffer: bytes}]], None]
    Provides an object that will be serialized as html form using `multipart/form-data` encoding and sent as this
    request body. If this parameter is specified `content-type` header will be set to `multipart/form-data` unless
    explicitly provided. File values can be passed as file-like object containing file name, mime-type and its content.
timeout : Union[float, None]
    Request timeout in milliseconds. Defaults to `30000` (30 seconds). Pass `0` to disable timeout.
fail_on_status_code : Union[bool, None]
    Whether to throw on response codes other than 2xx and 3xx. By default response object is returned for all status
    codes.
ignore_https_errors : Union[bool, None]
    Whether to ignore HTTPS errors when sending network requests. Defaults to `false`.
max_redirects : Union[int, None]
    Maximum number of request redirects that will be followed automatically. An error will be thrown if the number is
    exceeded. Defaults to `20`. Pass `0` to not follow redirects.
max_retries : Union[int, None]
    Maximum number of times network errors should be retried. Currently only `ECONNRESET` error is retried. Does not
    retry based on HTTP response codes. An error will be thrown if the limit is exceeded. Defaults to `0` - no retries.

Returns
-------
APIResponse
r  N)r   r`   rF   getr   r  s               rJ   r  APIRequestContext.getG  s     Z   ..$$v.0__T*__T*!//)4!4"5*& %  
 	
r  c       
         T  #    [         R                  " U R                  R                  U[         R                  " U5      [         R                  " U5      [         R                  " U5      [         R                  " U5      [         R                  " U5      UUU	U
US9I Sh  vN 5      $  N7f)a
  APIRequestContext.patch

Sends HTTP(S) [PATCH](https://developer.mozilla.org/en-US/docs/Web/HTTP/Methods/PATCH) request and returns its
response. The method will populate request cookies from the context and update context cookies from the response.
The method will automatically follow redirects.

Parameters
----------
url : str
    Target URL.
params : Union[Dict[str, Union[bool, float, str]], str, None]
    Query parameters to be sent with the URL.
headers : Union[Dict[str, str], None]
    Allows to set HTTP headers. These headers will apply to the fetched request as well as any redirects initiated by
    it.
data : Union[Any, bytes, str, None]
    Allows to set post data of the request. If the data parameter is an object, it will be serialized to json string
    and `content-type` header will be set to `application/json` if not explicitly set. Otherwise the `content-type`
    header will be set to `application/octet-stream` if not explicitly set.
form : Union[Dict[str, Union[bool, float, str]], None]
    Provides an object that will be serialized as html form using `application/x-www-form-urlencoded` encoding and sent
    as this request body. If this parameter is specified `content-type` header will be set to
    `application/x-www-form-urlencoded` unless explicitly provided.
multipart : Union[Dict[str, Union[bool, bytes, float, str, {name: str, mimeType: str, buffer: bytes}]], None]
    Provides an object that will be serialized as html form using `multipart/form-data` encoding and sent as this
    request body. If this parameter is specified `content-type` header will be set to `multipart/form-data` unless
    explicitly provided. File values can be passed as file-like object containing file name, mime-type and its content.
timeout : Union[float, None]
    Request timeout in milliseconds. Defaults to `30000` (30 seconds). Pass `0` to disable timeout.
fail_on_status_code : Union[bool, None]
    Whether to throw on response codes other than 2xx and 3xx. By default response object is returned for all status
    codes.
ignore_https_errors : Union[bool, None]
    Whether to ignore HTTPS errors when sending network requests. Defaults to `false`.
max_redirects : Union[int, None]
    Maximum number of request redirects that will be followed automatically. An error will be thrown if the number is
    exceeded. Defaults to `20`. Pass `0` to not follow redirects.
max_retries : Union[int, None]
    Maximum number of times network errors should be retried. Currently only `ECONNRESET` error is retried. Does not
    retry based on HTTP response codes. An error will be thrown if the limit is exceeded. Defaults to `0` - no retries.

Returns
-------
APIResponse
r  N)r   r`   rF   patchr   r  s               rJ   r  APIRequestContext.patchuG  s     B   ..&&v.0__T*__T*!//)4!4"5*& '  
 	
r  c       
         T  #    [         R                  " U R                  R                  U[         R                  " U5      [         R                  " U5      [         R                  " U5      [         R                  " U5      [         R                  " U5      UUU	U
US9I Sh  vN 5      $  N7f)a
  APIRequestContext.put

Sends HTTP(S) [PUT](https://developer.mozilla.org/en-US/docs/Web/HTTP/Methods/PUT) request and returns its
response. The method will populate request cookies from the context and update context cookies from the response.
The method will automatically follow redirects.

Parameters
----------
url : str
    Target URL.
params : Union[Dict[str, Union[bool, float, str]], str, None]
    Query parameters to be sent with the URL.
headers : Union[Dict[str, str], None]
    Allows to set HTTP headers. These headers will apply to the fetched request as well as any redirects initiated by
    it.
data : Union[Any, bytes, str, None]
    Allows to set post data of the request. If the data parameter is an object, it will be serialized to json string
    and `content-type` header will be set to `application/json` if not explicitly set. Otherwise the `content-type`
    header will be set to `application/octet-stream` if not explicitly set.
form : Union[Dict[str, Union[bool, float, str]], None]
    Provides an object that will be serialized as html form using `application/x-www-form-urlencoded` encoding and sent
    as this request body. If this parameter is specified `content-type` header will be set to
    `application/x-www-form-urlencoded` unless explicitly provided.
multipart : Union[Dict[str, Union[bool, bytes, float, str, {name: str, mimeType: str, buffer: bytes}]], None]
    Provides an object that will be serialized as html form using `multipart/form-data` encoding and sent as this
    request body. If this parameter is specified `content-type` header will be set to `multipart/form-data` unless
    explicitly provided. File values can be passed as file-like object containing file name, mime-type and its content.
timeout : Union[float, None]
    Request timeout in milliseconds. Defaults to `30000` (30 seconds). Pass `0` to disable timeout.
fail_on_status_code : Union[bool, None]
    Whether to throw on response codes other than 2xx and 3xx. By default response object is returned for all status
    codes.
ignore_https_errors : Union[bool, None]
    Whether to ignore HTTPS errors when sending network requests. Defaults to `false`.
max_redirects : Union[int, None]
    Maximum number of request redirects that will be followed automatically. An error will be thrown if the number is
    exceeded. Defaults to `20`. Pass `0` to not follow redirects.
max_retries : Union[int, None]
    Maximum number of times network errors should be retried. Currently only `ECONNRESET` error is retried. Does not
    retry based on HTTP response codes. An error will be thrown if the limit is exceeded. Defaults to `0` - no retries.

Returns
-------
APIResponse
r  N)r   r`   rF   putr   r  s               rJ   r  APIRequestContext.putG  s     B   ..$$v.0__T*__T*!//)4!4"5*& %  
 	
r  c       
         T  #    [         R                  " U R                  R                  U[         R                  " U5      [         R                  " U5      [         R                  " U5      [         R                  " U5      [         R                  " U5      UUU	U
US9I Sh  vN 5      $  N7f)a  APIRequestContext.post

Sends HTTP(S) [POST](https://developer.mozilla.org/en-US/docs/Web/HTTP/Methods/POST) request and returns its
response. The method will populate request cookies from the context and update context cookies from the response.
The method will automatically follow redirects.

**Usage**

JSON objects can be passed directly to the request:

```python
data = {
    "title": "Book Title",
    "body": "John Doe",
}
api_request_context.post("https://example.com/api/createBook", data=data)
```

To send form data to the server use `form` option. Its value will be encoded into the request body with
`application/x-www-form-urlencoded` encoding (see below how to use `multipart/form-data` form encoding to send
files):

The common way to send file(s) in the body of a request is to upload them as form fields with `multipart/form-data`
encoding. Use `FormData` to construct request body and pass it to the request as `multipart` parameter:

```python
api_request_context.post(
  "https://example.com/api/uploadScript'",
  multipart={
    "fileField": {
      "name": "f.js",
      "mimeType": "text/javascript",
      "buffer": b"console.log(2022);",
    },
  })
```

Parameters
----------
url : str
    Target URL.
params : Union[Dict[str, Union[bool, float, str]], str, None]
    Query parameters to be sent with the URL.
headers : Union[Dict[str, str], None]
    Allows to set HTTP headers. These headers will apply to the fetched request as well as any redirects initiated by
    it.
data : Union[Any, bytes, str, None]
    Allows to set post data of the request. If the data parameter is an object, it will be serialized to json string
    and `content-type` header will be set to `application/json` if not explicitly set. Otherwise the `content-type`
    header will be set to `application/octet-stream` if not explicitly set.
form : Union[Dict[str, Union[bool, float, str]], None]
    Provides an object that will be serialized as html form using `application/x-www-form-urlencoded` encoding and sent
    as this request body. If this parameter is specified `content-type` header will be set to
    `application/x-www-form-urlencoded` unless explicitly provided.
multipart : Union[Dict[str, Union[bool, bytes, float, str, {name: str, mimeType: str, buffer: bytes}]], None]
    Provides an object that will be serialized as html form using `multipart/form-data` encoding and sent as this
    request body. If this parameter is specified `content-type` header will be set to `multipart/form-data` unless
    explicitly provided. File values can be passed as file-like object containing file name, mime-type and its content.
timeout : Union[float, None]
    Request timeout in milliseconds. Defaults to `30000` (30 seconds). Pass `0` to disable timeout.
fail_on_status_code : Union[bool, None]
    Whether to throw on response codes other than 2xx and 3xx. By default response object is returned for all status
    codes.
ignore_https_errors : Union[bool, None]
    Whether to ignore HTTPS errors when sending network requests. Defaults to `false`.
max_redirects : Union[int, None]
    Maximum number of request redirects that will be followed automatically. An error will be thrown if the number is
    exceeded. Defaults to `20`. Pass `0` to not follow redirects.
max_retries : Union[int, None]
    Maximum number of times network errors should be retried. Currently only `ECONNRESET` error is retried. Does not
    retry based on HTTP response codes. An error will be thrown if the limit is exceeded. Defaults to `0` - no retries.

Returns
-------
APIResponse
r  N)r   r`   rF   postr   r  s               rJ   r  APIRequestContext.postH  s     @   ..%%v.0__T*__T*!//)4!4"5*& &  
 	
r  )rC  rR   rs   r  r  r  r   r  r^  r   r   url_or_requestr4   rR   c                V  #    [         R                  " U R                  R                  U[         R                  " U5      U[         R                  " U5      [         R                  " U5      [         R                  " U5      [         R                  " U5      UU	U
UUS9I Sh  vN 5      $  N7f)a  APIRequestContext.fetch

Sends HTTP(S) request and returns its response. The method will populate request cookies from the context and
update context cookies from the response. The method will automatically follow redirects.

**Usage**

JSON objects can be passed directly to the request:

```python
data = {
    "title": "Book Title",
    "body": "John Doe",
}
api_request_context.fetch("https://example.com/api/createBook", method="post", data=data)
```

The common way to send file(s) in the body of a request is to upload them as form fields with `multipart/form-data`
encoding, by specifiying the `multipart` parameter:

Parameters
----------
url_or_request : Union[Request, str]
    Target URL or Request to get all parameters from.
params : Union[Dict[str, Union[bool, float, str]], str, None]
    Query parameters to be sent with the URL.
method : Union[str, None]
    If set changes the fetch method (e.g. [PUT](https://developer.mozilla.org/en-US/docs/Web/HTTP/Methods/PUT) or
    [POST](https://developer.mozilla.org/en-US/docs/Web/HTTP/Methods/POST)). If not specified, GET method is used.
headers : Union[Dict[str, str], None]
    Allows to set HTTP headers. These headers will apply to the fetched request as well as any redirects initiated by
    it.
data : Union[Any, bytes, str, None]
    Allows to set post data of the request. If the data parameter is an object, it will be serialized to json string
    and `content-type` header will be set to `application/json` if not explicitly set. Otherwise the `content-type`
    header will be set to `application/octet-stream` if not explicitly set.
form : Union[Dict[str, Union[bool, float, str]], None]
    Provides an object that will be serialized as html form using `application/x-www-form-urlencoded` encoding and sent
    as this request body. If this parameter is specified `content-type` header will be set to
    `application/x-www-form-urlencoded` unless explicitly provided.
multipart : Union[Dict[str, Union[bool, bytes, float, str, {name: str, mimeType: str, buffer: bytes}]], None]
    Provides an object that will be serialized as html form using `multipart/form-data` encoding and sent as this
    request body. If this parameter is specified `content-type` header will be set to `multipart/form-data` unless
    explicitly provided. File values can be passed as file-like object containing file name, mime-type and its content.
timeout : Union[float, None]
    Request timeout in milliseconds. Defaults to `30000` (30 seconds). Pass `0` to disable timeout.
fail_on_status_code : Union[bool, None]
    Whether to throw on response codes other than 2xx and 3xx. By default response object is returned for all status
    codes.
ignore_https_errors : Union[bool, None]
    Whether to ignore HTTPS errors when sending network requests. Defaults to `false`.
max_redirects : Union[int, None]
    Maximum number of request redirects that will be followed automatically. An error will be thrown if the number is
    exceeded. Defaults to `20`. Pass `0` to not follow redirects.
max_retries : Union[int, None]
    Maximum number of times network errors should be retried. Currently only `ECONNRESET` error is retried. Does not
    retry based on HTTP response codes. An error will be thrown if the limit is exceeded. Defaults to `0` - no retries.

Returns
-------
APIResponse
)urlOrRequestrC  rR   rs   r  r  r  r   r  r|  r   r   Nr   )rI   r  rC  rR   rs   r  r  r  r   r  r^  r   r   s                rJ   r   APIRequestContext.fetchH  s     f   ..&&+v.0__T*__T*!//)4!4"5*& '  
 	
s   BB)B'	B)r/  r   r0  c                x   #    [         R                  " U R                  R                  XS9I Sh  vN 5      $  N7f)a'  APIRequestContext.storage_state

Returns storage state for this request context, contains current cookies and local storage snapshot if it was
passed to the constructor.

Parameters
----------
path : Union[pathlib.Path, str, None]
    The file path to save the storage state to. If `path` is a relative path, then it is resolved relative to current
    working directory. If no path is provided, storage state is still returned, but won't be saved to the disk.
indexed_db : Union[bool, None]
    Set to `true` to include IndexedDB in the storage state snapshot.

Returns
-------
{cookies: List[{name: str, value: str, domain: str, path: str, expires: float, httpOnly: bool, secure: bool, sameSite: Union["Lax", "None", "Strict"]}], origins: List[{origin: str, localStorage: List[{name: str, value: str}]}]}
r2  Nr4  r6  s      rJ   r5  APIRequestContext.storage_stateH  s5     0   ....D.OO
 	
Or   r   )r   r   r   r   r   r   r   r  r	  r   r  r   r   r   r   r   r  r  r  r  r  r  r   r
  r  r   r5  r   r   rM   rJ   r*   r*   eF  s   >B Tvs'; Tt T* :>FJRV *.5959.2,0#O
O
 LLS&,,sE47G*H%HI3NO
	O
 S#X!67O
 oofll6::sE+ABCO
 oofkk#v||C<L/M*MNOO
 ??KKV\\%uc;*NOOP
O
 'O
 $__T2O
 $__T2O
  s+!O
" __S)#O
$ 
%O
n :>FJRV *.5959.2,0#O
O
 LLS&,,sE47G*H%HI3NO
	O
 S#X!67O
 oofll6::sE+ABCO
 oofkk#v||C<L/M*MNOO
 ??KKV\\%uc;*NOOP
O
 'O
 $__T2O
 $__T2O
  s+!O
" __S)#O
$ 
%O
n :>FJRV *.5959.2,0#[
[
 LLS&,,sE47G*H%HI3NO
	[
 S#X!67[
 oofll6::sE+ABC[
 oofkk#v||C<L/M*MNO[
 ??KKV\\%uc;*NOOP
[
 '[
 $__T2[
 $__T2[
  s+![
" __S)#[
$ 
%[
F :>FJRV *.5959.2,0#O
O
 LLS&,,sE47G*H%HI3NO
	O
 S#X!67O
 oofll6::sE+ABCO
 oofkk#v||C<L/M*MNOO
 ??KKV\\%uc;*NOOP
O
 'O
 $__T2O
 $__T2O
  s+!O
" __S)#O
$ 
%O
n :>FJRV *.5959.2,0#O
O
 LLS&,,sE47G*H%HI3NO
	O
 S#X!67O
 oofll6::sE+ABCO
 oofkk#v||C<L/M*MNOO
 ??KKV\\%uc;*NOOP
O
 'O
 $__T2O
 $__T2O
  s+!O
" __S)#O
$ 
%O
n :>FJRV *.5959.2,0#n
n
 LLS&,,sE47G*H%HI3NO
	n
 S#X!67n
 oofll6::sE+ABCn
 oofkk#v||C<L/M*MNOn
 ??KKV\\%uc;*NOOP
n
 'n
 $__T2n
 $__T2n
  s+!n
" __S)#n
$ 
%n
l '+:>FJRV *.5959.2,0%b
S)^4b
 LLS&,,sE47G*H%HI3NO
	b
 $b
 S#X!67b
 oofll6::sE+ABCb
 oofkk#v||C<L/M*MNOb
 ??KKV\\%uc;*NOOP
b
 'b
 $__T2b
  $__T2!b
" s+#b
$ __S)%b
& 
'b
N BF,0	
 oofll3+<=>
 OOD)	

 

 
rM   r*   c                      \ rS rSrSSSSSSSSSSSS.S\R
                  \   S\R
                  \R                  \\4      S\R
                  \   S\R
                  \	   S\R
                  \
   S	\R
                  \   S
\R
                  \   S\R
                  \R                  \\\R                  4      S\R
                  \R                   \      S\R
                  \	   S\R
                  \   SS4S jjrSrg)r)   iI  N)rp  rd  re  r^  rk  ra  r   r5  ru  r  r   rp  rd  re  r^  rk  ra  r   r5  ru  r  r   rB   r*   c                   #    [         R                  " U R                  R                  U[         R                  " U5      UUUUUUU	U
US9I Sh  vN 5      $  N7f)aT  APIRequest.new_context

Creates new instances of `APIRequestContext`.

Parameters
----------
base_url : Union[str, None]
    Methods like `a_pi_request_context.get()` take the base URL into consideration by using the
    [`URL()`](https://developer.mozilla.org/en-US/docs/Web/API/URL/URL) constructor for building the corresponding URL.
    Examples:
    - baseURL: `http://localhost:3000` and sending request to `/bar.html` results in `http://localhost:3000/bar.html`
    - baseURL: `http://localhost:3000/foo/` and sending request to `./bar.html` results in
      `http://localhost:3000/foo/bar.html`
    - baseURL: `http://localhost:3000/foo` (without trailing slash) and navigating to `./bar.html` results in
      `http://localhost:3000/bar.html`
extra_http_headers : Union[Dict[str, str], None]
    An object containing additional HTTP headers to be sent with every request. Defaults to none.
http_credentials : Union[{username: str, password: str, origin: Union[str, None], send: Union["always", "unauthorized", None]}, None]
    Credentials for [HTTP authentication](https://developer.mozilla.org/en-US/docs/Web/HTTP/Authentication). If no
    origin is specified, the username and password are sent to any servers upon unauthorized responses.
ignore_https_errors : Union[bool, None]
    Whether to ignore HTTPS errors when sending network requests. Defaults to `false`.
proxy : Union[{server: str, bypass: Union[str, None], username: Union[str, None], password: Union[str, None]}, None]
    Network proxy settings.
user_agent : Union[str, None]
    Specific user agent to use in this context.
timeout : Union[float, None]
    Maximum time in milliseconds to wait for the response. Defaults to `30000` (30 seconds). Pass `0` to disable
    timeout.
storage_state : Union[pathlib.Path, str, {cookies: Sequence[{name: str, value: str, domain: str, path: str, expires: float, httpOnly: bool, secure: bool, sameSite: Union["Lax", "None", "Strict"]}], origins: Sequence[{origin: str, localStorage: Sequence[{name: str, value: str}]}]}, None]
    Populates context with given storage state. This option can be used to initialize context with logged-in
    information obtained via `browser_context.storage_state()` or `a_pi_request_context.storage_state()`.
    Either a path to the file with saved storage, or the value returned by one of
    `browser_context.storage_state()` or `a_pi_request_context.storage_state()` methods.
client_certificates : Union[Sequence[{origin: str, certPath: Union[pathlib.Path, str, None], cert: Union[bytes, None], keyPath: Union[pathlib.Path, str, None], key: Union[bytes, None], pfxPath: Union[pathlib.Path, str, None], pfx: Union[bytes, None], passphrase: Union[str, None]}], None]
    TLS Client Authentication allows the server to request a client certificate and verify it.

    **Details**

    An array of client certificates to be used. Each certificate object must have either both `certPath` and `keyPath`,
    a single `pfxPath`, or their corresponding direct value equivalents (`cert` and `key`, or `pfx`). Optionally,
    `passphrase` property should be provided if the certificate is encrypted. The `origin` property should be provided
    with an exact match to the request origin that the certificate is valid for.

    **NOTE** When using WebKit on macOS, accessing `localhost` will not pick up client certificates. You can make it
    work by replacing `localhost` with `local.playwright`.

fail_on_status_code : Union[bool, None]
    Whether to throw on response codes other than 2xx and 3xx. By default response object is returned for all status
    codes.
max_redirects : Union[int, None]
    Maximum number of request redirects that will be followed automatically. An error will be thrown if the number is
    exceeded. Defaults to `20`. Pass `0` to not follow redirects. This can be overwritten for each request
    individually.

Returns
-------
APIRequestContext
)r  r  r  r|  rk  r  r   r  r  r  r   Nr  )rI   rp  rd  re  r^  rk  ra  r   r5  ru  r  r   s               rJ   r  APIRequest.new_contextI  sg     Z   ..,, !(1C!D 0"5$*#6!4* -  
 	
r  r   )r   r   r   r   r   r   r   r   r
   r   r   r  r	  r   r
  r  r   r   r   r  r   r   rM   rJ   r)   r)   I  sH   
 *.EI=A5904+/*. OS59.2[
 //#&[
 #OOFKKS,AB	[

 !///:[
 $__T2[
 }-[
 OOC([
 '[
 LLsGLL89
[
 $__V[[9J-KL[
 $__T2[
 s+[
  
![
 [
rM   r)   c            	          \ rS rSrSS.S\R
                  \R                  \   \4   S\R                  \	   SS4S jjr
SS.S\R
                  \R                  \   \4   S\R                  \	   SS4S jjrSSS	.S
\R
                  \\R                  \   4   S\R                  \	   S\R                  \   SS4S jjrSSS	.S
\R
                  \R                  \   \4   S\R                  \	   S\R                  \   SS4S jjrSrg)r   inI  Nr4  title_or_reg_expr   rB   c                |   #    Sn[         R                  " U R                  R                  XS9I Sh  vN 5      $  N7f)a  PageAssertions.to_have_title

Ensures the page has the given title.

**Usage**

```py
import re
from playwright.async_api import expect

# ...
await expect(page).to_have_title(re.compile(r".*checkout"))
```

Parameters
----------
title_or_reg_exp : Union[Pattern[str], str]
    Expected title or RegExp.
timeout : Union[float, None]
    Time to retry the assertion for in milliseconds. Defaults to `5000`.
TtitleOrRegExpr   N)r   rE   rF   to_have_titlerI   r  r   __tracebackhide__s       rJ   r  PageAssertions.to_have_titlepI  sD     6 !&&..... /  
 	
r  c                |   #    Sn[         R                  " U R                  R                  XS9I Sh  vN 5      $  N7f)a  PageAssertions.not_to_have_title

The opposite of `page_assertions.to_have_title()`.

Parameters
----------
title_or_reg_exp : Union[Pattern[str], str]
    Expected title or RegExp.
timeout : Union[float, None]
    Time to retry the assertion for in milliseconds. Defaults to `5000`.
Tr  N)r   rE   rF   not_to_have_titler  s       rJ   r   PageAssertions.not_to_have_titleI  sD     " !&&..22. 3  
 	
r  )r   ignore_caseurl_or_reg_expr  c                ~   #    Sn[         R                  " U R                  R                  XUS9I Sh  vN 5      $  N7f)a  PageAssertions.to_have_url

Ensures the page is navigated to the given URL.

**Usage**

```py
import re
from playwright.async_api import expect

# ...
await expect(page).to_have_url(re.compile(".*checkout"))
```

Parameters
----------
url_or_reg_exp : Union[Pattern[str], str]
    Expected URL string or RegExp.
timeout : Union[float, None]
    Time to retry the assertion for in milliseconds. Defaults to `5000`.
ignore_case : Union[bool, None]
    Whether to perform case-insensitive match. `ignoreCase` option takes precedence over the corresponding regular
    expression parameter if specified. A provided predicate ignores this flag.
TurlOrRegExpr   
ignoreCaseN)r   rE   rF   to_have_urlrI   r  r   r  r  s        rJ   r  PageAssertions.to_have_urlI  sF     > !&&..,,* -  
 	
   0=;	=c                ~   #    Sn[         R                  " U R                  R                  XUS9I Sh  vN 5      $  N7f)a  PageAssertions.not_to_have_url

The opposite of `page_assertions.to_have_url()`.

Parameters
----------
url_or_reg_exp : Union[Pattern[str], str]
    Expected URL string or RegExp.
timeout : Union[float, None]
    Time to retry the assertion for in milliseconds. Defaults to `5000`.
ignore_case : Union[bool, None]
    Whether to perform case-insensitive match. `ignoreCase` option takes precedence over the corresponding regular
    expression flag if specified.
Tr  N)r   rE   rF   not_to_have_urlr  s        rJ   r  PageAssertions.not_to_have_urlI  sF     * !&&..00* 1  
 	
r  r   )r   r   r   r   r   r	  rK  r   r   r  r  r  r   r  r  r   r   rM   rJ   r   r   nI  sM    +/	!
 ,,v~~c':C'?@!
 '	!

 
!
N +/	
 ,,v~~c':C'?@
 '	

 

: +/-1%
S&..*=%=>%
 '	%

 __T*%
 
%
V +/-1
V^^C%8#%=>
 '	

 __T*
 

 
rM   r   c                   $   \ rS rSrSSSS.S\R
                  \R                  \   \R                  \R                  \      \R                  \R
                  \R                  \   \4      \R                  \   \4   S\R                  \
   S\R                  \   S\R                  \
   SS4
S	 jjrSSSS.S\R
                  \R                  \   \R                  \R                  \      \R                  \R
                  \R                  \   \4      \R                  \   \4   S\R                  \
   S\R                  \   S\R                  \
   SS4
S
 jjrSSS.S\S\R
                  \\R                  \   4   S\R                  \
   S\R                  \   SS4
S jjrSSS.S\S\R
                  \\R                  \   4   S\R                  \
   S\R                  \   SS4
S jjrSS.S\R
                  \R                  \   \R                  \R                  \      \R                  \R
                  \R                  \   \4      \R                  \   \4   S\R                  \   SS4S jjrSS.S\R
                  \R                  \   \R                  \R                  \      \R                  \R
                  \R                  \   \4      \R                  \   \4   S\R                  \   SS4S jjrSS.S\R
                  \R                  \   \4   S\R                  \   SS4S jjrSS.S\R
                  \R                  \   \4   S\R                  \   SS4S jjrSS.S\S\R                  \   SS4S jjrSS.S\S\R                  \   SS4S jjrSS.S\S\R
                  \\R                  \   4   S\R                  \   SS4S jjrSS.S\S\R
                  \\R                  \   4   S\R                  \   SS4S jjrSS.S\R
                  \\R                  \   4   S\R                  \   SS4S jjrSS.S\R
                  \\R                  \   4   S\R                  \   SS4S jjrSS.S\S\R6                  S\R                  \   SS4S jjrSS.S\S\R6                  S\R                  \   SS4S jjrSS.S\R
                  \\R                  \   4   S\R                  \   SS4S jjrSS.S\R
                  \\R                  \   4   S\R                  \   SS4S  jjrSS.S!\R
                  \R                  \   \R                  \R                  \      \R                  \R
                  \R                  \   \4      4   S\R                  \   SS4S" jjr SS.S!\R
                  \R                  \   \R                  \R                  \      \R                  \R
                  \R                  \   \4      4   S\R                  \   SS4S# jjr!SSSS.S\R
                  \R                  \   \R                  \R                  \      \R                  \R
                  \R                  \   \4      \R                  \   \4   S\R                  \
   S\R                  \   S\R                  \
   SS4
S$ jjr"SSSS.S\R
                  \R                  \   \R                  \R                  \      \R                  \R
                  \R                  \   \4      \R                  \   \4   S\R                  \
   S\R                  \   S\R                  \
   SS4
S% jjr#SSS&.S'\R                  \
   S\R                  \   SS4S( jjr$SSSS).S\R                  \   S*\R                  \
   S+\R                  \
   SS4S, jjr%SSS&.S'\R                  \
   S\R                  \   SS4S- jjr&SS.S\R                  \   SS4S. jjr'SS.S\R                  \   SS4S/ jjr(SS.S\R                  \   SS4S0 jjr)SSS1.S2\R                  \
   S\R                  \   SS4S3 jjr*SSS1.S2\R                  \
   S\R                  \   SS4S4 jjr+SS.S\R                  \   SS4S5 jjr,SS.S\R                  \   SS4S6 jjr-SSS7.S8\R                  \
   S\R                  \   SS4S9 jjr.SSS7.S8\R                  \
   S\R                  \   SS4S: jjr/SS.S\R                  \   SS4S; jjr0SS.S\R                  \   SS4S< jjr1SSS=.S>\R                  \
   S\R                  \   SS4S? jjr2SSS=.S>\R                  \
   S\R                  \   SS4S@ jjr3SS.S\R                  \   SS4SA jjr4SS.S\R                  \   SS4SB jjr5SSSC.SD\R                  \   S\R                  \   SS4SE jjr6SSSC.SD\R                  \   S\R                  \   SS4SF jjr7SSS.SG\R
                  \\R                  \   4   S\R                  \
   S\R                  \   SS4SH jjr8SSS.S\R
                  \\R                  \   4   S\R                  \
   S\R                  \   SS4SI jjr9SSS.S\R
                  \\R                  \   4   S\R                  \
   S\R                  \   SS4SJ jjr:SSS.S\R
                  \\R                  \   4   S\R                  \
   S\R                  \   SS4SK jjr;SS.SL\<SM   S\R                  \   SS4SN jjr=SSS.SO\R
                  \\R                  \   4   S\R                  \
   S\R                  \   SS4SP jjr>SSS.SO\R
                  \\R                  \   4   S\R                  \
   S\R                  \   SS4SQ jjr?SS.SL\<SM   S\R                  \   SS4SR jjr@SS.S\S\R                  \   SS4SS jjrASS.S\S\R                  \   SS4ST jjrBSUrCg)Vr   iI  N)use_inner_textr   r  expectedr  r   r  rB   c          	         #    Sn[         R                  " U R                  R                  [         R                  " U5      UUUS9I Sh  vN 5      $  N7f)uN	  LocatorAssertions.to_contain_text

Ensures the `Locator` points to an element that contains the given text. All nested elements will be considered
when computing the text content of the element. You can use regular expressions for the value as well.

**Details**

When `expected` parameter is a string, Playwright will normalize whitespaces and line breaks both in the actual
text and in the expected string before matching. When regular expression is used, the actual text is matched as is.

**Usage**

```py
import re
from playwright.async_api import expect

locator = page.locator('.title')
await expect(locator).to_contain_text("substring")
await expect(locator).to_contain_text(re.compile(r"\d messages"))
```

If you pass an array as an expected value, the expectations are:
1. Locator resolves to a list of elements.
1. Elements from a **subset** of this list contain text from the expected array, respectively.
1. The matching subset of elements has the same order as the expected array.
1. Each text value from the expected array is matched by some element from the list.

For example, consider the following list:

```html
<ul>
  <li>Item Text 1</li>
  <li>Item Text 2</li>
  <li>Item Text 3</li>
</ul>
```

Let's see how we can use the assertion:

```py
from playwright.async_api import expect

# ✓ Contains the right items in the right order
await expect(page.locator("ul > li")).to_contain_text(["Text 1", "Text 3", "Text 4"])

# ✖ Wrong order
await expect(page.locator("ul > li")).to_contain_text(["Text 3", "Text 2"])

# ✖ No item contains this text
await expect(page.locator("ul > li")).to_contain_text(["Some 33"])

# ✖ Locator points to the outer list element, not to the list items
await expect(page.locator("ul")).to_contain_text(["Text 3"])
```

Parameters
----------
expected : Union[Pattern[str], Sequence[Pattern[str]], Sequence[Union[Pattern[str], str]], Sequence[str], str]
    Expected substring or RegExp or a list of those.
use_inner_text : Union[bool, None]
    Whether to use `element.innerText` instead of `element.textContent` when retrieving DOM node text.
timeout : Union[float, None]
    Time to retry the assertion for in milliseconds. Defaults to `5000`.
ignore_case : Union[bool, None]
    Whether to perform case-insensitive match. `ignoreCase` option takes precedence over the corresponding regular
    expression flag if specified.
Tr  useInnerTextr   r  N)r   rE   rF   to_contain_textr   rI   r  r  r   r  r  s         rJ   r  !LocatorAssertions.to_contain_textI  sW     b !&&..00 2+&	 1  
 	
r  c          	         #    Sn[         R                  " U R                  R                  [         R                  " U5      UUUS9I Sh  vN 5      $  N7f)a  LocatorAssertions.not_to_contain_text

The opposite of `locator_assertions.to_contain_text()`.

Parameters
----------
expected : Union[Pattern[str], Sequence[Pattern[str]], Sequence[Union[Pattern[str], str]], Sequence[str], str]
    Expected substring or RegExp or a list of those.
use_inner_text : Union[bool, None]
    Whether to use `element.innerText` instead of `element.textContent` when retrieving DOM node text.
timeout : Union[float, None]
    Time to retry the assertion for in milliseconds. Defaults to `5000`.
ignore_case : Union[bool, None]
    Whether to perform case-insensitive match. `ignoreCase` option takes precedence over the corresponding regular
    expression flag if specified.
Tr  N)r   rE   rF   not_to_contain_textr   r  s         rJ   r  %LocatorAssertions.not_to_contain_textRJ  sV     < !&&..44 2+&	 5  
 	
r  )r  r   r   r+  c          	      ~   #    Sn[         R                  " U R                  R                  XX4S9I Sh  vN 5      $  N7f)a  LocatorAssertions.to_have_attribute

Ensures the `Locator` points to an element with given attribute.

**Usage**

```py
from playwright.async_api import expect

locator = page.locator("input")
await expect(locator).to_have_attribute("type", "text")
```

Parameters
----------
name : str
    Attribute name.
value : Union[Pattern[str], str]
    Expected attribute value.
ignore_case : Union[bool, None]
    Whether to perform case-insensitive match. `ignoreCase` option takes precedence over the corresponding regular
    expression flag if specified.
timeout : Union[float, None]
    Time to retry the assertion for in milliseconds. Defaults to `5000`.
Tr   r+  r  r   N)r   rE   rF   to_have_attributerI   r   r+  r  r   r  s         rJ   r  #LocatorAssertions.to_have_attribute{J  sG     B !&&..22; 3  
 	
r  c          	      ~   #    Sn[         R                  " U R                  R                  XX4S9I Sh  vN 5      $  N7f)a  LocatorAssertions.not_to_have_attribute

The opposite of `locator_assertions.to_have_attribute()`.

Parameters
----------
name : str
    Attribute name.
value : Union[Pattern[str], str]
    Expected attribute value.
ignore_case : Union[bool, None]
    Whether to perform case-insensitive match. `ignoreCase` option takes precedence over the corresponding regular
    expression flag if specified.
timeout : Union[float, None]
    Time to retry the assertion for in milliseconds. Defaults to `5000`.
Tr  N)r   rE   rF   not_to_have_attributer  s         rJ   r	  'LocatorAssertions.not_to_have_attributeJ  sF     0 !&&..66; 7  
 	
r  r4  c                   #    Sn[         R                  " U R                  R                  [         R                  " U5      US9I Sh  vN 5      $  N7f)a  LocatorAssertions.to_have_class

Ensures the `Locator` points to an element with given CSS classes. When a string is provided, it must fully match
the element's `class` attribute. To match individual classes use `locator_assertions.to_contain_class()`.

**Usage**

```html
<div class='middle selected row' id='component'></div>
```

```py
from playwright.async_api import expect

locator = page.locator("#component")
await expect(locator).to_have_class("middle selected row")
await expect(locator).to_have_class(re.compile(r"(^|\\s)selected(\\s|$)"))
```

When an array is passed, the method asserts that the list of elements located matches the corresponding list of
expected class values. Each element's class attribute is matched against the corresponding string or regular
expression in the array:

```py
from playwright.async_api import expect

locator = page.locator("list > .component")
await expect(locator).to_have_class(["component", "component selected", "component"])
```

Parameters
----------
expected : Union[Pattern[str], Sequence[Pattern[str]], Sequence[Union[Pattern[str], str]], Sequence[str], str]
    Expected class or RegExp or a list of those.
timeout : Union[float, None]
    Time to retry the assertion for in milliseconds. Defaults to `5000`.
Tr  r   N)r   rE   rF   to_have_classr   rI   r  r   r  s       rJ   r	  LocatorAssertions.to_have_classJ  sP     b !&&.... 2G /  
 	
r0  c                   #    Sn[         R                  " U R                  R                  [         R                  " U5      US9I Sh  vN 5      $  N7f)ax  LocatorAssertions.not_to_have_class

The opposite of `locator_assertions.to_have_class()`.

Parameters
----------
expected : Union[Pattern[str], Sequence[Pattern[str]], Sequence[Union[Pattern[str], str]], Sequence[str], str]
    Expected class or RegExp or a list of those.
timeout : Union[float, None]
    Time to retry the assertion for in milliseconds. Defaults to `5000`.
Tr	  N)r   rE   rF   not_to_have_classr   r	  s       rJ   r		  #LocatorAssertions.not_to_have_classJ  sO     . !&&..22 2G 3  
 	
r0  c                   #    Sn[         R                  " U R                  R                  [         R                  " U5      US9I Sh  vN 5      $  N7f)a  LocatorAssertions.to_contain_class

Ensures the `Locator` points to an element with given CSS classes. All classes from the asserted value, separated
by spaces, must be present in the
[Element.classList](https://developer.mozilla.org/en-US/docs/Web/API/Element/classList) in any order.

**Usage**

```html
<div class='middle selected row' id='component'></div>
```

```py
from playwright.async_api import expect

locator = page.locator("#component")
await expect(locator).to_contain_class("middle selected row")
await expect(locator).to_contain_class("selected")
await expect(locator).to_contain_class("row middle")
```

When an array is passed, the method asserts that the list of elements located matches the corresponding list of
expected class lists. Each element's class attribute is matched against the corresponding class in the array:

```html
<div class='list'></div>
  <div class='component inactive'></div>
  <div class='component active'></div>
  <div class='component inactive'></div>
</div>
```

```py
from playwright.async_api import expect

locator = page.locator("list > .component")
await expect(locator).to_contain_class(["inactive", "active", "inactive"])
```

Parameters
----------
expected : Union[Sequence[str], str]
    A string containing expected class names, separated by spaces, or a list of such strings to assert multiple
    elements.
timeout : Union[float, None]
    Time to retry the assertion for in milliseconds. Defaults to `5000`.
Tr	  N)r   rE   rF   to_contain_classr   r	  s       rJ   r	  "LocatorAssertions.to_contain_classK  sP     j !&&..11 2G 2  
 	
r0  c                   #    Sn[         R                  " U R                  R                  [         R                  " U5      US9I Sh  vN 5      $  N7f)a4  LocatorAssertions.not_to_contain_class

The opposite of `locator_assertions.to_contain_class()`.

Parameters
----------
expected : Union[Sequence[str], str]
    Expected class or RegExp or a list of those.
timeout : Union[float, None]
    Time to retry the assertion for in milliseconds. Defaults to `5000`.
Tr	  N)r   rE   rF   not_to_contain_classr   r	  s       rJ   r	  &LocatorAssertions.not_to_contain_classYK  sO     " !&&..55 2G 6  
 	
r0  rV  c                |   #    Sn[         R                  " U R                  R                  XS9I Sh  vN 5      $  N7f)a  LocatorAssertions.to_have_count

Ensures the `Locator` resolves to an exact number of DOM nodes.

**Usage**

```py
from playwright.async_api import expect

locator = page.locator("list > .component")
await expect(locator).to_have_count(3)
```

Parameters
----------
count : int
    Expected count.
timeout : Union[float, None]
    Time to retry the assertion for in milliseconds. Defaults to `5000`.
TrV  r   N)r   rE   rF   to_have_countrI   rV  r   r  s       rJ   r	  LocatorAssertions.to_have_countrK  s;     . !&&....U.LL
 	
Lr  c                |   #    Sn[         R                  " U R                  R                  XS9I Sh  vN 5      $  N7f)zLocatorAssertions.not_to_have_count

The opposite of `locator_assertions.to_have_count()`.

Parameters
----------
count : int
    Expected count.
timeout : Union[float, None]
    Time to retry the assertion for in milliseconds. Defaults to `5000`.
Tr	  N)r   rE   rF   not_to_have_countr	  s       rJ   r	  #LocatorAssertions.not_to_have_countK  s;      !&&..222PP
 	
Pr  c                ~   #    Sn[         R                  " U R                  R                  XUS9I Sh  vN 5      $  N7f)a  LocatorAssertions.to_have_css

Ensures the `Locator` resolves to an element with the given computed CSS style.

**Usage**

```py
from playwright.async_api import expect

locator = page.get_by_role("button")
await expect(locator).to_have_css("display", "flex")
```

Parameters
----------
name : str
    CSS property name.
value : Union[Pattern[str], str]
    CSS property value.
timeout : Union[float, None]
    Time to retry the assertion for in milliseconds. Defaults to `5000`.
Tr   r+  r   N)r   rE   rF   to_have_cssrI   r   r+  r   r  s        rJ   r	  LocatorAssertions.to_have_cssK  s=     : !&&..,,$W,UU
 	
Ur  c                ~   #    Sn[         R                  " U R                  R                  XUS9I Sh  vN 5      $  N7f)a/  LocatorAssertions.not_to_have_css

The opposite of `locator_assertions.to_have_css()`.

Parameters
----------
name : str
    CSS property name.
value : Union[Pattern[str], str]
    CSS property value.
timeout : Union[float, None]
    Time to retry the assertion for in milliseconds. Defaults to `5000`.
Tr	  N)r   rE   rF   not_to_have_cssr	  s        rJ   r	  !LocatorAssertions.not_to_have_cssK  sF     ( !&&..00 1  
 	
r  idc                |   #    Sn[         R                  " U R                  R                  XS9I Sh  vN 5      $  N7f)a  LocatorAssertions.to_have_id

Ensures the `Locator` points to an element with the given DOM Node ID.

**Usage**

```py
from playwright.async_api import expect

locator = page.get_by_role("textbox")
await expect(locator).to_have_id("lastname")
```

Parameters
----------
id : Union[Pattern[str], str]
    Element id.
timeout : Union[float, None]
    Time to retry the assertion for in milliseconds. Defaults to `5000`.
Tr!	  r   N)r   rE   rF   
to_have_idrI   r!	  r   r  s       rJ   r$	  LocatorAssertions.to_have_idK  s;     4 !&&..++r+CC
 	
Cr  c                |   #    Sn[         R                  " U R                  R                  XS9I Sh  vN 5      $  N7f)a   LocatorAssertions.not_to_have_id

The opposite of `locator_assertions.to_have_id()`.

Parameters
----------
id : Union[Pattern[str], str]
    Element id.
timeout : Union[float, None]
    Time to retry the assertion for in milliseconds. Defaults to `5000`.
Tr#	  N)r   rE   rF   not_to_have_idr%	  s       rJ   r(	   LocatorAssertions.not_to_have_idL  s;     " !&&..//2/GG
 	
Gr  c                   #    Sn[         R                  " U R                  R                  U[         R                  " U5      US9I Sh  vN 5      $  N7f)a1  LocatorAssertions.to_have_js_property

Ensures the `Locator` points to an element with given JavaScript property. Note that this property can be of a
primitive type as well as a plain serializable JavaScript object.

**Usage**

```py
from playwright.async_api import expect

locator = page.locator(".component")
await expect(locator).to_have_js_property("loaded", True)
```

Parameters
----------
name : str
    Property name.
value : Any
    Property value.
timeout : Union[float, None]
    Time to retry the assertion for in milliseconds. Defaults to `5000`.
Tr	  N)r   rE   rF   to_have_js_propertyr   r	  s        rJ   r+	  %LocatorAssertions.to_have_js_propertyL  sQ     4 !&&..44!7 5  
 	
r+  c                   #    Sn[         R                  " U R                  R                  U[         R                  " U5      US9I Sh  vN 5      $  N7f)a"  LocatorAssertions.not_to_have_js_property

The opposite of `locator_assertions.to_have_js_property()`.

Parameters
----------
name : str
    Property name.
value : Any
    Property value.
timeout : Union[float, None]
    Time to retry the assertion for in milliseconds. Defaults to `5000`.
Tr	  N)r   rE   rF   not_to_have_js_propertyr   r	  s        rJ   r.	  )LocatorAssertions.not_to_have_js_property;L  sQ       !&&..88!7 9  
 	
r+  c                |   #    Sn[         R                  " U R                  R                  XS9I Sh  vN 5      $  N7f)a  LocatorAssertions.to_have_value

Ensures the `Locator` points to an element with the given input value. You can use regular expressions for the
value as well.

**Usage**

```py
import re
from playwright.async_api import expect

locator = page.locator("input[type=number]")
await expect(locator).to_have_value(re.compile(r"[0-9]"))
```

Parameters
----------
value : Union[Pattern[str], str]
    Expected value.
timeout : Union[float, None]
    Time to retry the assertion for in milliseconds. Defaults to `5000`.
Tr+  r   N)r   rE   rF   to_have_valuerI   r+  r   r  s       rJ   r2	  LocatorAssertions.to_have_valueSL  s;     8 !&&....U.LL
 	
Lr  c                |   #    Sn[         R                  " U R                  R                  XS9I Sh  vN 5      $  N7f)a  LocatorAssertions.not_to_have_value

The opposite of `locator_assertions.to_have_value()`.

Parameters
----------
value : Union[Pattern[str], str]
    Expected value.
timeout : Union[float, None]
    Time to retry the assertion for in milliseconds. Defaults to `5000`.
Tr1	  N)r   rE   rF   not_to_have_valuer3	  s       rJ   r6	  #LocatorAssertions.not_to_have_valueuL  s;     " !&&..222PP
 	
Pr  valuesc                   #    Sn[         R                  " U R                  R                  [         R                  " U5      US9I Sh  vN 5      $  N7f)ag  LocatorAssertions.to_have_values

Ensures the `Locator` points to multi-select/combobox (i.e. a `select` with the `multiple` attribute) and the
specified values are selected.

**Usage**

For example, given the following element:

```html
<select id="favorite-colors" multiple>
  <option value="R">Red</option>
  <option value="G">Green</option>
  <option value="B">Blue</option>
</select>
```

```py
import re
from playwright.async_api import expect

locator = page.locator("id=favorite-colors")
await locator.select_option(["R", "G"])
await expect(locator).to_have_values([re.compile(r"R"), re.compile(r"G")])
```

Parameters
----------
values : Union[Sequence[Pattern[str]], Sequence[Union[Pattern[str], str]], Sequence[str]]
    Expected options currently selected.
timeout : Union[float, None]
    Time to retry the assertion for in milliseconds. Defaults to `5000`.
Tr8	  r   N)r   rE   rF   to_have_valuesr   rI   r8	  r   r  s       rJ   r;	   LocatorAssertions.to_have_valuesL  sP     V !&&..//v. 0  
 	
r0  c                   #    Sn[         R                  " U R                  R                  [         R                  " U5      US9I Sh  vN 5      $  N7f)a]  LocatorAssertions.not_to_have_values

The opposite of `locator_assertions.to_have_values()`.

Parameters
----------
values : Union[Sequence[Pattern[str]], Sequence[Union[Pattern[str], str]], Sequence[str]]
    Expected options currently selected.
timeout : Union[float, None]
    Time to retry the assertion for in milliseconds. Defaults to `5000`.
Tr:	  N)r   rE   rF   not_to_have_valuesr   r<	  s       rJ   r?	  $LocatorAssertions.not_to_have_valuesL  sO     * !&&..33v. 4  
 	
r0  c          	         #    Sn[         R                  " U R                  R                  [         R                  " U5      UUUS9I Sh  vN 5      $  N7f)u	  LocatorAssertions.to_have_text

Ensures the `Locator` points to an element with the given text. All nested elements will be considered when
computing the text content of the element. You can use regular expressions for the value as well.

**Details**

When `expected` parameter is a string, Playwright will normalize whitespaces and line breaks both in the actual
text and in the expected string before matching. When regular expression is used, the actual text is matched as is.

**Usage**

```py
import re
from playwright.async_api import expect

locator = page.locator(".title")
await expect(locator).to_have_text(re.compile(r"Welcome, Test User"))
await expect(locator).to_have_text(re.compile(r"Welcome, .*"))
```

If you pass an array as an expected value, the expectations are:
1. Locator resolves to a list of elements.
1. The number of elements equals the number of expected values in the array.
1. Elements from the list have text matching expected array values, one by one, in order.

For example, consider the following list:

```html
<ul>
  <li>Text 1</li>
  <li>Text 2</li>
  <li>Text 3</li>
</ul>
```

Let's see how we can use the assertion:

```py
from playwright.async_api import expect

# ✓ Has the right items in the right order
await expect(page.locator("ul > li")).to_have_text(["Text 1", "Text 2", "Text 3"])

# ✖ Wrong order
await expect(page.locator("ul > li")).to_have_text(["Text 3", "Text 2", "Text 1"])

# ✖ Last item does not match
await expect(page.locator("ul > li")).to_have_text(["Text 1", "Text 2", "Text"])

# ✖ Locator points to the outer list element, not to the list items
await expect(page.locator("ul")).to_have_text(["Text 1", "Text 2", "Text 3"])
```

Parameters
----------
expected : Union[Pattern[str], Sequence[Pattern[str]], Sequence[Union[Pattern[str], str]], Sequence[str], str]
    Expected string or RegExp or a list of those.
use_inner_text : Union[bool, None]
    Whether to use `element.innerText` instead of `element.textContent` when retrieving DOM node text.
timeout : Union[float, None]
    Time to retry the assertion for in milliseconds. Defaults to `5000`.
ignore_case : Union[bool, None]
    Whether to perform case-insensitive match. `ignoreCase` option takes precedence over the corresponding regular
    expression flag if specified.
Tr  N)r   rE   rF   to_have_textr   r  s         rJ   rB	  LocatorAssertions.to_have_textL  sW     ` !&&..-- 2+&	 .  
 	
r  c          	         #    Sn[         R                  " U R                  R                  [         R                  " U5      UUUS9I Sh  vN 5      $  N7f)a  LocatorAssertions.not_to_have_text

The opposite of `locator_assertions.to_have_text()`.

Parameters
----------
expected : Union[Pattern[str], Sequence[Pattern[str]], Sequence[Union[Pattern[str], str]], Sequence[str], str]
    Expected string or RegExp or a list of those.
use_inner_text : Union[bool, None]
    Whether to use `element.innerText` instead of `element.textContent` when retrieving DOM node text.
timeout : Union[float, None]
    Time to retry the assertion for in milliseconds. Defaults to `5000`.
ignore_case : Union[bool, None]
    Whether to perform case-insensitive match. `ignoreCase` option takes precedence over the corresponding regular
    expression flag if specified.
Tr  N)r   rE   rF   not_to_have_textr   r  s         rJ   rE	  "LocatorAssertions.not_to_have_text7M  sV     < !&&..11 2+&	 2  
 	
r  r  r   r  c                |   #    Sn[         R                  " U R                  R                  XS9I Sh  vN 5      $  N7f)a  LocatorAssertions.to_be_attached

Ensures that `Locator` points to an element that is
[connected](https://developer.mozilla.org/en-US/docs/Web/API/Node/isConnected) to a Document or a ShadowRoot.

**Usage**

```py
await expect(page.get_by_text("Hidden text")).to_be_attached()
```

Parameters
----------
attached : Union[bool, None]
timeout : Union[float, None]
    Time to retry the assertion for in milliseconds. Defaults to `5000`.
TrG	  N)r   rE   rF   to_be_attachedrI   r  r   r  s       rJ   rI	   LocatorAssertions.to_be_attached`M  s;     . !&&..///SS
 	
Sr  r   r`  indeterminater`  rM	  c                ~   #    Sn[         R                  " U R                  R                  XUS9I Sh  vN 5      $  N7f)a  LocatorAssertions.to_be_checked

Ensures the `Locator` points to a checked input.

**Usage**

```py
from playwright.async_api import expect

locator = page.get_by_label("Subscribe to newsletter")
await expect(locator).to_be_checked()
```

Parameters
----------
timeout : Union[float, None]
    Time to retry the assertion for in milliseconds. Defaults to `5000`.
checked : Union[bool, None]
    Provides state to assert for. Asserts for input to be checked by default. This option can't be used when
    `indeterminate` is set to true.
indeterminate : Union[bool, None]
    Asserts that the element is in the indeterminate (mixed) state. Only supported for checkboxes and radio buttons.
    This option can't be true when `checked` is provided.
TrL	  N)r   rE   rF   to_be_checked)rI   r   r`  rM	  r  s        rJ   rO	  LocatorAssertions.to_be_checked}M  sF     > !&&.... /  
 	
r  c                |   #    Sn[         R                  " U R                  R                  XS9I Sh  vN 5      $  N7f)zLocatorAssertions.not_to_be_attached

The opposite of `locator_assertions.to_be_attached()`.

Parameters
----------
attached : Union[bool, None]
timeout : Union[float, None]
    Time to retry the assertion for in milliseconds. Defaults to `5000`.
TrG	  N)r   rE   rF   not_to_be_attachedrJ	  s       rJ   rR	  $LocatorAssertions.not_to_be_attachedM  ;       !&&..33X3WW
 	
Wr  c                |   #    Sn[         R                  " U R                  R                  US9I Sh  vN 5      $  N7f)zLocatorAssertions.not_to_be_checked

The opposite of `locator_assertions.to_be_checked()`.

Parameters
----------
timeout : Union[float, None]
    Time to retry the assertion for in milliseconds. Defaults to `5000`.
Tr4  N)r   rE   rF   not_to_be_checkedrI   r   r  s      rJ   rV	  #LocatorAssertions.not_to_be_checkedM  ;      !&&..2272CC
 	
Cr  c                |   #    Sn[         R                  " U R                  R                  US9I Sh  vN 5      $  N7f)a  LocatorAssertions.to_be_disabled

Ensures the `Locator` points to a disabled element. Element is disabled if it has "disabled" attribute or is
disabled via
['aria-disabled'](https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/Attributes/aria-disabled). Note
that only native control elements such as HTML `button`, `input`, `select`, `textarea`, `option`, `optgroup` can be
disabled by setting "disabled" attribute. "disabled" attribute on other elements is ignored by the browser.

**Usage**

```py
from playwright.async_api import expect

locator = page.locator("button.submit")
await expect(locator).to_be_disabled()
```

Parameters
----------
timeout : Union[float, None]
    Time to retry the assertion for in milliseconds. Defaults to `5000`.
Tr4  N)r   rE   rF   to_be_disabledrW	  s      rJ   r[	   LocatorAssertions.to_be_disabledM  s;     . !&&..///@@
 	
@r  c                |   #    Sn[         R                  " U R                  R                  US9I Sh  vN 5      $  N7f)zLocatorAssertions.not_to_be_disabled

The opposite of `locator_assertions.to_be_disabled()`.

Parameters
----------
timeout : Union[float, None]
    Time to retry the assertion for in milliseconds. Defaults to `5000`.
Tr4  N)r   rE   rF   not_to_be_disabledrW	  s      rJ   r^	  $LocatorAssertions.not_to_be_disabledM  s;      !&&..33G3DD
 	
Dr  r  r   r  c                |   #    Sn[         R                  " U R                  R                  XS9I Sh  vN 5      $  N7f)a}  LocatorAssertions.to_be_editable

Ensures the `Locator` points to an editable element.

**Usage**

```py
from playwright.async_api import expect

locator = page.get_by_role("textbox")
await expect(locator).to_be_editable()
```

Parameters
----------
editable : Union[bool, None]
timeout : Union[float, None]
    Time to retry the assertion for in milliseconds. Defaults to `5000`.
Tr`	  N)r   rE   rF   to_be_editablerI   r  r   r  s       rJ   rb	   LocatorAssertions.to_be_editableM  s;     2 !&&..///SS
 	
Sr  c                |   #    Sn[         R                  " U R                  R                  XS9I Sh  vN 5      $  N7f)zLocatorAssertions.not_to_be_editable

The opposite of `locator_assertions.to_be_editable()`.

Parameters
----------
editable : Union[bool, None]
timeout : Union[float, None]
    Time to retry the assertion for in milliseconds. Defaults to `5000`.
Tr`	  N)r   rE   rF   not_to_be_editablerc	  s       rJ   rf	  $LocatorAssertions.not_to_be_editableN  rT	  r  c                |   #    Sn[         R                  " U R                  R                  US9I Sh  vN 5      $  N7f)a  LocatorAssertions.to_be_empty

Ensures the `Locator` points to an empty editable element or to a DOM node that has no text.

**Usage**

```py
from playwright.async_api import expect

locator = page.locator("div.warning")
await expect(locator).to_be_empty()
```

Parameters
----------
timeout : Union[float, None]
    Time to retry the assertion for in milliseconds. Defaults to `5000`.
Tr4  N)r   rE   rF   to_be_emptyrW	  s      rJ   ri	  LocatorAssertions.to_be_empty0N  s;     & !&&..,,W,==
 	
=r  c                |   #    Sn[         R                  " U R                  R                  US9I Sh  vN 5      $  N7f)zLocatorAssertions.not_to_be_empty

The opposite of `locator_assertions.to_be_empty()`.

Parameters
----------
timeout : Union[float, None]
    Time to retry the assertion for in milliseconds. Defaults to `5000`.
Tr4  N)r   rE   rF   not_to_be_emptyrW	  s      rJ   rl	  !LocatorAssertions.not_to_be_emptyIN  s;      !&&..000AA
 	
Ar  r  r   r  c                |   #    Sn[         R                  " U R                  R                  XS9I Sh  vN 5      $  N7f)a{  LocatorAssertions.to_be_enabled

Ensures the `Locator` points to an enabled element.

**Usage**

```py
from playwright.async_api import expect

locator = page.locator("button.submit")
await expect(locator).to_be_enabled()
```

Parameters
----------
enabled : Union[bool, None]
timeout : Union[float, None]
    Time to retry the assertion for in milliseconds. Defaults to `5000`.
Trn	  N)r   rE   rF   to_be_enabledrI   r  r   r  s       rJ   rp	  LocatorAssertions.to_be_enabledYN  s;     2 !&&....w.PP
 	
Pr  c                |   #    Sn[         R                  " U R                  R                  XS9I Sh  vN 5      $  N7f)zLocatorAssertions.not_to_be_enabled

The opposite of `locator_assertions.to_be_enabled()`.

Parameters
----------
enabled : Union[bool, None]
timeout : Union[float, None]
    Time to retry the assertion for in milliseconds. Defaults to `5000`.
Trn	  N)r   rE   rF   not_to_be_enabledrq	  s       rJ   rt	  #LocatorAssertions.not_to_be_enabledxN  ;       !&&..2272TT
 	
Tr  c                |   #    Sn[         R                  " U R                  R                  US9I Sh  vN 5      $  N7f)a  LocatorAssertions.to_be_hidden

Ensures that `Locator` either does not resolve to any DOM node, or resolves to a
[non-visible](https://playwright.dev/python/docs/actionability#visible) one.

**Usage**

```py
from playwright.async_api import expect

locator = page.locator('.my-element')
await expect(locator).to_be_hidden()
```

Parameters
----------
timeout : Union[float, None]
    Time to retry the assertion for in milliseconds. Defaults to `5000`.
Tr4  N)r   rE   rF   to_be_hiddenrW	  s      rJ   rx	  LocatorAssertions.to_be_hiddenN  s;     ( !&&..--g->>
 	
>r  c                |   #    Sn[         R                  " U R                  R                  US9I Sh  vN 5      $  N7f)zLocatorAssertions.not_to_be_hidden

The opposite of `locator_assertions.to_be_hidden()`.

Parameters
----------
timeout : Union[float, None]
    Time to retry the assertion for in milliseconds. Defaults to `5000`.
Tr4  N)r   rE   rF   not_to_be_hiddenrW	  s      rJ   r{	  "LocatorAssertions.not_to_be_hiddenN  s;      !&&..11'1BB
 	
Br  r  r   r  c                |   #    Sn[         R                  " U R                  R                  XS9I Sh  vN 5      $  N7f)a?  LocatorAssertions.to_be_visible

Ensures that `Locator` points to an attached and [visible](https://playwright.dev/python/docs/actionability#visible) DOM node.

To check that at least one element from the list is visible, use `locator.first()`.

**Usage**

```py
# A specific element is visible.
await expect(page.get_by_text("Welcome")).to_be_visible()

# At least one item in the list is visible.
await expect(page.get_by_test_id("todo-item").first).to_be_visible()

# At least one of the two elements is visible, possibly both.
await expect(
    page.get_by_role("button", name="Sign in")
    .or_(page.get_by_role("button", name="Sign up"))
    .first
).to_be_visible()
```

Parameters
----------
visible : Union[bool, None]
timeout : Union[float, None]
    Time to retry the assertion for in milliseconds. Defaults to `5000`.
Tr}	  N)r   rE   rF   to_be_visiblerI   r  r   r  s       rJ   r	  LocatorAssertions.to_be_visibleN  s<     F !&&....w.PP
 	
Pr  c                |   #    Sn[         R                  " U R                  R                  XS9I Sh  vN 5      $  N7f)zLocatorAssertions.not_to_be_visible

The opposite of `locator_assertions.to_be_visible()`.

Parameters
----------
visible : Union[bool, None]
timeout : Union[float, None]
    Time to retry the assertion for in milliseconds. Defaults to `5000`.
Tr}	  N)r   rE   rF   not_to_be_visibler	  s       rJ   r	  #LocatorAssertions.not_to_be_visibleN  rv	  r  c                |   #    Sn[         R                  " U R                  R                  US9I Sh  vN 5      $  N7f)a]  LocatorAssertions.to_be_focused

Ensures the `Locator` points to a focused DOM node.

**Usage**

```py
from playwright.async_api import expect

locator = page.get_by_role("textbox")
await expect(locator).to_be_focused()
```

Parameters
----------
timeout : Union[float, None]
    Time to retry the assertion for in milliseconds. Defaults to `5000`.
Tr4  N)r   rE   rF   to_be_focusedrW	  s      rJ   r	  LocatorAssertions.to_be_focusedN  s;     & !&&....w.??
 	
?r  c                |   #    Sn[         R                  " U R                  R                  US9I Sh  vN 5      $  N7f)zLocatorAssertions.not_to_be_focused

The opposite of `locator_assertions.to_be_focused()`.

Parameters
----------
timeout : Union[float, None]
    Time to retry the assertion for in milliseconds. Defaults to `5000`.
Tr4  N)r   rE   rF   not_to_be_focusedrW	  s      rJ   r	  #LocatorAssertions.not_to_be_focusedO  rY	  r  ratior   r	  c                |   #    Sn[         R                  " U R                  R                  XS9I Sh  vN 5      $  N7f)a  LocatorAssertions.to_be_in_viewport

Ensures the `Locator` points to an element that intersects viewport, according to the
[intersection observer API](https://developer.mozilla.org/en-US/docs/Web/API/Intersection_Observer_API).

**Usage**

```py
from playwright.async_api import expect

locator = page.get_by_role("button")
# Make sure at least some part of element intersects viewport.
await expect(locator).to_be_in_viewport()
# Make sure element is fully outside of viewport.
await expect(locator).not_to_be_in_viewport()
# Make sure that at least half of the element intersects viewport.
await expect(locator).to_be_in_viewport(ratio=0.5)
```

Parameters
----------
ratio : Union[float, None]
    The minimal ratio of the element to intersect viewport. If equals to `0`, then element should intersect viewport at
    any positive ratio. Defaults to `0`.
timeout : Union[float, None]
    Time to retry the assertion for in milliseconds. Defaults to `5000`.
Tr	  N)r   rE   rF   to_be_in_viewportrI   r	  r   r  s       rJ   r	  #LocatorAssertions.to_be_in_viewport"O  s<     B !&&..222PP
 	
Pr  c                |   #    Sn[         R                  " U R                  R                  XS9I Sh  vN 5      $  N7f)zLocatorAssertions.not_to_be_in_viewport

The opposite of `locator_assertions.to_be_in_viewport()`.

Parameters
----------
ratio : Union[float, None]
timeout : Union[float, None]
    Time to retry the assertion for in milliseconds. Defaults to `5000`.
Tr	  N)r   rE   rF   not_to_be_in_viewportr	  s       rJ   r	  'LocatorAssertions.not_to_be_in_viewportIO  s;       !&&..66U6TT
 	
Tr  descriptionc                ~   #    Sn[         R                  " U R                  R                  XUS9I Sh  vN 5      $  N7f)a  LocatorAssertions.to_have_accessible_description

Ensures the `Locator` points to an element with a given
[accessible description](https://w3c.github.io/accname/#dfn-accessible-description).

**Usage**

```py
locator = page.get_by_test_id("save-button")
await expect(locator).to_have_accessible_description("Save results to disk")
```

Parameters
----------
description : Union[Pattern[str], str]
    Expected accessible description.
ignore_case : Union[bool, None]
    Whether to perform case-insensitive match. `ignoreCase` option takes precedence over the corresponding regular
    expression flag if specified.
timeout : Union[float, None]
    Time to retry the assertion for in milliseconds. Defaults to `5000`.
T)r	  r  r   N)r   rE   rF   to_have_accessible_description)rI   r	  r  r   r  s        rJ   r	  0LocatorAssertions.to_have_accessible_description_O  sG     : !&&..??' @  
 	
r  c                ~   #    Sn[         R                  " U R                  R                  XUS9I Sh  vN 5      $  N7f)a  LocatorAssertions.not_to_have_accessible_description

The opposite of `locator_assertions.to_have_accessible_description()`.

Parameters
----------
name : Union[Pattern[str], str]
    Expected accessible description.
ignore_case : Union[bool, None]
    Whether to perform case-insensitive match. `ignoreCase` option takes precedence over the corresponding regular
    expression flag if specified.
timeout : Union[float, None]
    Time to retry the assertion for in milliseconds. Defaults to `5000`.
Tr   r  r   N)r   rE   rF   "not_to_have_accessible_descriptionrI   r   r  r   r  s        rJ   r	  4LocatorAssertions.not_to_have_accessible_descriptionO  sG     * !&&..CC7 D  
 	
r  c                ~   #    Sn[         R                  " U R                  R                  XUS9I Sh  vN 5      $  N7f)a  LocatorAssertions.to_have_accessible_name

Ensures the `Locator` points to an element with a given
[accessible name](https://w3c.github.io/accname/#dfn-accessible-name).

**Usage**

```py
locator = page.get_by_test_id("save-button")
await expect(locator).to_have_accessible_name("Save to disk")
```

Parameters
----------
name : Union[Pattern[str], str]
    Expected accessible name.
ignore_case : Union[bool, None]
    Whether to perform case-insensitive match. `ignoreCase` option takes precedence over the corresponding regular
    expression flag if specified.
timeout : Union[float, None]
    Time to retry the assertion for in milliseconds. Defaults to `5000`.
Tr	  N)r   rE   rF   to_have_accessible_namer	  s        rJ   r	  )LocatorAssertions.to_have_accessible_nameO  sF     : !&&..887 9  
 	
r  c                ~   #    Sn[         R                  " U R                  R                  XUS9I Sh  vN 5      $  N7f)a  LocatorAssertions.not_to_have_accessible_name

The opposite of `locator_assertions.to_have_accessible_name()`.

Parameters
----------
name : Union[Pattern[str], str]
    Expected accessible name.
ignore_case : Union[bool, None]
    Whether to perform case-insensitive match. `ignoreCase` option takes precedence over the corresponding regular
    expression flag if specified.
timeout : Union[float, None]
    Time to retry the assertion for in milliseconds. Defaults to `5000`.
Tr	  N)r   rE   rF   not_to_have_accessible_namer	  s        rJ   r	  -LocatorAssertions.not_to_have_accessible_nameO  sF     * !&&..<<7 =  
 	
r  r  r  c                |   #    Sn[         R                  " U R                  R                  XS9I Sh  vN 5      $  N7f)a  LocatorAssertions.to_have_role

Ensures the `Locator` points to an element with a given [ARIA role](https://www.w3.org/TR/wai-aria-1.2/#roles).

Note that role is matched as a string, disregarding the ARIA role hierarchy. For example, asserting  a superclass
role `"checkbox"` on an element with a subclass role `"switch"` will fail.

**Usage**

```py
locator = page.get_by_test_id("save-button")
await expect(locator).to_have_role("button")
```

Parameters
----------
role : Union["alert", "alertdialog", "application", "article", "banner", "blockquote", "button", "caption", "cell", "checkbox", "code", "columnheader", "combobox", "complementary", "contentinfo", "definition", "deletion", "dialog", "directory", "document", "emphasis", "feed", "figure", "form", "generic", "grid", "gridcell", "group", "heading", "img", "insertion", "link", "list", "listbox", "listitem", "log", "main", "marquee", "math", "menu", "menubar", "menuitem", "menuitemcheckbox", "menuitemradio", "meter", "navigation", "none", "note", "option", "paragraph", "presentation", "progressbar", "radio", "radiogroup", "region", "row", "rowgroup", "rowheader", "scrollbar", "search", "searchbox", "separator", "slider", "spinbutton", "status", "strong", "subscript", "superscript", "switch", "tab", "table", "tablist", "tabpanel", "term", "textbox", "time", "timer", "toolbar", "tooltip", "tree", "treegrid", "treeitem"]
    Required aria role.
timeout : Union[float, None]
    Time to retry the assertion for in milliseconds. Defaults to `5000`.
Tr  r   N)r   rE   rF   to_have_rolerI   r  r   r  s       rJ   r	  LocatorAssertions.to_have_roleO  s<     \ !&&..--4-II
 	
Ir  error_messagec                ~   #    Sn[         R                  " U R                  R                  XUS9I Sh  vN 5      $  N7f)a  LocatorAssertions.to_have_accessible_error_message

Ensures the `Locator` points to an element with a given
[aria errormessage](https://w3c.github.io/aria/#aria-errormessage).

**Usage**

```py
locator = page.get_by_test_id("username-input")
await expect(locator).to_have_accessible_error_message("Username is required.")
```

Parameters
----------
error_message : Union[Pattern[str], str]
    Expected accessible error message.
ignore_case : Union[bool, None]
    Whether to perform case-insensitive match. `ignoreCase` option takes precedence over the corresponding regular
    expression flag if specified.
timeout : Union[float, None]
    Time to retry the assertion for in milliseconds. Defaults to `5000`.
TerrorMessager  r   N)r   rE   rF    to_have_accessible_error_messagerI   r	  r  r   r  s        rJ   r	  2LocatorAssertions.to_have_accessible_error_messageWP  sG     : !&&..AA*G B  
 	
r  c                ~   #    Sn[         R                  " U R                  R                  XUS9I Sh  vN 5      $  N7f)a  LocatorAssertions.not_to_have_accessible_error_message

The opposite of `locator_assertions.to_have_accessible_error_message()`.

Parameters
----------
error_message : Union[Pattern[str], str]
    Expected accessible error message.
ignore_case : Union[bool, None]
    Whether to perform case-insensitive match. `ignoreCase` option takes precedence over the corresponding regular
    expression flag if specified.
timeout : Union[float, None]
    Time to retry the assertion for in milliseconds. Defaults to `5000`.
Tr	  N)r   rE   rF   $not_to_have_accessible_error_messager	  s        rJ   r	  6LocatorAssertions.not_to_have_accessible_error_message|P  sG     * !&&..EE*G F  
 	
r  c                |   #    Sn[         R                  " U R                  R                  XS9I Sh  vN 5      $  N7f)a  LocatorAssertions.not_to_have_role

The opposite of `locator_assertions.to_have_role()`.

Parameters
----------
role : Union["alert", "alertdialog", "application", "article", "banner", "blockquote", "button", "caption", "cell", "checkbox", "code", "columnheader", "combobox", "complementary", "contentinfo", "definition", "deletion", "dialog", "directory", "document", "emphasis", "feed", "figure", "form", "generic", "grid", "gridcell", "group", "heading", "img", "insertion", "link", "list", "listbox", "listitem", "log", "main", "marquee", "math", "menu", "menubar", "menuitem", "menuitemcheckbox", "menuitemradio", "meter", "navigation", "none", "note", "option", "paragraph", "presentation", "progressbar", "radio", "radiogroup", "region", "row", "rowgroup", "rowheader", "scrollbar", "search", "searchbox", "separator", "slider", "spinbutton", "status", "strong", "subscript", "superscript", "switch", "tab", "table", "tablist", "tabpanel", "term", "textbox", "time", "timer", "toolbar", "tooltip", "tree", "treegrid", "treeitem"]
    Required aria role.
timeout : Union[float, None]
    Time to retry the assertion for in milliseconds. Defaults to `5000`.
Tr	  N)r   rE   rF   not_to_have_roler	  s       rJ   r	  "LocatorAssertions.not_to_have_roleP  s<     H !&&..11t1MM
 	
Mr  c                |   #    Sn[         R                  " U R                  R                  XS9I Sh  vN 5      $  N7f)a  LocatorAssertions.to_match_aria_snapshot

Asserts that the target element matches the given [accessibility snapshot](https://playwright.dev/python/docs/aria-snapshots).

**Usage**

```py
await page.goto("https://demo.playwright.dev/todomvc/")
await expect(page.locator('body')).to_match_aria_snapshot('''
  - heading "todos"
  - textbox "What needs to be done?"
''')
```

Parameters
----------
expected : str
timeout : Union[float, None]
    Time to retry the assertion for in milliseconds. Defaults to `5000`.
Tr	  N)r   rE   rF   to_match_aria_snapshotr	  s       rJ   r	  (LocatorAssertions.to_match_aria_snapshotQ  sD     . !&&..77! 8  
 	
r  c                |   #    Sn[         R                  " U R                  R                  XS9I Sh  vN 5      $  N7f)zLocatorAssertions.not_to_match_aria_snapshot

The opposite of `locator_assertions.to_match_aria_snapshot()`.

Parameters
----------
expected : str
timeout : Union[float, None]
    Time to retry the assertion for in milliseconds. Defaults to `5000`.
Tr	  N)r   rE   rF   not_to_match_aria_snapshotr	  s       rJ   r	  ,LocatorAssertions.not_to_match_aria_snapshot"Q  sD      !&&..;;! <  
 	
r  r   )Dr   r   r   r   r   r	  r  r   rK  r   r   r  r  r  r  r	  r	  r		  r	  r	  r   r	  r	  r	  r	  r$	  r(	  r   r+	  r.	  r2	  r6	  r;	  r?	  rB	  rE	  rI	  rO	  rR	  rV	  r[	  r^	  rb	  rf	  ri	  rl	  rp	  rt	  rx	  r{	  r	  r	  r	  r	  r	  r	  r	  r	  r	  r	  r   r	  r	  r	  r	  r	  r	  r   r   rM   rJ   r   r   I  s     15*.-1Z
,,OOC OOFNN3/0OOFLL)<c)ABCNN3	
Z
 -Z
 'Z
 __T*Z
 
Z
L 15*.-1'
,,OOC OOFNN3/0OOFLL)<c)ABCNN3	
'
 -'
 ''
 __T*'
 
'
\ .2*.'
'
 ||C!445'

 __T*'
 ''
 
'
\ .2*.

 ||C!445

 __T*
 '
 

T +/7
,,OOC OOFNN3/0OOFLL)<c)ABCNN3	
7
 '7
 
7
F +/
,,OOC OOFNN3/0OOFLL)<c)ABCNN3	

 '
 

F +/	;
,,vs3S89;
 '	;

 
;
B +/	
,,vs3S89
 '	

 

4 @D

&,ooe&<
	
< @D

&,ooe&<
	
2 +/!
!
 ||C!445!

 '!
 
!
P +/

 ||C!445

 '
 

@ +/	
LLfnnS112
 '	

 

H +/	
LLfnnS112
 '	

 

0 RV 
 
 &

 
8>8N 
	 
F RV

 &


8>8N
	
8 +/	 
||C!445 
 '	 

 
 
L +/	
||C!445
 '	

 

> +/1
OOC OOFNN3/0OOFLL)<c)ABCE
1
 '1
 
1
v +/
OOC OOFNN3/0OOFLL)<c)ABCE

 '
 

N 15*.-1Y
,,OOC OOFNN3/0OOFLL)<c)ABCNN3	
Y
 -Y
 'Y
 __T*Y
 
Y
J 15*.-1'
,,OOC OOFNN3/0OOFLL)<c)ABCNN3	
'
 -'
 ''
 __T*'
 
'
X +/*.	
 //$'
 '	

 

@ +/)-/3%
 '%
 &	%

 t,%
 
%
T +/*.	
 //$'
 '	

 

. 48
 //%0
	
$ IM 
vu/E 
QU 
< 48
 //%0
	
* +/*.	
 //$'
 '	

 

D +/*.	
 //$'
 '	

 

, FJ 
FOOE,B 
d 
2 JN 
0F 
RV 
& *.*.	
 &
 '	

 

D *.*.	
 &
 '	

 

, GK 
V__U-C 
t 
4 KO 
1G 
SW 
& *.*.	'
 &'
 '	'

 
'
X *.*.	
 &
 '	

 

, HL 
fooe.D 
PT 
4 48
 //%0
	
* )-*.	%
 u%%
 '	%

 
%
T )-*.	
 u%
 '	

 

4 .2*.#
\\#v~~c':":;#
 __T*	#

 '#
 
#
R .2*.
ll3s 334
 __T*	

 '
 

B .2*.#
ll3s 334#
 __T*	#

 '#
 
#
R .2*.
ll3s 334
 __T*	

 '
 

h +/or
QS
r
n 'or
p 
qr
p .2*.#
||C)<$<=#
 __T*	#

 '#
 
#
R .2*.
||C)<$<=
 __T*	

 '
 

h +/oh
QS
h
n 'oh
p 
qh
V CG

)/)?
	
@ CG

)/)?
	
 
rM   r   c                   (    \ rS rSrSS jrSS jrSrg)r   i;Q  Nc                 ~   #    Sn[         R                  " U R                  R                  5       I Sh  vN 5      $  N7f)zAPIResponseAssertions.to_be_ok

Ensures the response status code is within `200..299` range.

**Usage**

```py
from playwright.async_api import expect

# ...
await expect(response).to_be_ok()
```
TN)r   rE   rF   to_be_okrI   r  s     rJ   r	  APIResponseAssertions.to_be_ok=Q  s1      !&&T^^-D-D-F'FGG'Fr  c                 ~   #    Sn[         R                  " U R                  R                  5       I Sh  vN 5      $  N7f)z[APIResponseAssertions.not_to_be_ok

The opposite of `a_pi_response_assertions.to_be_ok()`.
TN)r   rE   rF   not_to_be_okr	  s     rJ   r	  "APIResponseAssertions.not_to_be_okOQ  s1     
 !&&T^^-H-H-J'JKK'Jr  r   r   )r   r   r   r   r	  r	  r   r   rM   rJ   r   r   ;Q  s    H$LrM   r   )r  r
  r   r   playwright._impl._accessibilityr   AccessibilityImpl playwright._impl._api_structuresr   r   r   r   r	   r
   r   r   r   r   r   r   r   r   r   r   r   r   r   playwright._impl._assertionsr   APIResponseAssertionsImplr   LocatorAssertionsImplr   PageAssertionsImplplaywright._impl._async_baser   r   r   r   playwright._impl._browserr   BrowserImpl!playwright._impl._browser_contextr    BrowserContextImplplaywright._impl._browser_typer!   BrowserTypeImplplaywright._impl._cdp_sessionr"   CDPSessionImplplaywright._impl._clockr#   	ClockImpl!playwright._impl._console_messager$   ConsoleMessageImplplaywright._impl._dialogr%   
DialogImplplaywright._impl._downloadr&   DownloadImpl playwright._impl._element_handler'   ElementHandleImplplaywright._impl._errorsr(   playwright._impl._fetchr)   APIRequestImplr*   APIRequestContextImplr+   APIResponseImplplaywright._impl._file_chooserr,   FileChooserImplplaywright._impl._framer-   	FrameImplplaywright._impl._inputr.   KeyboardImplr/   	MouseImplr0   TouchscreenImplplaywright._impl._js_handler1   JSHandleImplplaywright._impl._locatorr2   FrameLocatorImplr3   LocatorImplplaywright._impl._networkr4   RequestImplr5   ResponseImplr6   	RouteImplr7   WebSocketImplr8   WebSocketRouteImplplaywright._impl._pager9   PageImplr:   
WorkerImplplaywright._impl._playwrightr;   PlaywrightImplplaywright._impl._selectorsr<   SelectorsImplplaywright._impl._tracingr=   TracingImplplaywright._impl._videor>   	VideoImplplaywright._impl._web_errorr?   WebErrorImplr  r   rM   rJ   <module>r
     s        N     * T M  = R I F 6 R 9 ? O * @ N B I 6 < 6 B @ F < < > 8 @ J 3 7 E B < 6 @gUi gUT	   g &gDy gDT   x (H
I H
V
   E "{C	 {C|   	 *y
Y y
x   #^ 4^Yy ^YB   x (R
I R
j   E "K) K(   + .VJy VJr   x (_
H _
D)   "M 2<
I <
~   "M 2G
) G
T   + .N+
I N+
bV   E "[	B9 [	B|   !< 0_
Y _
D   V $\
	 \
~   	 *iXI iXX   E "<?Y <?~   #^ 4GGY GGT   V $hFy hFV   x (#FI #FL   E "iM
 iM
X[   4  7y 76   x (]R( ]R@)   #^ 4F FB    ,T
L! T
Ln   g &T	
) T	
n   + .xD xDv    ,cIi cIL   g &~)Ii ~)IBT   g &wG) wGt   + .`

	 `

F   &(9 :]
 ]
@    ,@
Y @
F   #^ 4A
	 A
H:   &(9 :LI L<   *,A BrM   