Automated Object Locator Generation for Web Application Testing
Find Innovative SolutionsGenerate Solutions
Solution Overview
Problem
Existing automation testing methods for web applications rely on manual creation of object locators, which is error-prone, time-consuming, and requires significant updates when the application source code changes.
Innovation Solution
A method for automating the generation of object locators by parsing the web application's source code into a DOM tree structure, extracting attributes data, and using a classification model to determine unique attribute-value pairs for forming object locators.
Engineering Contradictions & Design Principles
Engineering Contradiction Analysis
1Productivity
If manual creation of object locators is used, then flexibility and adaptability are maintained, but the process is error-prone, time-consuming, and requires significant updates when application source code changes
Solution Approach 1:
The system automatically generates object locators by parsing the application source code and extracting attributes data, eliminating the need for manual creation. The automated process retrieves element information directly from the DOM tree structure, ensuring both speed and accuracy without human intervention errors.
Solution Approach 2:
The manual mechanical process of creating object locators is replaced with an automated computational system that uses parsing algorithms and classification models. This substitution transforms the error-prone manual workflow into a reliable automated process that consistently generates accurate object locators.
2Adaptability or versatility
If manual updates of object repository file are performed after source code changes, then adaptability to changes is maintained, but the process is cumbersome and time-consuming
Solution Approach 1:
The system performs preliminary automated generation of object locators based on the current source code structure before any testing occurs. This ensures the object repository is always up-to-date with the latest source code changes, eliminating the need for manual updates after modifications are made.
Solution Approach 2:
The automated system continuously monitors and updates object locators based on feedback from the source code structure. When source code changes occur, the system detects these changes and automatically regenerates the affected object locators, ensuring the repository remains synchronized without manual intervention.
3Reliability
If automated object locator generation is implemented, then error-free and efficient creation is achieved, but the system complexity increases
Solution Approach 1:
The automated system divides the complex task of object locator generation into discrete segments: parsing the source code into a DOM tree structure, extracting attributes data from each element, and generating object locators based on extracted information. This segmentation makes the complex process manageable and maintainable.
Solution Approach 2:
The DOM tree structure serves as an intermediary representation between the source code and the object locators. This intermediary layer simplifies the complexity by providing a standardized structure that facilitates automated extraction and generation processes without directly manipulating the original complex source code.
Data Source
AI summary
Automated maintenance of an object repository file for use in automation testing of a web application. A current instance of an identifier and current instance of an object locator, for an element of the application, are generated based on a current version of the application. If the current instance of the object locator is not found, but the current instance of the identifier is found, in historical data generated based on a historical version of the application, the element is marked for an update of its object locator. Historical attributes data of the element are updated with current attributes data extracted from a current version of the application; a new instance of the object locator for the element is generated based on the updated attributes data of the element; and the object repository file is updated using the new instance of the object locator for the element.


