0% found this document useful (0 votes)
7 views1 page

Google Search Test with Playwright

This document contains a Playwright test script that automates a Google search for the term 'Playwright'. It navigates to Google's homepage, fills in the search input, submits the query, and waits for the results to load before logging the page title. The test demonstrates basic web automation using Playwright.

Uploaded by

suvic1986
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
7 views1 page

Google Search Test with Playwright

This document contains a Playwright test script that automates a Google search for the term 'Playwright'. It navigates to Google's homepage, fills in the search input, submits the query, and waits for the results to load before logging the page title. The test demonstrates basic web automation using Playwright.

Uploaded by

suvic1986
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd

const { test, expect } = require('@playwright/test');

test('Google Search Test', async ({ page }) => {


await [Link]('[Link]
await [Link]('input[name="q"]', 'Playwright');
await [Link]('input[name="q"]', 'Enter');
await [Link](3000); // Wait for results to load
const title = await [Link]();
[Link](`Page title: ${title}`);
});

You might also like