You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/sources/next/javascript-api/error-codes.md
+1-29Lines changed: 1 addition & 29 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -22,32 +22,4 @@ Error codes for different errors are as distinct as possible, but for easier han
22
22
23
23
The following specific error codes are currently defined:
24
24
25
-
- 1000: A generic error that isn't any of the ones listed below.
26
-
- 1010: A non-TCP network error - this is a place holder there is no error currently known to trigger it.
27
-
- 1020: An invalid URL was specified.
28
-
- 1050: The HTTP request has timed out.
29
-
- 1100: A generic DNS error that isn't any of the ones listed below.
30
-
- 1101: No IP for the provided host was found.
31
-
- 1110: Blacklisted IP was resolved or a connection to such was tried to be established.
32
-
- 1111: Blacklisted hostname using The [Block Hostnames](https://grafana.com/docs/k6/<K6_VERSION>/using-k6/k6-options/reference#block-hostnames) option.
33
-
- 1200: A generic TCP error that isn't any of the ones listed below.
34
-
- 1201: A "broken pipe" on write - the other side has likely closed the connection.
35
-
- 1202: An unknown TCP error - We got an error that we don't recognize but it is from the operating system and has `errno` set on it. The message in `error` includes the operation(write,read) and the errno, the OS, and the original message of the error.
36
-
- 1210: General TCP dial error.
37
-
- 1211: Dial timeout error - the timeout for the dial was reached.
38
-
- 1212: Dial connection refused - the connection was refused by the other party on dial.
39
-
- 1213: Dial unknown error.
40
-
- 1220: Reset by peer - the connection was reset by the other party, most likely a server.
41
-
- 1300: General TLS error
42
-
- 1310: Unknown authority - the certificate issuer is unknown.
43
-
- 1311: The certificate doesn't match the hostname.
44
-
- 1400 to 1499: error codes that correspond to the [HTTP 4xx status codes for client errors](https://en.wikipedia.org/wiki/List_of_HTTP_status_codes#4xx_Client_errors)
45
-
- 1500 to 1599: error codes that correspond to the [HTTP 5xx status codes for server errors](https://en.wikipedia.org/wiki/List_of_HTTP_status_codes#5xx_Server_errors)
46
-
- 1600: A generic HTTP/2 error that isn't any of the ones listed below.
47
-
- 1610: A general HTTP/2 GoAway error.
48
-
- 1611 to 1629: HTTP/2 GoAway errors with the value of the specific [HTTP/2 error code](https://tools.ietf.org/html/rfc7540#section-7) added to 1611.
49
-
- 1630: A general HTTP/2 stream error.
50
-
- 1631 to 1649: HTTP/2 stream errors with the value of the specific [HTTP/2 error code](https://tools.ietf.org/html/rfc7540#section-7) added to 1631.
51
-
- 1650: A general HTTP/2 connection error.
52
-
- 1651 to 1669: HTTP/2 connection errors with the value of the specific [HTTP/2 error code](https://tools.ietf.org/html/rfc7540#section-7) added to 1651.
|[open( filePath, [mode] )](https://grafana.com/docs/k6/<K6_VERSION>/javascript-api/init-context/open)| Opens a file and reads all the contents into memory. |
Copy file name to clipboardExpand all lines: docs/sources/next/javascript-api/jslib/_index.md
+1-10Lines changed: 1 addition & 10 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -6,13 +6,4 @@ weight: 15
6
6
7
7
# jslib
8
8
9
-
The [jslib.k6.io](https://jslib.k6.io/) is a collection of external JavaScript libraries that can be [directly imported](https://grafana.com/docs/k6/<K6_VERSION>/using-k6/modules#remote-http-s-modules) in k6 scripts.
|[aws](https://grafana.com/docs/k6/<K6_VERSION>/javascript-api/jslib/aws)| Library allowing to interact with Amazon AWS services |
14
-
|[httpx](https://grafana.com/docs/k6/<K6_VERSION>/javascript-api/jslib/httpx)| Wrapper around [k6/http](https://grafana.com/docs/k6/<K6_VERSION>/javascript-api/#k6http) to simplify session handling |
|[utils](https://grafana.com/docs/k6/<K6_VERSION>/javascript-api/jslib/utils)| Small utility functions useful in every day load testing |
17
-
|[http-instrumentation-pyroscope](https://grafana.com/docs/k6/<K6_VERSION>/javascript-api/jslib/http-instrumentation-pyroscope)| Library to instrument k6/http to send baggage headers for pyroscope to read back |
18
-
|[http-instrumentation-tempo](https://grafana.com/docs/k6/<K6_VERSION>/javascript-api/jslib/http-instrumentation-tempo)| Library to instrument k6/http to send tracing data |
Copy file name to clipboardExpand all lines: docs/sources/next/javascript-api/k6-browser/_index.md
+2-22Lines changed: 2 additions & 22 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -34,14 +34,7 @@ The browser module is the entry point for all your tests, and it is what interac
34
34
-[BrowserContext](https://grafana.com/docs/k6/<K6_VERSION>/javascript-api/k6-browser/browsercontext) which is where you can set a variety of attributes to control the behavior of pages;
35
35
- and [Page](https://grafana.com/docs/k6/<K6_VERSION>/javascript-api/k6-browser/page) which is where your rendered site is displayed.
|[browser.context()](https://grafana.com/docs/k6/<K6_VERSION>/javascript-api/k6-browser/context)| Returns the current [BrowserContext](https://grafana.com/docs/k6/<K6_VERSION>/javascript-api/k6-browser/browsercontext). |
40
-
|[browser.closeContext()](https://grafana.com/docs/k6/<K6_VERSION>/javascript-api/k6-browser/closecontext)| Closes the current [BrowserContext](https://grafana.com/docs/k6/<K6_VERSION>/javascript-api/k6-browser/browsercontext). |
41
-
|[browser.isConnected](https://grafana.com/docs/k6/<K6_VERSION>/javascript-api/k6-browser/isconnected) {{< docs/bwipt id="453" >}} | Indicates whether the [CDP](https://chromedevtools.github.io/devtools-protocol/) connection to the browser process is active or not. |
42
-
|[browser.newContext([options])](https://grafana.com/docs/k6/<K6_VERSION>/javascript-api/k6-browser/newcontext/) {{< docs/bwipt id="455" >}} | Creates and returns a new [BrowserContext](https://grafana.com/docs/k6/<K6_VERSION>/javascript-api/k6-browser/browsercontext). |
43
-
|[browser.newPage([options])](https://grafana.com/docs/k6/<K6_VERSION>/javascript-api/k6-browser/newpage) {{< docs/bwipt id="455" >}} | Creates a new [Page](https://grafana.com/docs/k6/<K6_VERSION>/javascript-api/k6-browser/page) in a new [BrowserContext](https://grafana.com/docs/k6/<K6_VERSION>/javascript-api/k6-browser/browsercontext) and returns the page. Pages that have been opened ought to be closed using [`Page.close`](https://grafana.com/docs/k6/<K6_VERSION>/javascript-api/k6-browser/page/close). Pages left open could potentially distort the results of Web Vital metrics. |
44
-
|[browser.version()](https://grafana.com/docs/k6/<K6_VERSION>/javascript-api/k6-browser/version)| Returns the browser application's version. |
|[BrowserContext](https://grafana.com/docs/k6/<K6_VERSION>/javascript-api/k6-browser/browsercontext) {{< docs/bwipt >}} | Enables independent browser sessions with separate [Page](https://grafana.com/docs/k6/<K6_VERSION>/javascript-api/k6-browser/page)s, cache, and cookies. |
119
-
|[ElementHandle](https://grafana.com/docs/k6/<K6_VERSION>/javascript-api/k6-browser/elementhandle) {{< docs/bwipt >}} | Represents an in-page DOM element. |
120
-
|[Frame](https://grafana.com/docs/k6/<K6_VERSION>/javascript-api/k6-browser/frame) {{< docs/bwipt >}} | Access and interact with the [`Page`](https://grafana.com/docs/k6/<K6_VERSION>/javascript-api/k6-browser/page).'s `Frame`s. |
121
-
|[JSHandle](https://grafana.com/docs/k6/<K6_VERSION>/javascript-api/k6-browser/jshandle)| Represents an in-page JavaScript object. |
122
-
|[Keyboard](https://grafana.com/docs/k6/<K6_VERSION>/javascript-api/k6-browser/keyboard)| Used to simulate the keyboard interactions with the associated [`Page`](https://grafana.com/docs/k6/<K6_VERSION>/javascript-api/k6-browser/page). |
123
-
|[Locator](https://grafana.com/docs/k6/<K6_VERSION>/javascript-api/k6-browser/locator)| The Locator API makes it easier to work with dynamically changing elements. |
124
-
|[Mouse](https://grafana.com/docs/k6/<K6_VERSION>/javascript-api/k6-browser/mouse)| Used to simulate the mouse interactions with the associated [`Page`](https://grafana.com/docs/k6/<K6_VERSION>/javascript-api/k6-browser/page). |
125
-
|[Page](https://grafana.com/docs/k6/<K6_VERSION>/javascript-api/k6-browser/page) {{< docs/bwipt >}} | Provides methods to interact with a single tab in a browser. |
126
-
|[Request](https://grafana.com/docs/k6/<K6_VERSION>/javascript-api/k6-browser/request) {{< docs/bwipt >}} | Used to keep track of the request the [`Page`](https://grafana.com/docs/k6/<K6_VERSION>/javascript-api/k6-browser/page) makes. |
127
-
|[Response](https://grafana.com/docs/k6/<K6_VERSION>/javascript-api/k6-browser/response) {{< docs/bwipt >}} | Represents the response received by the [`Page`](https://grafana.com/docs/k6/<K6_VERSION>/javascript-api/k6-browser/page). |
128
-
|[Touchscreen](https://grafana.com/docs/k6/<K6_VERSION>/javascript-api/k6-browser/touchscreen)| Used to simulate touch interactions with the associated [`Page`](https://grafana.com/docs/k6/<K6_VERSION>/javascript-api/k6-browser/page). |
129
-
|[Worker](https://grafana.com/docs/k6/<K6_VERSION>/javascript-api/k6-browser/worker)| Represents a [WebWorker](https://developer.mozilla.org/en-US/docs/Web/API/Web_Workers_API). |
Copy file name to clipboardExpand all lines: docs/sources/next/javascript-api/k6-browser/closecontext.md
+4-2Lines changed: 4 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -3,12 +3,14 @@ title: 'closeContext()'
3
3
description: 'Browser module: close context method'
4
4
---
5
5
6
+
# closeContext()
7
+
6
8
Closes the current [BrowserContext](https://grafana.com/docs/k6/<K6_VERSION>/javascript-api/k6-browser/browsercontext). If there is no active browser context, because none has been created yet or because it has been previously closed, this method throws an error.
|`Promise<void>`| A Promise that fulfills when the [`BrowserContext`](https://grafana.com/docs/k6/<K6_VERSION>/javascript-api/k6-browser/browsercontext) is closed. |
0 commit comments