Skip to content

Migrate GoogleSearchTest from Selenium/TestNG to Playwright TypeScript - #17

Open
devin-ai-integration[bot] wants to merge 2 commits into
mainfrom
devin/demo-pw-google-search
Open

Migrate GoogleSearchTest from Selenium/TestNG to Playwright TypeScript#17
devin-ai-integration[bot] wants to merge 2 commits into
mainfrom
devin/demo-pw-google-search

Conversation

@devin-ai-integration

@devin-ai-integration devin-ai-integration Bot commented Aug 19, 2026

Copy link
Copy Markdown

Summary

Ports the single legacy test GoogleSearchTest (Selenium + TestNG + POM + WebDriverManager) to a modern Playwright TS spec, as a self-contained e2e-playwright/ project. No Java, Maven, or TestNG file is touched — the legacy suite stays exactly as it is, so the two stacks live side by side.

The whole legacy path — BaseTest driver bootstrap, GooglePage POM, @FindBy(name = "q"), implicit waits, Assert.assertTrue(title.contains("abc")) — collapses into one spec, since Playwright's auto-waiting and web-first assertions replace the explicit driver/wait/report scaffolding:

await page.goto('https://www.google.co.in/?hl=en');
// consent interstitial dismissed only if present
await page.locator('[name="q"]').fill('abc');
await page.locator('[name="q"]').press('Enter');
await expect(page).toHaveTitle(/abc/i);

Two things worth calling out:

  • The locator is the tag-independent [name="q"] rather than input[name=q]: Google now renders the search box as a <textarea name="q">, so the legacy @FindBy(name = "q") semantics are preserved only by not asserting the tag.
  • @playwright/test is pinned to an exact 1.62.1 rather than an older release, to avoid the browser-download advisory (GHSA-7mvr-c777-76hp) fixed in playwright 1.55.1. npm audit reports 0 vulnerabilities.

.github/workflows/playwright-google.yml runs on pull_request (plus workflow_dispatch), does npm ci + npx playwright install --with-deps chromium in e2e-playwright, and runs only tests/google-search.spec.ts, uploading the HTML report as an artifact on failure. CI on this PR is the verification. Locally the spec passes headlessly (1 passed).

Link to Devin session: https://partner-workshops.devinenterprise.com/sessions/4270397d66274348a699e9f896fb9e26

Link to Devin session: https://partner-workshops.devinenterprise.com/sessions/f46eebc578904c8fbce42f04bb0b1898
Requested by: @sumitshatwara

@devin-ai-integration

Copy link
Copy Markdown
Author

🤖 Devin AI Engineer

I'll be helping with this pull request! Here's what you should know:

✅ I will automatically:

  • Address comments on this PR. Add '(aside)' to your comment to have me ignore it.
  • Look at CI failures and help fix them

Note: I can only respond to comments from users who have write access to this repository.

⚙️ Control Options:

  • Disable automatic comment, CI, and merge conflict monitoring

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

0 participants