Performance-Aware Adaptive Smart Wait Strategy for Reliable and Efficient Selenium Web Automation
Main Article Content
Abstract
The web automation is vulnerable to timing uncertainty created by asynchronous JavaScript, network variability, dynamic rendering, server load, and browser scheduling. In Selenium WebDriver, fixed sleeps and statically configured timeouts can either fail when a page is slower than expected or waste execution time when the page is faster than the chosen delay. This paper proposes a Performance-Aware Adaptive Smart Wait (PASW) strategy that dynamically estimates an element-specific wait budget from two complementary information sources: runtime page-performance signals and historical element-readiness behaviour. The framework combines navigation and rendering indicators, long-task/blocking behaviour, prior element readiness times, variability, and recent failures to calculate a bounded adaptive timeout before applying condition-aware WebDriver waits. A preliminary baseline obtained from the supplied GTmetrix assessment reports a Grade C, Performance score of 67%, Structure score of 89%, Largest Contentful Paint (LCP) of 2.7 s, Total Blocking Time (TBT) of 133 ms, and Cumulative Layout Shift (CLS) of 0. This baseline indicates that the test environment is suitable for studying the relationship between page responsiveness and automation synchronization. The proposed evaluation compares no-wait/fixed-sleep, implicit wait, explicit wait, fluent wait, and PASW under controlled network and server-load conditions. Primary outcomes are test success rate, flaky-failure rate, timeout frequency, element-wait duration, and total execution time. The study is designed to determine whether performance-aware adaptation can reduce unnecessary waiting while retaining or improving automation reliability.
