The Hidden Cost of Every Selenium Framework You've Built
You didn't set out to build a framework. You set out to test a login form. But somewhere between the first WebDriver driver = new ChromeDriver() and the fiftieth flaky CI run, you built one anyway. There's a BaseTest . There's a DriverFactory . There's a WaitUtils class that everyone copies, and no one fully trusts. There's a reporting hack bolted onto TestNG listeners, and a block of CI YAML that only one person understands. That's a framework. You just never called it one — and that's exactly why it's so expensive. The framework you didn't mean to build Here's the pattern, repeated at nearly every Java shop: // The BaseTest that grows a little every sprint public class BaseTest { protected WebDriver driver ; @BeforeMethod public void setUp () { driver = new ChromeDriver ( /* options someone tuned in 2022 */ ); driver . manage (). timeouts (). implicitlyWait ( Duration . ofSeconds ( 10 )); // …plus retries, screenshots, and env switching bolted on over time } @AfterMethod public void tearDown ( ITestResult result ) { if ( result . getStatus () == ITestResult . FAILURE ) { // take a screenshot… somehow… attach it… somewhere } driver . quit (); } } It looks harmless. It's ten lines. But it never stays ten lines, because production testing keeps asking for more: parallel execution, a second browser, cloud grids, retry-on-flake, a report your manager will actually open. Each request adds a little more plumbing — and every line of that plumbing is code you now own. The five costs nobody budgets for 1. Maintenance you can't schedule. Selenium 4 lands. ChromeDriver changes its options API. A dependency bump breaks your screenshot logic. None of this is on the roadmap, all of it is on you, and it always arrives the week before a release. 2. Onboarding that lives in someone's head. A new engineer can't just read the docs — there are no docs. Onboarding is "sit with Priya and she'll explain the wait helpers." The framework's real specification is tribal knowledge, and it wal