File tree Expand file tree Collapse file tree 1 file changed +2
-2
lines changed
docs/sources/k6/next/javascript-api/k6-browser/framelocator Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Original file line number Diff line number Diff line change @@ -47,13 +47,13 @@ export const options = {
47
47
export default async function () {
48
48
const page = await browser .newPage ();
49
49
50
- await page .goto ( ' https://quickpizza.grafana.com' );
50
+ await page .setContent ( ` <iframe src= 'https://quickpizza.grafana.com'></iframe> ` );
51
51
52
52
// Get a locator for an iframe element
53
53
const frameLocator = page .locator (' iframe' ).contentFrame ();
54
54
55
55
// Create a locator within the frame with text filtering options
56
- const submitButton = frameLocator .locator (' button' , { hasText: ' Submit Order ' });
56
+ const submitButton = frameLocator .locator (' button' , { hasText: ' Pizza, Please! ' });
57
57
await submitButton .click ();
58
58
}
59
59
```
You can’t perform that action at this time.
0 commit comments