GUI Test Script Locator Self-Correction for Broken Selectors
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 used.
Innovation Solution
A test script correction device that includes a search command extension unit to use multiple locators and a locator correction unit to automatically correct broken locators by rewriting the source code, along with a locator rearrangement unit to prioritize robust locators based on their breakage history.
Engineering Contradictions & Design Principles
Engineering Contradiction Analysis
1Reliability
If multiple locators are used to capture screen elements, then the robustness of test scripts is improved, but the complexity of handling and maintaining locators increases
Solution Approach 1:
The system performs self-correction by automatically detecting broken locators and repairing them using alternative locators from the same element's attribute set, eliminating the need for manual intervention and reducing the burden of handling multiple locators
Solution Approach 2:
The system changes the state of locators by dynamically selecting and switching between different locator parameters (id, name, XPath, CSS selector) based on their operational status, allowing the test script to adapt to changes in the application under test
2Manufacturing precision
If locators are manually corrected when broken, then test script accuracy is maintained, but the maintenance labor and time consumption increase
Solution Approach 1:
The system automatically detects when a locator is broken during test execution and self-corrects by selecting an alternative locator from the same element's attribute set, eliminating manual correction efforts and reducing maintenance time
Solution Approach 2:
The system implements a feedback mechanism where test execution results are analyzed to identify broken locators, which then triggers an automatic correction process that uses feedback from alternative locators to repair the broken ones, creating a closed-loop system that continuously maintains accuracy
3Ease of repair
If conventional methods are used to handle broken locators, then some correction capability is provided, but automation efficiency is reduced due to lack of tooling
Solution Approach 1:
The system provides complete automation by implementing self-service correction capabilities that automatically detect, analyze, and repair broken locators without requiring any manual tooling or intervention, maximizing automation efficiency
Solution Approach 2:
The system introduces an intermediary correction mechanism that acts as a bridge between broken locators and alternative locators, automatically selecting and applying appropriate alternatives to repair broken locators, thereby enhancing automation without requiring manual tools
Data Source
AI summary
A test script correction device includes: a search command extension unit that captures a certain screen element by using each of a plurality of locators designated in a source code of a test script regarding a screen of an application; and a locator correction unit that corrects the source code so as to replace, among the plurality of locators, a value of a first locator that has failed to capture the certain screen element with a value of an attribute corresponding to a type of the first locator in the certain screen element, thereby improving efficiency of dealing with the plurality of locators.


