Web applications are constantly evolving to integrate new features and fix reported bugs. Even an imperceptible change can sometimes entail significant modifications of the Document Object Model (DOM), which is the underlying model used by browsers to render all the elements included in a web application. Scripts that interact with web applications (e.g. web test scripts, crawlers, or robotic process automation) rely on this continuously evolving DOM which means they are often particularly fragile. More precisely, the major cause of breakages observed in automation scripts are element locators, which are identifiers used by automation scripts to navigate across the DOM. When the DOM evolves, these identifiers tend to break, thus causing the related scripts to no longer locate the intended target elements. For this reason, several contributions explored the idea of automatically repairing broken locators on a page. These works attempt to repair a given broken locator by scanning all elements in the new DOM to find the most similar one. Unfortunately, this approach fails to scale when the complexity of web pages grows, leading either to long computation times or incorrect element repairs. This article, therefore, adopts a different perspective on this problem by introducing a new locator repair solution that leverages tree matching algorithms to relocate broken locators. This solution, named Erratum, implements a holistic approach to reduce the element search space, which greatly eases the locator repair task and drastically improves repair accuracy. We compare the robustness of Erratum on a large-scale benchmark composed of realistic and synthetic mutations applied to popular web applications currently deployed in production. Our empirical results demonstrate that Erratum outperforms the accuracy of WATER, a state-of-the-art solution, by 67%.
翻译:网络应用程序正在不断演变,以整合新的特性和纠正报告的错误。即使是无法察觉的变化,有时也会对文档对象模型(DOM)进行重大修改,而文档对象模型(DOM)是浏览器用来使网络应用程序中包含的所有元素都包含在网络应用程序中的基本模型。与网络应用程序(例如网络测试脚本、爬行器或机器人程序自动化)互动的脚本依赖这种不断演变的DOM,这意味着它们往往特别脆弱。更准确地说,在自动化脚本中观察到的断裂的主要原因是元素定位器,这是自动化脚本用来在整个 DOM中导航的识别器。当DOM应用程序演变时,这些识别器往往会破损,从而导致相关脚本不再定位预定的目标要素。为此,一些贡献探索了自动修复页面上破碎的定位器的想法。这些尝试试图通过扫描新的 DOM 中的所有元素来找到最相似的缩略图。不幸的是,当网页的复杂度增加时,这种方式导致长时间的计算或错误的元素校正的精确度应用,这些识别器往往会断,因此,这篇文章会从一个不同的角度来修正成本的计算方法。