Skip to content

Commit ff51652

Browse files
authored
Sort k6/browser module in JavaScript API section (#1662)
1 parent 886c054 commit ff51652

File tree

2 files changed

+30
-30
lines changed
  • docs/sources

2 files changed

+30
-30
lines changed

docs/sources/next/javascript-api/k6-browser/_index.md

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
---
22
title: 'k6/browser'
33
description: 'An overview of the browser-level APIs from browser module.'
4-
weight: 01
4+
weight: 02
55
---
66

77
# browser
@@ -34,14 +34,14 @@ The browser module is the entry point for all your tests, and it is what interac
3434
- [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;
3535
- and [Page](https://grafana.com/docs/k6/<K6_VERSION>/javascript-api/k6-browser/page) which is where your rendered site is displayed.
3636

37-
| Method | Description |
38-
| -------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
39-
| [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). |
37+
| Method | Description |
38+
| ------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
39+
| [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). |
4343
| [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. |
44+
| [browser.version()](https://grafana.com/docs/k6/<K6_VERSION>/javascript-api/k6-browser/version) | Returns the browser application's version. |
4545

4646
### Example
4747

@@ -113,20 +113,20 @@ PS C:\k6> k6 run script.js
113113

114114
## Browser-level APIs
115115

116-
| k6 Class | Description |
117-
| ----------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
116+
| k6 Class | Description |
117+
| ---------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------- |
118118
| [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. |
119+
| [ElementHandle](https://grafana.com/docs/k6/<K6_VERSION>/javascript-api/k6-browser/elementhandle) {{< docs/bwipt >}} | Represents an in-page DOM element. |
120120
| [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. |
121+
| [JSHandle](https://grafana.com/docs/k6/<K6_VERSION>/javascript-api/k6-browser/jshandle) | Represents an in-page JavaScript object. |
122122
| [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. |
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. |
124124
| [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. |
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. |
126126
| [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. |
127127
| [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). |
128128
| [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). |
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). |
130130

131131
## Browser Module Options
132132

0 commit comments

Comments
 (0)