Skip to content

Commit 78fe77b

Browse files
committed
Remove {{< code >}} since we're only working...
...with one language (js or html in a single given example).
1 parent 7edf609 commit 78fe77b

File tree

7 files changed

+0
-69
lines changed

7 files changed

+0
-69
lines changed

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

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -29,8 +29,6 @@ Returns a locator for elements with the specified alt text. This method is usefu
2929

3030
Find and click an image by its alt text:
3131

32-
{{< code >}}
33-
3432
<!-- md-k6:skip -->
3533

3634
```javascript
@@ -66,14 +64,10 @@ export default async function () {
6664
}
6765
```
6866

69-
{{< /code >}}
70-
7167
#### Exact alt text matching
7268

7369
Use exact matching for precise alt text:
7470

75-
{{< code >}}
76-
7771
<!-- md-k6:skip -->
7872

7973
```javascript
@@ -109,14 +103,10 @@ export default async function () {
109103
}
110104
```
111105

112-
{{< /code >}}
113-
114106
#### Using regular expressions
115107

116108
Find images using pattern matching:
117109

118-
{{< code >}}
119-
120110
<!-- md-k6:skip -->
121111

122112
```javascript
@@ -152,8 +142,6 @@ export default async function () {
152142
}
153143
```
154144

155-
{{< /code >}}
156-
157145
### Common use cases
158146

159147
**Image testing:**

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

Lines changed: 0 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -29,8 +29,6 @@ Returns a locator for form controls associated with the specified label text. Th
2929

3030
Fill form fields using their labels:
3131

32-
{{< code >}}
33-
3432
<!-- md-k6:skip -->
3533

3634
```javascript
@@ -71,14 +69,10 @@ export default async function () {
7169
}
7270
```
7371

74-
{{< /code >}}
75-
7672
#### Working with different input types
7773

7874
Handle various form control types in various label association patterns:
7975

80-
{{< code >}}
81-
8276
<!-- md-k6:skip -->
8377

8478
```javascript
@@ -142,48 +136,34 @@ export default async function () {
142136
}
143137
```
144138

145-
{{< /code >}}
146-
147139
### Label association patterns
148140

149141
The `getByLabel()` method works with several HTML patterns for associating labels with form controls:
150142

151143
**1. Explicit association with `for` attribute:**
152144

153-
{{< code >}}
154-
155145
<!-- eslint-skip -->
156146

157147
```html
158148
<label for="username">Username</label> <input type="text" id="username" name="username" />
159149
```
160150

161-
{{< /code >}}
162-
163151
**2. ARIA labeling:**
164152

165-
{{< code >}}
166-
167153
<!-- eslint-skip -->
168154

169155
```html
170156
<span id="username-label">Username</span> <input type="text" aria-labelledby="username-label" />
171157
```
172158

173-
{{< /code >}}
174-
175159
**3. ARIA label attribute:**
176160

177-
{{< code >}}
178-
179161
<!-- eslint-skip -->
180162

181163
```html
182164
<input type="text" aria-label="Username" />
183165
```
184166

185-
{{< /code >}}
186-
187167
### Common use cases
188168

189169
- **Form testing**: Login forms, registration forms, contact forms

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

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -27,8 +27,6 @@ Returns a locator for input elements with the specified `placeholder` attribute.
2727

2828
Find and fill inputs by their placeholder text:
2929

30-
{{< code >}}
31-
3230
<!-- md-k6:skip -->
3331

3432
```javascript
@@ -71,8 +69,6 @@ export default async function () {
7169
}
7270
```
7371

74-
{{< /code >}}
75-
7672
### Common use cases
7773

7874
**Form field identification:**

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

Lines changed: 0 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -37,8 +37,6 @@ Returns a locator for elements with the specified ARIA role. This is the preferr
3737

3838
Find and click a button by its role:
3939

40-
{{< code >}}
41-
4240
<!-- md-k6:skip -->
4341

4442
```javascript
@@ -70,8 +68,6 @@ export default async function () {
7068
}
7169
```
7270

73-
{{< /code >}}
74-
7571
### Complete ARIA roles reference
7672

