Towards Automated Page Object Generation for Web Testing using Large Language Models
Bet\"ul Karag\"oz, Filippo Ricca, Matteo Biagiola, Andrea Stocco

TL;DR
This study explores the use of GPT-4o and DeepSeek Coder LLMs to automatically generate Page Objects for web testing, showing promising accuracy and recognition rates, and highlighting challenges and future directions.
Contribution
It provides the first systematic evaluation of LLMs for automated Page Object generation, demonstrating their potential and identifying open challenges.
Findings
LLMs can generate syntactically correct Page Objects.
Accuracy ranges from 32.6% to 54.0% for ground truth element identification.
Element recognition rate exceeds 70% in most cases.
Abstract
Page Objects (POs) are a widely adopted design pattern for improving the maintainability and scalability of automated end-to-end web tests. However, creating and maintaining POs is still largely a manual, labor-intensive activity, while automated solutions have seen limited practical adoption. In this context, the potential of Large Language Models (LLMs) for these tasks has remained largely unexplored. This paper presents an empirical study on the feasibility of using LLMs, specifically GPT-4o and DeepSeek Coder, to automatically generate POs for web testing. We evaluate the generated artifacts on an existing benchmark of five web applications for which manually written POs are available (the ground truth), focusing on accuracy (i.e., the proportion of ground truth elements correctly identified) and element recognition rate (i.e., the proportion of ground truth elements correctly…
Peer Reviews
No public reviews on file for this paper yet. If you reviewed it on a platform where reviews are public (OpenReview, ICLR, NeurIPS, ICML), you can paste yours below so the community can read it here.
Videos
No videos yet. Explain this paper in a talk, walkthrough, or lecture? Add one.
Taxonomy
TopicsSoftware Testing and Debugging Techniques · Web Data Mining and Analysis · Web Application Security Vulnerabilities
