Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,6 @@ description: 'Browser module: frame.getByAltText(altText[, options]) method'

Find and click an image by its alt text:

<!-- md-k6:skip -->

```javascript
import { browser } from 'k6/browser';

Expand Down Expand Up @@ -50,8 +48,6 @@ export default async function () {

Use exact matching for precise alt text:

<!-- md-k6:skip -->

```javascript
import { browser } from 'k6/browser';

Expand Down Expand Up @@ -89,8 +85,6 @@ export default async function () {

Find images using pattern matching:

<!-- md-k6:skip -->

```javascript
import { browser } from 'k6/browser';

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,6 @@ description: 'Browser module: frame.getByLabel(text[, options]) method'

Fill form fields using their labels:

<!-- md-k6:skip -->

```javascript
import { browser } from 'k6/browser';

Expand Down Expand Up @@ -56,8 +54,6 @@ export default async function () {

Handle various form control types in various label association patterns:

<!-- md-k6:skip -->

```javascript
import { browser } from 'k6/browser';

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,6 @@ description: 'Browser module: frame.getByPlaceholder(placeholder[, options]) met

Find and fill inputs by their placeholder text:

<!-- md-k6:skip -->

```javascript
import { browser } from 'k6/browser';

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,6 @@ description: 'Browser module: frame.getByRole(role[, options]) method'

Find and click a button by its role:

<!-- md-k6:skip -->

```javascript
import { browser } from 'k6/browser';

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,6 @@ description: 'Browser module: frame.getByTestId(testId) method'

Locate and interact with elements using test IDs:

<!-- md-k6:skip -->

```javascript
import { browser } from 'k6/browser';

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,6 @@ description: 'Browser module: frame.getByText(text[, options]) method'

Find and click elements by their visible text:

<!-- md-k6:skip -->

```javascript
import { browser } from 'k6/browser';

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,6 @@ description: 'Browser module: frame.getByTitle(title[, options]) method'

Find and interact with elements by their title attribute:

<!-- md-k6:skip -->

```javascript
import { browser } from 'k6/browser';

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,6 @@ description: 'Browser module: frameLocator.getByAltText(altText[, options]) meth

Find and click an image by its alt text:

<!-- md-k6:skip -->

```javascript
import { browser } from 'k6/browser';

Expand Down Expand Up @@ -52,8 +50,6 @@ export default async function () {

Use exact matching for precise alt text:

<!-- md-k6:skip -->

```javascript
import { browser } from 'k6/browser';

Expand Down Expand Up @@ -93,8 +89,6 @@ export default async function () {

Find images using pattern matching:

<!-- md-k6:skip -->

```javascript
import { browser } from 'k6/browser';

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,6 @@ description: 'Browser module: frameLocator.getByLabel(text[, options]) method'

Fill form fields using their labels:

<!-- md-k6:skip -->

```javascript
import { browser } from 'k6/browser';

Expand Down Expand Up @@ -60,8 +58,6 @@ export default async function () {

Handle various form control types in various label association patterns:

<!-- md-k6:skip -->

```javascript
import { browser } from 'k6/browser';

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,6 @@ description: 'Browser module: frameLocator.getByPlaceholder(placeholder[, option

Find and fill inputs by their placeholder text:

<!-- md-k6:skip -->

```javascript
import { browser } from 'k6/browser';

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,6 @@ description: 'Browser module: frameLocator.getByRole(role[, options]) method'

Find and click a button by its role:

<!-- md-k6:skip -->

```javascript
import { browser } from 'k6/browser';

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,6 @@ description: 'Browser module: frameLocator.getByTestId(testId) method'

Locate and interact with elements using test IDs:

<!-- md-k6:skip -->

```javascript
import { browser } from 'k6/browser';

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,6 @@ description: 'Browser module: frameLocator.getByText(text[, options]) method'

Find and click elements by their visible text:

<!-- md-k6:skip -->

```javascript
import { browser } from 'k6/browser';

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,6 @@ description: 'Browser module: frameLocator.getByTitle(title[, options]) method'

Find and interact with elements by their title attribute:

<!-- md-k6:skip -->

```javascript
import { browser } from 'k6/browser';

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,19 +5,15 @@ description: 'Browser module: locator.contentFrame method'

# contentFrame()

This method returns a [FrameLocator](https://grafana.com/docs/k6/<K6_VERSION>/javascript-api/k6-browser/framelocator/) object pointing to the same `iframe` as this locator.
This method returns a [FrameLocator](https://grafana.com/docs/k6/<K6_VERSION>/javascript-api/k6-browser/framelocator/) object pointing to the same `iframe` as this locator. This is useful when you have a [Locator](https://grafana.com/docs/k6/<K6_VERSION>/javascript-api/k6-browser/locator/) object obtained somewhere, and later on would like to interact with the content inside the frame.

Useful when you have a [Locator](https://grafana.com/docs/k6/<K6_VERSION>/javascript-api/k6-browser/locator/) object obtained somewhere, and later on would like to interact with the content inside the frame.

### Returns
## Returns
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just noticed that, in most other APIs doc page, we use ### Returns. I'm not sure which one we should use but this should be consistent.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah, I need to do a quick pass and fix the headings in some of the JavaScript API files. They should use an H2 heading.


| Type | Description |
| -------------------------------------------------------------------------------------- | -------------------------------------------------------- |
| [FrameLocator](https://grafana.com/docs/k6/<K6_VERSION>/javascript-api/k6-browser/framelocator/) | The `FrameLocator` pointing to the same`iframe` as this locator. |

### Example

{{< code >}}
## Example

```javascript
import { browser } from 'k6/browser';
Expand Down Expand Up @@ -53,5 +49,3 @@ export default async function () {
}
}
```

{{< /code >}}
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,6 @@ description: 'Browser module: locator.getByAltText(altText[, options]) method'

Find and click an image by its alt text:

<!-- md-k6:skip -->

```javascript
import { browser } from 'k6/browser';

Expand Down Expand Up @@ -50,8 +48,6 @@ export default async function () {

Use exact matching for precise alt text:

<!-- md-k6:skip -->

```javascript
import { browser } from 'k6/browser';

Expand Down Expand Up @@ -89,8 +85,6 @@ export default async function () {

Find images using pattern matching:

<!-- md-k6:skip -->

```javascript
import { browser } from 'k6/browser';

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,6 @@ description: 'Browser module: locator.getByLabel(text[, options]) method'

Fill form fields using their labels:

<!-- md-k6:skip -->

```javascript
import { browser } from 'k6/browser';

Expand Down Expand Up @@ -56,8 +54,6 @@ export default async function () {

Handle various form control types in various label association patterns:

<!-- md-k6:skip -->

```javascript
import { browser } from 'k6/browser';

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,6 @@ description: 'Browser module: locator.getByPlaceholder(placeholder[, options]) m

Find and fill inputs by their placeholder text:

<!-- md-k6:skip -->

```javascript
import { browser } from 'k6/browser';

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,6 @@ description: 'Browser module: locator.getByRole(role[, options]) method'

Find and click a button by its role:

<!-- md-k6:skip -->

```javascript
import { browser } from 'k6/browser';

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,6 @@ description: 'Browser module: locator.getByTestId(testId) method'

Locate and interact with elements using test IDs:

<!-- md-k6:skip -->

```javascript
import { browser } from 'k6/browser';

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,6 @@ description: 'Browser module: locator.getByText(text[, options]) method'

Find and click elements by their visible text:

<!-- md-k6:skip -->

```javascript
import { browser } from 'k6/browser';

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,6 @@ description: 'Browser module: locator.getByTitle(title[, options]) method'

Find and interact with elements by their title attribute:

<!-- md-k6:skip -->

```javascript
import { browser } from 'k6/browser';

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,6 @@ description: 'Browser module: page.getByAltText(altText[, options]) method'

Find and click an image by its alt text:

<!-- md-k6:skip -->

```javascript
import { browser } from 'k6/browser';

Expand Down Expand Up @@ -50,8 +48,6 @@ export default async function () {

Use exact matching for precise alt text:

<!-- md-k6:skip -->

```javascript
import { browser } from 'k6/browser';

Expand Down Expand Up @@ -89,8 +85,6 @@ export default async function () {

Find images using pattern matching:

<!-- md-k6:skip -->

```javascript
import { browser } from 'k6/browser';

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,6 @@ description: 'Browser module: page.getByLabel(text[, options]) method'

Fill form fields using their labels:

<!-- md-k6:skip -->

```javascript
import { browser } from 'k6/browser';

Expand Down Expand Up @@ -55,8 +53,6 @@ export default async function () {

Handle various form control types in various label association patterns:

<!-- md-k6:skip -->

```javascript
import { browser } from 'k6/browser';

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,6 @@ description: 'Browser module: page.getByPlaceholder(placeholder[, options]) meth

Find and fill inputs by their placeholder text:

<!-- md-k6:skip -->

```javascript
import { browser } from 'k6/browser';

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,6 @@ description: 'Browser module: page.getByRole(role[, options]) method'

Find and click a button by its role:

<!-- md-k6:skip -->

```javascript
import { browser } from 'k6/browser';

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,6 @@ description: 'Browser module: page.getByTestId(testId) method'

Locate and interact with elements using test IDs:

<!-- md-k6:skip -->

```javascript
import { browser } from 'k6/browser';

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,6 @@ description: 'Browser module: page.getByText(text[, options]) method'

Find and click elements by their visible text:

<!-- md-k6:skip -->

```javascript
import { browser } from 'k6/browser';

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,6 @@ description: 'Browser module: page.getByTitle(title[, options]) method'

Find and interact with elements by their title attribute:

<!-- md-k6:skip -->

```javascript
import { browser } from 'k6/browser';

Expand Down
Loading