Skip to content

Commit 1f06256

Browse files
committed
Remove {{ code }} since all examples are in one..
... language.
1 parent 0a716c9 commit 1f06256

File tree

4 files changed

+0
-44
lines changed

4 files changed

+0
-44
lines changed

docs/sources/k6/next/javascript-api/k6-browser/frame/waitfornavigation.md

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -44,8 +44,6 @@ Events can be either:
4444

4545
### Examples
4646

47-
{{< code >}}
48-
4947
<!-- md-k6:skip -->
5048

5149
```javascript
@@ -94,5 +92,3 @@ export default async function () {
9492
}
9593
}
9694
```
97-
98-
{{< /code >}}

docs/sources/k6/next/javascript-api/k6-browser/frame/waitforurl.md

Lines changed: 0 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -40,8 +40,6 @@ Events can be either:
4040

4141
### Examples
4242

43-
{{< code >}}
44-
4543
<!-- md-k6:skip -->
4644

4745
```javascript
@@ -90,14 +88,10 @@ export default async function () {
9088
}
9189
```
9290

93-
{{< /code >}}
94-
9591
### Valid usage patterns for waitForURL
9692

9793
Use one of the following patterns to coordinate the action that triggers navigation with waiting for the final URL.
9894

99-
{{< code >}}
100-
10195
<!-- eslint-skip -->
10296

10397
```js
@@ -107,12 +101,8 @@ await Promise.all([
107101
]);
108102
```
109103

110-
{{< /code >}}
111-
112104
or
113105

114-
{{< code >}}
115-
116106
<!-- eslint-skip -->
117107

118108
```js
@@ -121,21 +111,15 @@ await frame.locator('a[href="/my_messages.php"]').click();
121111
await navPromise;
122112
```
123113

124-
{{< /code >}}
125-
126114
Unlike [waitForNavigation](https://grafana.com/docs/k6/<K6_VERSION>/javascript-api/k6-browser/page/waitfornavigation), `waitForURL` will first check whether it is already on the page with the given URL before proceeding to wait. If it is already there and the `waitUntil` condition has also been met, it will return straight away. This means that it is safe to do this:
127115

128-
{{< code >}}
129-
130116
<!-- eslint-skip -->
131117

132118
```js
133119
await frame.locator('a[href="/my_messages.php"]').click();
134120
await frame.waitForURL('https://quickpizza.grafana.com/my_messages.php');
135121
```
136122

137-
{{< /code >}}
138-
139123
### Best practices
140124

141125
1. **Verify frame existence**: Frames can be created, destroyed, or replaced during page navigation. Always verify frame existence before calling `waitForURL()`.

docs/sources/k6/next/javascript-api/k6-browser/page/waitfornavigation.md

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -46,8 +46,6 @@ Events can be either:
4646

4747
#### Basic navigation waiting
4848

49-
{{< code >}}
50-
5149
```javascript
5250
import { browser } from 'k6/browser';
5351
import { check } from 'https://jslib.k6.io/k6-utils/1.5.0/index.js';
@@ -87,12 +85,8 @@ export default async function () {
8785
}
8886
```
8987

90-
{{< /code >}}
91-
9288
#### Wait for navigation to specific URL
9389

94-
{{< code >}}
95-
9690
<!-- md-k6:skip -->
9791

9892
```javascript
@@ -135,5 +129,3 @@ export default async function () {
135129
}
136130
}
137131
```
138-
139-
{{< /code >}}

docs/sources/k6/next/javascript-api/k6-browser/page/waitforurl.md

Lines changed: 0 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -40,8 +40,6 @@ Events can be either:
4040

4141
### Examples
4242

43-
{{< code >}}
44-
4543
<!-- md-k6:skip -->
4644

4745
```javascript
@@ -82,14 +80,10 @@ export default async function () {
8280
}
8381
```
8482

85-
{{< /code >}}
86-
8783
### Valid usage patterns for waitForURL
8884

8985
Use one of the following patterns to coordinate the action that triggers navigation with waiting for the final URL.
9086

91-
{{< code >}}
92-
9387
<!-- eslint-skip -->
9488

9589
```js
@@ -99,12 +93,8 @@ await Promise.all([
9993
]);
10094
```
10195

102-
{{< /code >}}
103-
10496
or
10597

106-
{{< code >}}
107-
10898
<!-- eslint-skip -->
10999

110100
```js
@@ -113,21 +103,15 @@ await page.locator('a[href="/my_messages.php"]').click();
113103
await navPromise;
114104
```
115105

116-
{{< /code >}}
117-
118106
Unlike [waitForNavigation](https://grafana.com/docs/k6/<K6_VERSION>/javascript-api/k6-browser/page/waitfornavigation), `waitForURL` will first check whether it is already on the page with the given URL before proceeding to wait. If it is already there and the `waitUntil` condition has also been met, it will return straight away. This means that it is safe to do this:
119107

120-
{{< code >}}
121-
122108
<!-- eslint-skip -->
123109

124110
```js
125111
await page.locator('a[href="/my_messages.php"]').click();
126112
await page.waitForURL('https://quickpizza.grafana.com/my_messages.php');
127113
```
128114

129-
{{< /code >}}
130-
131115
### Best practices
132116

133117
1. **Use appropriate matching**: Choose the right matching method based on your needs:

0 commit comments

Comments
 (0)