Java Application Target Element Detection Using Reference Paths
Find Innovative SolutionsGenerate Solutions
Solution Overview
Problem
Existing methods for detecting target elements in Java applications, such as Java Accessibility API (JAAPI), are inefficient and time-consuming due to the need to scan all user interface elements, especially when the application hierarchy changes or elements have similar names but different functions.
Innovation Solution
A system and method that creates reference data by traversing from a target element to a root element, capturing attributes of elements along the path, and storing them for efficient detection using CSS notation, allowing for accurate detection by comparing attributes in a nested object entity.
Engineering Contradictions & Design Principles
Engineering Contradiction Analysis
1Measurement precision
If JAAPI uses GetVisibleChildren method to fetch all user interface elements, then the desired element can be found, but the detection time is excessive and the method is inefficient
Solution Approach 1:
The patent extracts only the necessary elements for detection by creating a reference data structure that stores specific attributes (name, role, description, position) of target elements and their ancestors, rather than fetching all user interface elements. This selective extraction significantly reduces detection time while maintaining accurate element identification.
Solution Approach 2:
The patent performs preliminary action by pre-processing and storing reference data including element attributes and their hierarchical relationships before actual detection occurs. This advance preparation creates a ready-to-use reference structure that enables rapid element detection without requiring full UI traversal during runtime.
2Reliability
If JAAPI scans all user interface elements to find the desired element, then the element can be detected, but the operation is time-consuming especially when hierarchy changes
Solution Approach 1:
The patent segments the element detection process into two distinct phases: reference data creation (pre-processing) and element detection (runtime). The reference data structure organizes element information in a hierarchical manner with clear parent-child relationships, enabling efficient navigation and comparison during detection without scanning the entire UI tree.
Solution Approach 2:
The patent creates a simplified copy of the UI hierarchy in the form of reference data, which contains essential attributes and relationships without the complexity of the full UI structure. This reference copy enables rapid comparison and detection by matching against the pre-processed data rather than traversing the actual UI elements during runtime.
3Measurement precision
If multiple elements have the same name or title but differ in operation, then the current method cannot detect the desired element accurately, but adding more distinguishing features increases complexity
Solution Approach 1:
The patent applies local quality by using multiple distinguishing attributes (name, role, description, position) specific to each element rather than relying on a single generic identifier. Each element in the reference data structure has its own unique combination of attributes, enabling precise differentiation between elements with similar names while maintaining a relatively simple overall system architecture.
Data Source
AI summary
A system (100) and a method (400) for detecting a target element in a Java application is disclosed. The system (100) comprises one or more user devices (110) in communication with a server (40). The user device comprises a processor configured to receive a selection of a target element via a user interface of the Java application. The processor is configured to traverse from the target element to a root element along a traversal path. The traversal path comprises elements. The processor is configured to determine one or more neighboring elements of the target element. The processor is configured to capture and store the elements and attributes of each of the elements on the traversal path and the one or more neighboring elements on the server (40), thereby creating reference data for enabling detection of the target element.


