A wide range of analysis and testing techniques targeting modern web apps rely on the automated exploration of their state space by firing events that mimic user interactions. However, finding out which elements are actionable in web apps is not a trivial task. To improve the efficacy of exploring the event space of web apps, we propose a browser-independent, instrumentation-free approach based on structural and visual stylistic cues. Our approach, implemented in a tool called StyleX, employs machine learning models, trained on 700,000 web elements from 1,000 real-world websites, to predict actionable elements on a webpage a priori. In addition, our approach uses stylistic cues for ranking these actionable elements while exploring the app. Our actionable predictor models achieve 90.14\% precision and 87.76\% recall when considering the click event listener, and on average, 75.42\% precision and 77.76\% recall when considering the five most-frequent event types. Our evaluations show that StyleX can improve the JavaScript code coverage achieved by a general-purpose crawler by up to 23\%.
翻译:针对现代网络应用程序的广泛分析和测试技术依赖于通过模拟用户互动的发射事件对其国家空间进行自动探索。 然而,在网络应用程序中发现哪些要素可以操作并不是一件微不足道的任务。 为了提高探索网络应用程序事件空间的功效,我们提议采用基于结构和视觉文体提示的无浏览器、无仪器方法。 我们采用名为StyleX的工具,使用机器学习模型,在1,000个真实世界网站的700,000个网络元素上接受培训,在网页上预测可操作的要素。此外,我们的方法在探索该应用程序时,使用文体提示排列这些可操作要素的等级。我们可操作的预测模型在考虑点击活动听众时,实现了90.14 ⁇ 精确度和87.76 ⁇ 回顾,平均而言,在考虑五大事件类型时,75.42 ⁇ 精确度和77.76 ⁇ 回顾。我们的评价显示StyleX可以改进由一般用途爬行者到23 ⁇ 的JavaScript代码覆盖范围。