Dynamic Web Element Locator Correction for Automation Testing
Find Innovative SolutionsGenerate Solutions
Solution Overview
Problem
Current automation testing solutions face challenges in reliably identifying web elements due to their dynamic nature, requiring frequent updates and relying heavily on skill-dependent string-based locators like XPath and CSS Selectors, which hampers consistency and efficiency in test case execution.
Innovation Solution
A system comprising an object identifier module with a locator generator, object structure generator, object spy, and data serializer, along with an automation engine and object repository, that generates hierarchical representations and corrects object locators on the fly during test execution, using XML Path Language (XPath) or Cascaded Style Sheet (CSS) Selectors to ensure accurate identification of web elements.
Engineering Contradictions & Design Principles
Engineering Contradiction Analysis
1Adaptability or versatility
If string-based locators (XPath, CSS Selector) are used to identify web elements, then the automation testing can be implemented, but the identification reliability deteriorates due to dynamic nature of web elements
Solution Approach 1:
The system dynamically adapts locators during test execution by detecting changes in web element attributes. The correction module continuously monitors and updates locator strategies based on current page state, transforming static locator definitions into dynamic identification mechanisms that respond to runtime changes.
Solution Approach 2:
The system implements feedback loops where test execution results are analyzed to detect locator failures. When elements are not found or attributes change, the system feeds this information back to automatically correct and update the locator definitions, creating a self-improving testing system.
2Ease of manufacture
If fixed locators are defined once and used multiple times, then the test case development is simplified, but the maintenance burden increases when page changes occur
Solution Approach 1:
The correction module enables self-service by automatically detecting and correcting broken locators without human intervention. When a locator fails during execution, the system autonomously analyzes the failure, identifies the correct element, and updates the locator definition, eliminating manual maintenance efforts.
Solution Approach 2:
The system performs preliminary actions by pre-defining multiple locator strategies for each element. When the primary locator fails, the system has already prepared alternative locators that can be immediately applied, preventing test execution interruptions and reducing maintenance overhead.
3Extent of automation
If skill-dependent locator identification is used, then the automation testing can be implemented, but the consistency deteriorates due to varying skill levels
Solution Approach 1:
The system introduces an intermediary correction module that sits between the test execution and the locator identification process. This intermediary automatically resolves inconsistencies by applying standardized correction algorithms, eliminating the impact of varying human skill levels on locator quality.
Solution Approach 2:
The system replaces the mechanical process of manual locator identification with automated algorithms. Instead of relying on human expertise to craft locators, the system uses programmatic approaches to generate and correct locators, ensuring consistent results regardless of operator skill level.
Data Source
AI summary
Disclosed are a system (100) and a method for an identification of web elements used in an automation test case. The system (100) and the method ensure reliable identification of an object despite dynamism. The system (100) and the method allow a tester to focus on the test case development of test cases rather than object management that in turn increases the success rate and efficiency of the automatic testing. The system (100) and the method track changes in object attributes, structure and behaviour thereby facilitating identification of dynamic objects automatically and correction of the object locator on the fly during test execution.


