A test automation framework is a structured set of guidelines, reusable components, tools, and best practices for creating and maintaining automated tests — not just a single library, but the architecture that makes automation scalable, readable, and maintainable.
A framework provides standard structure (folders, base classes, utilities), separation of concerns (tests vs page logic vs data vs config), reusable components (driver management, waits, reporting, logging), and conventions the whole team follows. Benefits: maintainability (change a locator/config in one place), reusability (shared utilities/page objects), readability (tests express intent), scalability (parallel/cross-browser), and consistency (everyone writes tests the same way). A framework turns a pile of brittle scripts into a professional, long-lived automation solution. Interviewers expect you to design one, not just use Selenium.
Instead of 200 standalone scripts each hard-coding URLs and locators, a framework centralizes config, Page Objects, waits, and reporting so a URL change is one edit and a new test is a few readable lines.
An interviewer asks: 'What's the difference between writing Selenium scripts and building a test automation framework?'