docs: use language-neutral references to page.goto (#8320)
This commit is contained in:
parent
cd41c34299
commit
851fe8d0bd
|
|
@ -777,19 +777,19 @@ Attribute name to get the value for.
|
||||||
Returns the main resource response. In case of multiple redirects, the navigation will resolve with the response of the
|
Returns the main resource response. In case of multiple redirects, the navigation will resolve with the response of the
|
||||||
last redirect.
|
last redirect.
|
||||||
|
|
||||||
`frame.goto` will throw an error if:
|
The method will throw an error if:
|
||||||
* there's an SSL error (e.g. in case of self-signed certificates).
|
* there's an SSL error (e.g. in case of self-signed certificates).
|
||||||
* target URL is invalid.
|
* target URL is invalid.
|
||||||
* the [`option: timeout`] is exceeded during navigation.
|
* the [`option: timeout`] is exceeded during navigation.
|
||||||
* the remote server does not respond or is unreachable.
|
* the remote server does not respond or is unreachable.
|
||||||
* the main resource failed to load.
|
* the main resource failed to load.
|
||||||
|
|
||||||
`frame.goto` will not throw an error when any valid HTTP status code is returned by the remote server, including 404
|
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
|
"Not Found" and 500 "Internal Server Error". The status code for such responses can be retrieved by calling
|
||||||
[`method: Response.status`].
|
[`method: Response.status`].
|
||||||
|
|
||||||
:::note
|
:::note
|
||||||
`frame.goto` either throws an error or returns a main resource response. The only exceptions are navigation to
|
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`.
|
`about:blank` or navigation to the same URL with a different hash, which would succeed and return `null`.
|
||||||
:::
|
:::
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1877,19 +1877,19 @@ Navigate to the next page in history.
|
||||||
Returns the main resource response. In case of multiple redirects, the navigation will resolve with the response of the
|
Returns the main resource response. In case of multiple redirects, the navigation will resolve with the response of the
|
||||||
last redirect.
|
last redirect.
|
||||||
|
|
||||||
`page.goto` will throw an error if:
|
The method will throw an error if:
|
||||||
* there's an SSL error (e.g. in case of self-signed certificates).
|
* there's an SSL error (e.g. in case of self-signed certificates).
|
||||||
* target URL is invalid.
|
* target URL is invalid.
|
||||||
* the [`option: timeout`] is exceeded during navigation.
|
* the [`option: timeout`] is exceeded during navigation.
|
||||||
* the remote server does not respond or is unreachable.
|
* the remote server does not respond or is unreachable.
|
||||||
* the main resource failed to load.
|
* the main resource failed to load.
|
||||||
|
|
||||||
`page.goto` will not throw an error when any valid HTTP status code is returned by the remote server, including 404 "Not
|
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
|
Found" and 500 "Internal Server Error". The status code for such responses can be retrieved by calling
|
||||||
[`method: Response.status`].
|
[`method: Response.status`].
|
||||||
|
|
||||||
:::note
|
:::note
|
||||||
`page.goto` either throws an error or returns a main resource response. The only exceptions are navigation to
|
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`.
|
`about:blank` or navigation to the same URL with a different hash, which would succeed and return `null`.
|
||||||
:::
|
:::
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -34,7 +34,7 @@ Navigations can be initiated by changing the URL bar, reloading the page or goin
|
||||||
### Auto-wait
|
### Auto-wait
|
||||||
|
|
||||||
Navigating to a URL auto-waits for the page to fire the `load` event. If the page does a client-side redirect before
|
Navigating to a URL auto-waits for the page to fire the `load` event. If the page does a client-side redirect before
|
||||||
`load`, `page.goto` will auto-wait for the redirected page to fire the `load` event.
|
`load`, [`method: Page.goto`] will auto-wait for the redirected page to fire the `load` event.
|
||||||
|
|
||||||
```js
|
```js
|
||||||
// Navigate the page
|
// Navigate the page
|
||||||
|
|
|
||||||
14
types/types.d.ts
vendored
14
types/types.d.ts
vendored
|
|
@ -1760,18 +1760,18 @@ export interface Page {
|
||||||
* Returns the main resource response. In case of multiple redirects, the navigation will resolve with the response of the
|
* Returns the main resource response. In case of multiple redirects, the navigation will resolve with the response of the
|
||||||
* last redirect.
|
* last redirect.
|
||||||
*
|
*
|
||||||
* `page.goto` will throw an error if:
|
* The method will throw an error if:
|
||||||
* - there's an SSL error (e.g. in case of self-signed certificates).
|
* - there's an SSL error (e.g. in case of self-signed certificates).
|
||||||
* - target URL is invalid.
|
* - target URL is invalid.
|
||||||
* - the `timeout` is exceeded during navigation.
|
* - the `timeout` is exceeded during navigation.
|
||||||
* - the remote server does not respond or is unreachable.
|
* - the remote server does not respond or is unreachable.
|
||||||
* - the main resource failed to load.
|
* - the main resource failed to load.
|
||||||
*
|
*
|
||||||
* `page.goto` will not throw an error when any valid HTTP status code is returned by the remote server, including 404 "Not
|
* 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
|
* Found" and 500 "Internal Server Error". The status code for such responses can be retrieved by calling
|
||||||
* [response.status()](https://playwright.dev/docs/api/class-response#response-status).
|
* [response.status()](https://playwright.dev/docs/api/class-response#response-status).
|
||||||
*
|
*
|
||||||
* > NOTE: `page.goto` either throws an error or returns a main resource response. The only exceptions are navigation to
|
* > 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`.
|
* `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
|
* > 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).
|
* [upstream issue](https://bugs.chromium.org/p/chromium/issues/detail?id=761295).
|
||||||
|
|
@ -4034,18 +4034,18 @@ export interface Frame {
|
||||||
* Returns the main resource response. In case of multiple redirects, the navigation will resolve with the response of the
|
* Returns the main resource response. In case of multiple redirects, the navigation will resolve with the response of the
|
||||||
* last redirect.
|
* last redirect.
|
||||||
*
|
*
|
||||||
* `frame.goto` will throw an error if:
|
* The method will throw an error if:
|
||||||
* - there's an SSL error (e.g. in case of self-signed certificates).
|
* - there's an SSL error (e.g. in case of self-signed certificates).
|
||||||
* - target URL is invalid.
|
* - target URL is invalid.
|
||||||
* - the `timeout` is exceeded during navigation.
|
* - the `timeout` is exceeded during navigation.
|
||||||
* - the remote server does not respond or is unreachable.
|
* - the remote server does not respond or is unreachable.
|
||||||
* - the main resource failed to load.
|
* - the main resource failed to load.
|
||||||
*
|
*
|
||||||
* `frame.goto` will not throw an error when any valid HTTP status code is returned by the remote server, including 404
|
* The method will not throw an error when any valid HTTP status code is returned by the remote server, including 404 "Not
|
||||||
* "Not Found" and 500 "Internal Server Error". The status code for such responses can be retrieved by calling
|
* Found" and 500 "Internal Server Error". The status code for such responses can be retrieved by calling
|
||||||
* [response.status()](https://playwright.dev/docs/api/class-response#response-status).
|
* [response.status()](https://playwright.dev/docs/api/class-response#response-status).
|
||||||
*
|
*
|
||||||
* > NOTE: `frame.goto` either throws an error or returns a main resource response. The only exceptions are navigation to
|
* > 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`.
|
* `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
|
* > 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).
|
* [upstream issue](https://bugs.chromium.org/p/chromium/issues/detail?id=761295).
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue