HxAgent: Iterative Agent Planning for End-to-End Web Application Testing
Analyze & explore related research in Conceptio
Connect this record directly into your research workflow or AI agent. Explore citations across open repositories, query full text, and export structured proof bundles.
HxAgent: Iterative Agent Planning for End-to-End Web Application Testing Tu Nguyen1,2 , Duy Cao1,2 , Viet Nguyen1,2 , Phu Nguyen1,2 , Vy Le2,3 , Nguyen TK Nguyen1,2 , Tien N. Nguyen 4 , Vu Nguyen1,2 1
University of Science, Ho Chi Minh city, Vietnam, Vietnam National University, Ho Chi Minh city, Vietnam, 3 University of Information Technology, Ho Chi Minh city, Vietnam, 4 University of Texas at Dallas, USA, 2
Correspondence: Vu Nguyen (nvu@fit.hcmus.edu.vn)
arXiv:2608.15491v1 [cs.SE] 16 Aug 2026
Abstract
multimodal planners (e.g., SeeClick (Cheng et al., 2024), UI-TARS (Qin et al., 2025), SeeAct (Zheng et al., 2024), CogAgent (Hong et al., 2024b)) represent actions as absolute screen coordinates or textual descriptions—fragile under UI changes and difficult to translate into executable scripts. (3) Pattern-based agents (e.g., MindAct (Deng et al., 2024), RCI (Kim et al., 2024), AdaPlanner (Sun et al., 2024), Synapse (Zheng et al., 2023)) depend heavily on human demonstrations, limiting scalability. (4) Li et al. (Li et al., 2023) avoid demonstrations via self-reflection, yet often fall into unguided trial-and-error loops lacking reasoning over prior state–action pairs. We introduce HxAgent, an iterative LLM-based planning approach for automatically generating executable SoAs from task goals. Inspired by ReAct (Yao et al., 2023), HxAgent continuously reasons over (1) the current page, (2) feasible actions, (3) short-term memory of prior state–action pairs, and (4) long-term experience with rule abstractions extracted from past correct and incorrect trajectories. Each action is executed and its outcome informs the next step until completion. By anchoring reasoning in textual and visual evidence, HxAgent mitigates hallucinations and ensures decisions remain grounded in real screen context. Unlike reactive reflection methods, HxAgent performs proactive correction—reassessing and adjusting its plan after each step. It restricts actions to feasible, executable elements, and combines short-term memory with long-term experience to enhance reasoning and stability. Empirically, HxAgent outperforms baselines by 19.3%, 5.7%, and 11.4% in Exact-Match accuracy on OnlineMind2Web, MiniWoB++, and Real-world datasets, respectively, and achieves 77.3%–100.0% success in test script generation. On challenging tasks, it attains 81.6% Exact-Match, while others largely fail. In brief, this paper provides the following contributions:
In automated web testing, generating test cases and performing testing using functionality descriptions in natural-language is crucial for improving efficacy. These tasks require such a testing agent to carry out tasks on the target application and generating tests autonomously. We introduce HxAgent, an iterative LLM-based planning agent with a proactive correction strategy. After each step, HxAgent reassesses the web state to determine the next action using (1) current observations, (2) short-term memory of past actions, and (3) long-term experience extracted from past (in)correct sequences of actions. HxAgent achieves 97.4% Exact-Match accuracy on MiniWoB++, comparable to the best baselines without human demonstrations and surpassing the recent WALT by 10.5%. On a dataset of 350 web tasks, it attains 83.8% Exact-Match and 91.8% Prefix-Match, exceeding WALT by 13.4%. On OnlineMind2Web, it further improves over WALT by 4.6%.
1
Introduction
In web UI testing, much of the process remains manual and error-prone. Testers execute textual task descriptions using tools such as Selenium (Selenium) or Katalon (Katalon), which record user interactions to form Sequences of Actions (SoAs)—automated test scripts. While effective, this manual recording is time-consuming and susceptible to human error, motivating automation. Recent LLM-based approaches (Humphreys et al., 2022; Jia et al., 2018; Liu et al., 2018; Drouin et al.; Liu et al., 2023a; Sumers et al.) advance automated interaction but cannot directly generate executable test scripts. Existing UI agents face four main limitations: (1) Models such as WebArena (Zhou et al., 2023) and WebLINX (Lù et al., 2024) prioritize task completion over capturing executable SoAs, focusing on end-user automation rather than test generation. (2) Visual and 1
1. HxAgent: an LLM-based approach to support automated web testing by generating the sequences of actions to perform on a web application to accomplish a given task. 2. An iterative LLM-based agent planning with both short-term and long-term experience. 3. An empirical evaluation to show its effectiveness over the baselines and a dataset (HxAgent) containing tasks and actual SoAs, which can serve as a benchmark for future studies.
2
ure feedback, which are aggregated to guide performance in evaluation. Short-term memory complements this process by retaining recent actions and outcomes, such as clicks and inputs, providing continuity, while accumulated experience enables the model to generalize from past patterns and apply effective strategies in new tasks. Key Idea 4 [Vision enhancement]. The HTML of real-world websites can be extensive, risking exceeding the LLM’s context length. Selecting elements is also challenging when complex layouts obscure an element’s context: in a date picker, for instance, an agent may detect "Day 1" as interactable but fail to distinguish between months, yielding ambiguous options. To address this, we exploit the multi-modal capabilities of LLMs, providing the screenshot alongside the actionable elements of the current webpage to support the choice of next action.
Key Ideas
We design HxAgent with the following key ideas: Key Idea 1 [Iterative LLM-based Agent Planning]. To model executable action sequences, we design an iterative LLM-based planning mechanism that controls the next action in a feedback loop, grounding the model in textual and visual screen context to avoid irrelevant or hallucinated actions. HxAgent determines each action from four inputs: the current page, feasible actions, memory of previous state–action pairs, and experience from past (in)correct sequences. Each action is executed in a testing environment, and the resulting state guides the next iteration until completion. Unlike prior UI agents, actions are explicitly represented as tuples of operations on web elements with optional input values. Unlike self-reflection approaches, HxAgent performs proactive correction which reassesses and adjusts its plan after each step rather than re-executing faulty plans after delay. Key Idea 2 [Sequence action memory as shortterm memory]. A crucial aspect of navigating complex web tasks is maintaining a persistent awareness of previous steps and the evolving states of webpages. Drawing inspiration from this necessity, we introduce a short-term memory mechanism that involves feeding LLMs with information about the previous steps taken and the corresponding states of the website after each action. HxAgent maintains a structured memory of prior interactions, allowing it to avoid previously failed decisions and inform future reasoning with explicit historical context. Key Idea 3 [Combining action memory with experience reinforcement]. Building on LLM reflection mechanisms (Shinn et al., 2024; Li et al., 2023), we propose a two-phase strategy with a training and an evaluation phase. In training, the LLM gathers state–action sequences with success or fail-
3
HxAgent
3.1
Formulation
We model web-based task execution as a Partially Observable Markov Decision Process (POMDP) M = (S, A, O, T , R, γ) where st ∈ S denotes the latent web environment state at time t, at ∈ A is an executable action, ot ∈ O is the observation, T is the transition function, R is the reward function, and γ ∈ (0, 1] is the discount factor. Multi-modal observation. Since the agent can only partially observe st , it receives a multi img elm . modal observation ot = Ω(st ) = otxt t , ot , ot img where otxt t contains textual DOM information, ot is a webpage screenshot, and oelm denotes the set t of interactable elements. The feasible action set is defined as A(ot ) = {(op, e, v) | e ∈ oelm t , op ∈ O, v ∈ V ∪ {∅}} where op denotes an operation (e.g., click or input), e a web element, and v an optional input value. Sequence of actions. An action sequence to perform a task up to time t is defined as τt = (s0 , a0 ), (s1 , a1 ), . . . , (st , at ) (1) where the state transitions st+1 ∼ T (st , at ) and at is determined using the grounding function (5). Sequence action memory (SAM). This shortterm memory at step t is defined as Mt = {(ŝt−k , at−k ), . . . , (ŝt−1 , at−1 )}
(2)
where ŝt denotes the observed state representation and k is the memory window size. This memory 2
Figure 1: HxAgent Architecture
A(ot ). This formulation enables iterative, memoryaware, and experience-driven decision making to support long-horizon task execution in dynamic web environments. State transition. After grounding an action, the agent executes the action on the test environment and transitions to the next state st+1 ∼ T (st , at ). State evaluation. At each new state, the agent evaluates the state to determine whether the task has been successfully completed or whether execution should terminate early due to failure. The evaluation is defined as follows:
maintains recent interaction context to guide subsequent decisions to accomplish the current task. Long-term experience memory. This memory stores historical interaction trajectories from multiple tries for each task, their outcomes, and behavioral rules: (j) E = {(τ (i) , y (i) )}N i=1 ∪ K
(3)
where τ (i) denotes a complete SoA and y (i) ∈ {0, 1} indicates task success or failure. Abstracted behavioral rules can be derived as K(j+1) = ϕ(τ (i) , E)
(4)
{success, stop} ∼ G(τt , Mt , E)
where ϕ denotes a rule-based knowledge extraction function. This function is implemented by prompting the LLM with a completed trajectory and the current rule set, asking it to abstract a concise behavioral rule (e.g., "verify the label before clicking") only when the candidate rule is not already entailed by an existing one. Rules are stored as plain-text heuristics alongside their source SoA. Implementation details are given in Appendix C. These memory components complement each other: the short-term memory maintains immediate context and the current sequence of actions required to accomplish the task, while the longterm experience captures learned strategies distilled from many SoAs explored during training. Action grounding. Inspired by ReAct (Yao et al., 2023), which enables LLMs to interleave reasoning and acting by pausing after each decision to observe the environment, we adopt an iterative action grounding scheme that conditions decision making on the current observation ot , short-term memory Mt , and accumulated experience E. At a time step t, the agent selects an action according to at ∼ π(. | ot , A(ot ), Mt , E)
(6)
If the task is completed, the outcome y (i) of the experience memory E is updated automatically when human judgment is not involved in determining task success. 3.2
Architecture
Fig. 1 shows HxAgent’s architecture with LLM indicating LLM-based agents. It takes as input the web application and the task description, and produces the SoA to complete the task. HxAgent operates with two key components: 1) Iterative LLMbased Agent Planning to produce action sequences, and 2) Experience Reinforcement to support the decision-making. Given a target web application and task description, HxAgent initiates its iterative process from the specified starting page URL. The process begins with Content Extractor 1 , which operates on the current webpage state st to capture the content ŝt and enumerate feasible actions A(ot ). State Evaluator 2 implements the evaluation function G by employing the LLM to evaluate the current state of the action sequence using the action sequence τt , sequence action memory Mt , and experience memory E. Within a single prompt, the agent (i) summarizes previous interactions, (ii) describes the
(5)
where the grounding function π is implemented by an LLM and constrained to the feasible action set 3
Algorithm 1 Iterative LLM-based Agent Planning
as the test case name. Each step in the test case corresponds to an action executed on a given state. An action is defined by its type (e.g., click, text entry), value (e.g., input text), target web element, and the state of a webpage. The test cases can be automatically replayed in the target environment during regression testing.
1: Input: task to complete, url of the target webpage, and Experience of previous action sequences E 2: Mt ← ∅ 3: procedure I TERATIVE AGENT P LANNING(task, url) 4: st ← T estEnvironment.load(url) 5: while t < M AXt do 6: ŝt , A(ot ) ← ContentExtractor(st ) 7: success, stop ← GLLM (τt , Mt , E) 8: if success = true then 9: if training then 10: E ← E ∪ (Mt , 1) 11: end if 12: break 13: end if 14: if stop = true then //early termination 15: if training then 16: E ← E ∪ (Mt , 0) 17: end if 18: break 19: end if 20: at ← πLLM (ŝt , A(ot ), Mt , E) 21: if count(at ) > 1 then // at is duplicated 22: at ← πLLM (oimg t , at , Mt , E) 23: end if 24: if at requires input then 25: inputvalue ← LLM (at , Mt , E) 26: at ← at ∪ inputvalue 27: end if 28: Mt ← Mt ∪ (ŝt , at ) 29: st ← T (st , at ) 30: t←t+1 31: end while 32: if t = M AXt then 33: if training then 34: E ← E ∪ (Mt , 0) 35: end if 36: end if 37: E ← E ∪ ϕLLM (τt , E) // update rules 38: end procedure
4
We seek to evaluate (1) the effectiveness of HxAgent in generating action sequences (Sequence Action Effectiveness), (2) its effectiveness in generating test cases (Test Generation Effectiveness), (3) the impact of long-term experience memory, (4) the cost of LLM usage, and (5) the effect of each HxAgent component (Ablation Study). Datasets. We use three datasets. First, Realworld dataset (Table 7), includes 350 tasks from seven popular websites (50 each) generated from task templates (e.g., “Subscribe to the channel”). Second, MiniWoB++ (Liu et al., 2018), provides 44 sampled tasks with 25 instances each (1,100 total). Third, OnlineMind2Web (Xue et al., 2025a), extends Mind2Web (Deng et al., 2024) with 300 tasks from 136 websites across multiple domains. After removing 15 inaccessible ones, 285 tasks from 132 sites were used. Baselines. We restrict our comparison to agents that can emit executable, replayable action sequences, since this is a prerequisite for test-script generation rather than one-time task execution. Therefore, we chose the following three primary baselines: Li et al., SeeAct, and WALT (Prabhu et al., 2026). For SeeAct, we adopt SeeActchoice , which grounds actions through textual choices. The details on the rationales for selecting these benchmarks and baselines are in the Related Work section. In addition, Table 8 includes several other baselines, namely WebNT5, HTML-T5-XL, WebGUM, WGE, CC-Net, RCI, AdaPlanner, and Synapse. These methods are evaluated only on MiniWoB++, as they depend on human demonstrations that are unavailable for the other two datasets. Procedure. We set up Selenium test environment via ChromeDriver. The task in the text string is used as input to HxAgent and baselines. We use GPT–4o in our experiments, as it serves as the primary LLM in most baselines and is widely regarded as a state-of-the-art model. For MiniWoB++, we first run the training phase
current state, (iii) determines whether to stop execution early due to significant divergence from the expected state, (iv) decides whether the task is complete, and (v) evaluates whether the intended goal has been successfully achieved. At each iteration t, Action Grounding 3 implements action grounding π(.) to determine the most suitable next action at . In our implementation presented in Algorithm 1, the agent first uses the LLM with textual presentation of the current page ŝt , and if there exists two or more applicable actions, the img agent uses the image or visual observation ot . The Rule Extractor 4 component implements the long-term experience memory E by extracting rules from previous action sequences. 3.3
Experimental Methodology
Test case generation
HxAgent produces test scripts by converting an action sequence that successfully completes a task into a test case, where the task description serves 4
Table 1: Performance of Sequence Action Generation on Real-world dataset
for 20 task instances, to obtain the maximum of 8 few-shot examples and a set of textual rules to be used as experience. As in Li et al., we evaluated each task on 50 instances. For the real-world dataset, we evaluate on 50 instances for each task. Evaluation Metrics. We define an action as correct if both the selected element (its content) and the predicted operation are correct. For sequence action generation, we use: Exact Match Rate (Exact-Match): We consider the generated SoA for a task as correct only if all actions are correct. Exact-Match is defined as the ratio of correct results to the total number of results. Prefix Match Rate (Prefix-Match): Prefix-Accuracy is the accuracy of the prefix of a generated SoA for a task instance, which is the ratio of continuous correct actions from the start to the first error, divided by the total number of actions. Prefix-Match is the average in all instances.
5
Empirical Results
5.1
Sequence Action Effectiveness
Exact-Match (%) Prefix-Match (%) Ours Li et al. SeeAct WALT Ours Li et al. SeeAct WALT YouTube 100.0 20.0 100.0 100 100.0 20.0 100.0 100 Linkedin 92.0 46.0 100.0 80 98.4 71.0 100.0 90 Facebook 93.3 33.3 66.7 66.7 96.7 39.0 79.2 75 Google 96.0 0.0 100.0 60 98.6 0.0 100.0 78 Amazon 93.4 54.0 100.0 80 94.4 56.0 100.0 96 Stackover. 80.0 36.0 40.0 80 90.0 45.4 63.3 80 Expedia 32.0 0.0 0.0 20 64.4 9.4 44.1 32.7 Tot./Avg 83.8 27.0 72.4 69.5 91.8 34.4 83.8 78.8 Website
Note: Ours denotes our proposed framework, HxAgent.
Table 2: Performance of Sequence Action Generation on OnlineMind2Web dataset Exact-Match (%) Prefix-Match (%) Ours Li et al. SeeAct WALT Ours Li et al. SeeAct WALT Easy 80 81.3 40.0 63.8 56.3 90.8 54.0 75.8 76.6 Medium 135 40.7 14.8 30.4 36.3 55.0 26.2 42.4 68 Hard 70 30.0 5.7 10.0 20 41.2 13.8 20.2 62.6 Tot./Avg 285 50.7 20.2 34.7 37.5 62.4 31.3 46.1 69 Level No.
hard tasks. Compared to the Real-world dataset, OnlineMind2Web includes more complex UI elements such as dropdowns and calendar pickers, where HxAgent’s iterative planning proves effective. It outperforms Li et al. by 30.5%, SeeAct by approximately 16%, and WALT by 4.6%, particularly on tasks requiring multi-step reasoning and adaptation to dynamic state changes. Despite these gains, HxAgent still struggles with large interactive elements such as datetime pickers, enter-to-submit fields, and large interactive components that may exceed LLM context limits. Performance on MiniWoB++: As seen in Table 3, for 975 task instances from 39 tasks, HxAgent achieves 97.4% Exact-Match and 99% PrefixMatch. Tasks with fewer than three screens or actions reach near-perfect accuracy (97–100%), while those with higher complexity slightly decrease to 93%. Notably, HxAgent attains performance comparable to leading baselines without human demonstrations—matching WebGUM (401K demos) and surpassing CC-Net (BC + RL) (2.4M demos). Although Synapse achieves perfect accuracy, it depends on 154 handcrafted exemplars and taskspecific prompts, which risk overfitting by reducing the need for multi-state exploration. Among methods that do not rely on human demonstrations, HxAgent slightly outperforms Li et al. in Exact-Match accuracy (97% vs. 94%), while surpassing SeeAct by 20% and WALT by 10.5%. On 125 challenging MiniWoB++ tasks (Table 4) involving an average of five screens and seven actions, HxAgent achieves 81.6% Exact-Match, com-
Performance on the Real-world dataset: As seen in Table 1, HxAgent achieves the highest performance on the Real-world dataset, with 83.8% Exact-Match and 91.8% Prefix-Match, outperforming Li et al. by 56.8%, WALT by 13.4%, and SeeAct by 11.4%. Owing to its iterative planning mechanism (ReAct) and integration of short-term memory, HxAgent effectively adapts to interface variations and dynamic webpage states. In contrast, Li et al. employ a static, screen-based planning strategy with full HTML representations, which frequently exceed context limitations and fail to generalize when interfaces change. SeeAct, while demonstrating strong performance on structured platforms such as YouTube, LinkedIn, and Amazon, exhibits a substantial decline on highly dynamic websites like Expedia. Overall, HxAgent demonstrates superior adaptability and generalization capabilities, maintaining high accuracy even in complex, multi-screen tasks that require sequential reasoning and action execution. Performance on OnlineMind2Web: Table 2 summarizes results on Online-Mind2Web dataset. HxAgent achieves 50.7% Exact-Match and 62.4% Prefix-Match over 285 tasks from 132 websites, consistently outperforming Li et al. and SeeAct across all difficulty levels. Its accuracy reaches 81.3% on easy, 40.7% on medium, and 30.0% on 5
Metrics Exact-Match (%)
Li (4o) 91.7%
SeeAct 69.9%
Ours 97.4%
WALT 86.9%
Table 4: Performance on 125 Challenging Task Instances (MiniWoB++). Tasks choose-date book-flight flight.AA flight.Alaska flight.Alaska-auto Total/Avg.
Ours 92.0 100.0 100.0 96.0 20.0 81.6 (±34.6)
Exact-Match (%) Li et al. SeeAct 24.0 0.0 24.0 0.0 0.0 40.0 0.0 0.0 0.0 0.0 9.6 (±13.1) 8.0 (±18)
WALT 0.0 0.0 0.0 0.0 0.0 0.0
Next-step Prediction Accuracy
Table 3: Action Sequence Generation on MiniWoB++. Exact-match (%), Correct runs (975 total).
1.0
79
52 66
32
0.8
16
11
8
7
5 3
0.6 0.4 0.2 2
Next-step Prediction Accuracy
0.0
2
4
6
8
Step
10
(a) Next-step Prediction. 1.0
pared to 10% for Li et al. and 8% for SeeAct. WALT struggles to perform these tasks. As shown in Table 3, SeeAct attains 69.9% Exact-Match overall but falls to 8% on complex tasks, limited to the flight.AA case. Its failures arise from difficulty handling datetime pickers, dropdowns, and icon-only buttons. In contrast, HxAgent exhibits superior robustness and accuracy on multi-step, dynamic tasks. Accuracy by Task Complexity: We evaluate HxAgent by task complexity, measured through action sequence length and actions per screen. Next-step prediction accuracy by SoA’s length. As seen in Fig. 2a, HxAgent achieves 100% firststep accuracy on MiniWoB++ and Real-world datasets, with a gradual decline as sequence length increases. A similar trend occurs in OnlineMind2Web, where Exact-Match drops from 81.3% (easy) to 40.7% (medium) and 30.0% (hard). Exact-Match sequence accuracy by number of actions per screen. In Fig. 2b, HxAgent maintains high Exact-Match even with up to 500 actions per screen. Performance decreases on long or dynamic tasks (e.g., pop-ups, date pickers, complex forms), with some outliers below 70%, mainly due to hidden options or invalid data generation. 5.2
Exact Match
0.8 0.6