Consider choosing an approach for the automated implementation of manual regression test suites written at the UI level for some already developed web apps. The TAS is based on a programming language that allows the creation of test libraries and provides a capture/playback feature that allows recognition and interaction with all widgets in the web UIs being tested. The automated tests will be implemented by team members with strong programming skills. The chosen approach should aim to reduce both the effort required to maintain automated tests and the effort required to add new automated tests. Which of the following approaches would you choose?
Correct Answer: D
TAE guidance links maintainability and scalability to reducing duplication and encapsulating common actions behind reusable abstractions. For UI regression suites on existing web apps, capture/playback and linear scripting often produce brittle, duplicated sequences tightly coupled to UI details. They may be quick initially, but maintenance cost grows rapidly when locators, flows, or timing change. With a programming language that supports libraries-and a team with strong programming skills-TAE recommends structured scripting (often including modularization, reuse through functions/classes, and design patterns such as Page Object or similar abstractions). Structured scripting reduces maintenance by centralizing UI interaction logic (e.g., element locators and common workflows) so changes are made in one place. It also reduces effort to add new tests because test authors can compose new scenarios from existing reusable building blocks rather than duplicating low-level steps. TDD is a development practice and is not the primary approach for converting existing manual UI regression suites into automation; it does not directly describe how the UI tests should be structured. Capture/playback remains useful as a helper (e.g., for quickly discovering locators) but is not the best overall approach for long-term maintainability. Therefore, structured scripting best matches the stated goals.