class Playwright::Page
def goto(url, referer: nil, timeout: nil, waitUntil: nil)
**NOTE**: Headless mode doesn't support navigation to a PDF document. See the
`about:blank` or navigation to the same URL with a different hash, which would succeed and return `null`.
**NOTE**: The method either throws an error or returns a main resource response. The only exceptions are navigation to
[`method: Response.status`].
Found" and 500 "Internal Server Error". The status code for such responses can be retrieved by calling
The method will not throw an error when any valid HTTP status code is returned by the remote server, including 404 "Not
- the main resource failed to load.
- the remote server does not respond or is unreachable.
- the `timeout` is exceeded during navigation.
- target URL is invalid.
- there's an SSL error (e.g. in case of self-signed certificates).
The method will throw an error if:
non-redirect response.
Returns the main resource response. In case of multiple redirects, the navigation will resolve with the first
def goto(url, referer: nil, timeout: nil, waitUntil: nil) wrap_impl(@impl.goto(unwrap_impl(url), referer: unwrap_impl(referer), timeout: unwrap_impl(timeout), waitUntil: unwrap_impl(waitUntil))) end