GUI Test Script Locator Rewriting for Broken Selector Correction
Find Innovative SolutionsGenerate Solutions
Solution Overview
Problem
Existing test scripts for GUI applications require manual intervention to correct broken locators, which is inefficient and labor-intensive, especially when multiple locators are involved.
Innovation Solution
A test script correction device that automatically rewrites and rearranges locators in a test script using a search command conversion unit, locator correction unit, and locator rearrangement unit, enabling automatic correction and prioritization of robust locators.
Engineering Contradictions & Design Principles
Engineering Contradiction Analysis
1Reliability
If multiple locators are used to improve robustness of test scripts, then reliability is improved, but device complexity and ease of operation deteriorate due to manual management requirements
Solution Approach 1:
The system automatically generates multiple locators and performs self-correction when locators break. The correction apparatus monitors locator status and automatically creates alternative locators using different attributes (id, name, XPath, CSS selector) without requiring manual intervention, enabling the system to service itself.
Solution Approach 2:
The system changes the parameters used to define locators by switching between different attributes (id, name, XPath, CSS selector) and hierarchical levels (parent elements, child elements). When one locator breaks, the system modifies the locator parameters to create alternative identification methods for the same screen element.
2Reliability
If multiple locators are manually managed to correct broken locators, then reliability is improved, but productivity deteriorates due to labor-intensive maintenance
Solution Approach 1:
The correction apparatus automatically detects broken locators and generates correction scripts without human intervention. The system monitors test execution, identifies failed locators, and autonomously creates alternative locators by analyzing screen element attributes and generating code corrections.
Solution Approach 2:
The system replaces manual mechanical operations (manual locator creation and correction) with automated computational processes. The correction apparatus uses algorithms to analyze screen elements, generate multiple locator types, and automatically update test scripts, substituting human labor with automated software processes.
3Ease of operation
If a single locator is used in test scripts, then ease of operation is maintained, but reliability deteriorates when application changes occur
Solution Approach 1:
The system preliminarily generates multiple alternative locators before they are needed. When a locator breaks, the correction apparatus has pre-prepared alternative locators ready for immediate deployment, eliminating the need for reactive manual correction and ensuring continuous test execution.
Solution Approach 2:
The system maintains simplicity by changing locator parameters automatically rather than requiring multiple manual locators. When application changes occur, the correction apparatus modifies existing locator parameters (switching between id, name, XPath, CSS selector) to adapt to changes while maintaining the single-locator structure of the test script.
Data Source
AI summary
A test script correction device includes a search command conversion unit that rewrites one locator designated in a source code of a test script regarding a screen of an application by a plurality of locators based on values of a plurality of attributes of a certain element captured by using the one locator designated in the source code, thereby improving efficiency of dealing with the plurality of locators.


