Skip to content

Commit 1310383

Browse files
asambstackfrancisf
authored andcommitted
chore: press enter in search scripts for puppeteer
1 parent 7434875 commit 1310383

File tree

4 files changed

+8
-4
lines changed

4 files changed

+8
-4
lines changed

duckduckgo_search_with_proxy.js

+2-1
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,8 @@ bootstrap();
3232
await page.goto('https://www.duckduckgo.com');
3333
const element = await page.$('[name="q"]');
3434
await element.click();
35-
await element.type('BrowserStack\n');
35+
await element.type('BrowserStack');
36+
await element.press('Enter');
3637
await page.waitForNavigation();
3738
const title = await page.title('');
3839
console.log(title);

parallel_test.js

+2-1
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,8 @@ const main = async (cap) => {
1717
await page.goto('https://www.duckduckgo.com');
1818
const element = await page.$('[name="q"]');
1919
await element.click();
20-
await element.type('BrowserStack\n');
20+
await element.type('BrowserStack');
21+
await element.press('Enter');
2122
await page.waitForNavigation();
2223
const title = await page.title('');
2324
console.log(title);

puppeteer-jest/duckduckgo.test.js

+2-1
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,8 @@ describe("DuckDuckGo", () => {
99
it('title should match BrowserStack at DuckDuckGo', async () => {
1010
const element = await page.$('[name="q"]');
1111
await element.click();
12-
await element.type('BrowserStack\n');
12+
await element.type('BrowserStack');
13+
await element.press('Enter');
1314
await page.waitForNavigation();
1415
try {
1516
expect(await page.title()).toBe('BrowserStack at DuckDuckGo');

sample_session_details_API.js

+2-1
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,8 @@ const expect = require('chai').expect;
2525
await page.goto('https://www.duckduckgo.com');
2626
const element = await page.$('[name="q"]');
2727
await element.click();
28-
await element.type('BrowserStack\n');
28+
await element.type('BrowserStack');
29+
await element.press('Enter');
2930
await page.waitForNavigation();
3031
const title = await page.title('');
3132
console.log(title);

0 commit comments

Comments
 (0)