Institutional Repository of Vilnius University
Benchmark of playwright locator strategies under ui change /
Abstract
dc:descriptionThis bachelor’s thesis examines the robustness of Playwright locator strategies under user interface changes in automated web application tests. The research problem is that browser-based user journey tests may fail to find the required elements not because the application functionality is broken, but because of small user interface changes. For example, a changed button label, class attribute, element position, or alternative text can affect how a test locates the element it needs. The goal of the thesis is to design, implement, and apply a reproducible evaluation method for comparing the robustness of Playwright locator strategies under user interface changes. The study uses twelve RealWorld application user scenarios executed in three user interface implementations: Angular, Svelte, and Vue 3. Three locator groups are compared: Playwright semantic queries, CSS selectors, and XPath expressions. Each scenario is executed without changes and with one controlled user interface change. This makes it possible to compare how locators react to changes while the tested user task remains the same. To check whether a scenario reaches the expected result, the benchmark uses a separate oracle layer. In this layer, required elements are found by data-testid attributes. These attributes are not used in the locator strategies being compared. The results are summarized using failure rates, failure types, execution duration and automated accessibility-check results. A supplementary semantic-query set is used to evaluate Playwright queries that appear less often in the main scenario set, but its results are analyzed separately. The main experiment shows that Playwright semantic queries were more sensitive to user interface changes than CSS and XPath locators. The largest number of failures was caused by changes related to element names, labels, alternative text, and other accessibility-semantic sources. CSS and XPath results were similar. The thesis provides a reproducible evaluation method and shows that locator choice should be tied to the most stable part of the tested user interface contract.
Degree
thesis:*- Grantor dc:publisher
- Institutional Repository of Vilnius University
- Year dc:date
- 2026
Author and committee
dc:creator, dc:contributor.*- Author dc:creator
-
- Ivanauskaitė, Aistė,
Subjects
dc:subject × 1Rights
dc:rights- Statement dc:rights
-
- info:eu-repo/semantics/openAccess
- Language dc:language
- eng
Identifiers
dc:identifier.*- Repository record dc:identifier
- https://repository.vu.lt/VU:ELABAETD308336965&prefLang=en_US