
Conversational Test Creation: Prompting is the new Page Object Model
For over a decade, the Page Object Model (POM) has been the undisputed king of UI automation design patterns. By abstracting web elements into classes, QA engineers made tests readable and maintainable. But in 2026, a new abstraction layer has arrived that makes POM look like assembly language: Natural Language Prompting.
The End of Manual Locators
In a conversational testing framework, you don't inspect the DOM. You don't write `page.locator('#submit-btn')`. Instead, you interact with an agentic testing tool (like Auto Playwright or a custom MCP Server) using plain English.
// ❌ 2023: The Page Object Model Approach
const loginPage = new LoginPage(page);
await loginPage.enterUsername('admin');
await loginPage.enterPassword('secret123');
await loginPage.clickSubmit();
await expect(page.locator('.welcome-msg')).toBeVisible();
// âś… 2026: The Conversational Approach
await auto(page, 'Log in using admin and secret123, then verify the welcome message appears.');How it Works Under the Hood
Semantic DOM Parsing
When the command is issued, the AI pauses execution, grabs the current DOM tree of the browser, and uses an LLM to semantically understand the page state. It maps 'Log in' to the input fields and button visually associated with that action.
Dynamic Code Generation
The LLM translates the intent back into native Playwright API calls on the fly. It executes \`fill()\` and \`click()\` actions without needing a pre-defined Page Object class to exist in your repository.
The "Prompt Engineer" QA Role
If tests are written in English, does that mean anyone can write them? Yes and no. While product managers can now script happy paths easily, QA Engineers are shifting into a "Prompt Engineering" role.
Writing "Test the checkout" is too vague for an LLM to reliably execute edge cases. A modern QA writes prompts like: *"Attempt to submit the checkout form with an invalid email format. Verify the specific inline validation error 'Please enter a valid email' appears in red beneath the input."* Precision in natural language is the new precision in CSS selectors.
Conclusion
The Page Object Model isn't entirely dead for highly secure, complex calculations. But for 80% of standard UI flows, conversational test creation is faster to write, completely resilient to DOM changes, and self-maintaining. The future of QA is chatting with the browser.
About the Author
Vishvas Dhengula — Lead SDET
Vishvas is a highly accomplished Software Development Engineer in Test (SDET) with 15+ years of experience architecting enterprise test automation frameworks for Fortune 500 companies across the United States and India. His expertise spans across a wide range of industry-leading automation tools, including UFT, Selenium, Cypress, Protractor, and Playwright.
Learn Prompt-Driven Testing
Want to learn how to write effective prompts to drive Playwright automation? Check out our AI tracks to supercharge your skills today.