diff --git a/src/data/markdown/docs/02 javascript api/07 k6-experimental/01 browser.md b/src/data/markdown/docs/02 javascript api/07 k6-experimental/01 browser.md index 72f3f3f6f..bf0de47fe 100644 --- a/src/data/markdown/docs/02 javascript api/07 k6-experimental/01 browser.md +++ b/src/data/markdown/docs/02 javascript api/07 k6-experimental/01 browser.md @@ -59,9 +59,6 @@ export const options = { }, }, }, - thresholds: { - checks: ["rate==1.0"] - } } export default async function () { @@ -242,9 +239,6 @@ export const options = { }, }, }, - thresholds: { - checks: ["rate==1.0"] - } } export default async function () { diff --git a/src/data/markdown/docs/02 javascript api/07 k6-experimental/01 browser/01 Browser module.md b/src/data/markdown/docs/02 javascript api/07 k6-experimental/01 browser/01 Browser module.md deleted file mode 100644 index 6fc46cd9a..000000000 --- a/src/data/markdown/docs/02 javascript api/07 k6-experimental/01 browser/01 Browser module.md +++ /dev/null @@ -1,53 +0,0 @@ -****--- -title: "Browser module" -excerpt: "Browser module" ---- - -The `Browser` module is the entry point for all your tests, and it is what interacts with the actual web browser via [Chrome DevTools Protocol](https://chromedevtools.github.io/devtools-protocol/) (CDP). It manages: -- [BrowserContext](/javascript-api/k6-experimental/browser/browsercontext/) which is where you can set a variety of attributes to control the behavior of pages; -- and [Page](/javascript-api/k6-experimental/browser/page/) which is where your rendered site is displayed. - -A new browser process is automatically created when you use the `newContext` method of the `browser` module (`'k6/experimental/browser'`). - -| Method | Description | -|-------------------------------------------------------------------------------------------|-------------------------------------------------------------------------------------------------------------------------------------------------------| -| [browser.contexts()](/javascript-api/k6-experimental/browser/browser-module/contexts) | Lets you access all open [BrowserContext](/javascript-api/k6-experimental/browser/browsercontext/)s. | -| [browser.isConnected](/javascript-api/k6-experimental/browser/browser-module/isconnected) | Indicates whether the [CDP](https://chromedevtools.github.io/devtools-protocol/) connection to the browser process is active or not. | -| [browser.newContext([options])](/javascript-api/k6-experimental/browser/browser-module/newcontext/) | Creates and returns a new [BrowserContext](/javascript-api/k6-experimental/browser/browsercontext/). | -| [browser.newPage([options])](/javascript-api/k6-experimental/browser/browser-module/newpage) | Creates a new [Page](/javascript-api/k6-experimental/browser/page/) in a new [BrowserContext](/javascript-api/k6-experimental/browser/browsercontext/) and returns the page. | -| [browser.version()](/javascript-api/k6-experimental/browser/browser-module/version/) | Returns the browser application's version. | - -### Example - - - -```javascript -import { browser } from 'k6/experimental/browser'; - -export const options = { - scenarios: { - browser: { - executor: 'shared-iterations', - options: { - browser: { - type: 'chromium', - }, - }, - }, - }, - thresholds: { - checks: ["rate==1.0"] - } -} - -export default async function () { - const page = browser.newPage(); - try { - await page.goto('https://test.k6.io/'); - } finally { - page.close(); - } -} -``` - - diff --git a/src/data/markdown/translated-guides/en/03 Using k6 browser/01 Overview.md b/src/data/markdown/translated-guides/en/03 Using k6 browser/01 Overview.md index da3a71f7b..cf3ee4345 100644 --- a/src/data/markdown/translated-guides/en/03 Using k6 browser/01 Overview.md +++ b/src/data/markdown/translated-guides/en/03 Using k6 browser/01 Overview.md @@ -51,8 +51,7 @@ export const options = { } export default async function () { - const context = browser.newContext(); - const page = context.newPage(); + const page = browser.newPage(); try { await page.goto('https://test.k6.io/my_messages.php'); diff --git a/src/data/markdown/translated-guides/en/03 Using k6 browser/02 Running browser tests.md b/src/data/markdown/translated-guides/en/03 Using k6 browser/02 Running browser tests.md index 6dd3100cb..60b9328f9 100644 --- a/src/data/markdown/translated-guides/en/03 Using k6 browser/02 Running browser tests.md +++ b/src/data/markdown/translated-guides/en/03 Using k6 browser/02 Running browser tests.md @@ -40,9 +40,6 @@ Note that providing an `executor` and setting the `browser` scenario option's `t }, }, }, - thresholds: { - checks: ["rate==1.0"] - } } export default async function () { @@ -169,9 +166,6 @@ export const options = { }, }, }, - thresholds: { - checks: ["rate==1.0"] - } } export default async function () {