7773
The following roles are supported and can be used with `getByRole()`, organized by category:
@@ -168,7 +164,6 @@ The following roles are supported and can be used with `getByRole()`, organized
168164
#### Usage Examples by Category
169165

170166
**Form Testing:**
171-
{{< code >}}
172167

173168
<!-- md-k6:skip -->
174169
<!-- eslint-skip -->
@@ -188,10 +183,7 @@ await page.getByRole('slider', { name: 'Volume' }).fill('75');
188183
await page.getByRole('switch', { name: 'Enable notifications' }).click();
189184
```
190185

191-
{{< /code >}}
192-
193186
**Navigation Testing:**
194-
{{< code >}}
195187

196188
<!-- md-k6:skip -->
197189
<!-- eslint-skip -->
@@ -202,10 +194,7 @@ await page.getByRole('tab', { name: 'Overview' }).click();
202194
await expect(page.getByRole('tabpanel', { name: 'Overview' })).toBeVisible();
203195
```
204196

205-
{{< /code >}}
206-
207197
**Content Verification:**
208-
{{< code >}}
209198

210199
<!-- md-k6:skip -->
211200
<!-- eslint-skip -->
@@ -220,8 +209,6 @@ await expect(page.getByRole('alert')).toHaveText('Form submitted successfully');
220209
await expect(page.getByRole('status')).toHaveText('3 items selected');
221210
```
222211

223-
{{< /code >}}
224-
225212
### Best practices
226213

227214
1. **Prefer role-based selection**: `getByRole()` is the preferred method for locating elements as it closely mirrors how users and assistive technology interact with your page.

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

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -27,8 +27,6 @@ Returns a locator for elements with the specified test ID attribute. This method
2727

2828
Locate and interact with elements using test IDs:
2929

30-
{{< code >}}
31-
3230
<!-- md-k6:skip -->
3331

3432
```javascript
@@ -66,8 +64,6 @@ export default async function () {
6664
}
6765
```
6866

69-
{{< /code >}}
70-
7167
### Best practices
7268

7369
1. **Stable identifiers**: Use meaningful, stable test IDs that won't change with refactoring or content updates.

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

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -27,8 +27,6 @@ Returns a locator for elements containing the specified text. This method finds
2727

2828
Find and click elements by their visible text:
2929

30-
{{< code >}}
31-
3230
<!-- md-k6:skip -->
3331

3432
```javascript
@@ -63,8 +61,6 @@ export default async function () {
6361
}
6462
```
6563

66-
{{< /code >}}
67-
6864
### Text matching behavior
6965

7066
**Whitespace normalization**: Text matching automatically normalizes whitespace, meaning:
@@ -75,8 +71,6 @@ export default async function () {
7571

7672
Consider the following DOM structure:
7773

78-
{{< code >}}
79-
8074
<!-- md-k6:skip -->
8175
<!-- eslint-skip -->
8276

@@ -85,12 +79,8 @@ Consider the following DOM structure:
8579
<div>Hello</div>
8680
```
8781

88-
{{< /code >}}
89-
9082
You can locate by text substring, exact string, or a regular expression:
9183

92-
{{< code >}}
93-
9484
<!-- md-k6:skip -->
9585
<!-- eslint-skip -->
9686

@@ -107,8 +97,6 @@ page.getByText(/Hello/);
10797
page.getByText(/^hello$/i);
10898
```
10999

110-
{{< /code >}}
111-
112100
### Common use cases
113101

114102
- **Button interactions**: Submit, Cancel, Delete, Edit buttons

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

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -27,8 +27,6 @@ Returns a locator for elements with the specified `title` attribute. This method
2727

2828
Find and interact with elements by their title attribute:
2929

30-
{{< code >}}
31-
3230
<!-- md-k6:skip -->
3331

3432
```javascript
@@ -73,8 +71,6 @@ export default async function () {
7371
}
7472
```
7573

76-
{{< /code >}}
77-
7874
### Common use cases
7975

8076
**User interface controls:**

0 commit comments

Comments
 (0)