Skip to content

Commit

Permalink
Update browser newPage JS examples
Browse files Browse the repository at this point in the history
  • Loading branch information
inancgumus committed May 8, 2024
1 parent a3b0093 commit da14067
Show file tree
Hide file tree
Showing 7 changed files with 8 additions and 8 deletions.
2 changes: 1 addition & 1 deletion examples/cookies.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ export const options = {
};

export default async function () {
const page = browser.newPage();
const page = await browser.newPage();
const context = page.context();

try {
Expand Down
2 changes: 1 addition & 1 deletion examples/keyboard.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ export const options = {
}

export default async function () {
const page = browser.newPage();
const page = await browser.newPage();

await page.goto('https://test.k6.io/my_messages.php', { waitUntil: 'networkidle' });

Expand Down
2 changes: 1 addition & 1 deletion examples/mouse.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ export const options = {
}

export default async function () {
const page = browser.newPage();
const page = await browser.newPage();

await page.goto('https://test.k6.io/', { waitUntil: 'networkidle' });

Expand Down
4 changes: 2 additions & 2 deletions examples/multiple-scenario.js
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ export const options = {
}

export async function messages() {
const page = browser.newPage();
const page = await browser.newPage();

try {
await page.goto('https://test.k6.io/my_messages.php', { waitUntil: 'networkidle' });
Expand All @@ -43,7 +43,7 @@ export async function messages() {
}

export async function news() {
const page = browser.newPage();
const page = await browser.newPage();

try {
await page.goto('https://test.k6.io/news.php', { waitUntil: 'networkidle' });
Expand Down
2 changes: 1 addition & 1 deletion examples/pageon.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ export const options = {
}

export default async function() {
const page = browser.newPage();
const page = await browser.newPage();

try {
await page.goto('https://test.k6.io/');
Expand Down
2 changes: 1 addition & 1 deletion examples/shadowdom.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ export const options = {
}

export default async function() {
const page = browser.newPage();
const page = await browser.newPage();
page.setContent("<html><head><style></style></head><body>hello!</body></html>")
await page.evaluate(() => {
const shadowRoot = document.createElement('div');
Expand Down
2 changes: 1 addition & 1 deletion examples/touchscreen.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ export const options = {
}

export default async function () {
const page = browser.newPage();
const page = await browser.newPage();

await page.goto('https://test.k6.io/', { waitUntil: 'networkidle' });

Expand Down

0 comments on commit da14067

Please sign in to comment.