lecture 12 of 160 completed

Automating applications that were never designed for it

Selenium is often chosen because of legacy. Frames, generated IDs, table layouts and no testability, plus how to change that.

What you'll learn

  • How to target elements in an app with no test ids
  • When XPath actually earns its place
  • How to negotiate a small testability change

A fifteen-year-old internal application. Table-based layout, nested frames, IDs like ctl00$ContentPlaceHolder1$GridView1$ctl03$btnDelete, no test attributes, and a development team of two who are busy.

This is where Selenium lives. It is chosen for exactly these applications, so handling them is a core senior skill for this tool rather than an edge case.

Generated IDs that change between builds.

ASP.NET WebForms, older JSF and similar frameworks generate IDs containing the control hierarchy. Add a panel and every ID beneath it changes.

full course

Keep reading with the full course

The Foundations track and the first lessons in each framework are free. This lesson needs full course access. A course plan includes all lessons for Playwright, Cypress and Selenium.

See course plans →