Automation Tag Generation for Dynamic Third-Party UI Elements
Find Innovative SolutionsGenerate Solutions
Solution Overview
Problem
Developers face challenges in writing automation scripts for applications using third-party open source packages due to abstracted source code, making it difficult to access underlying elements for testing, especially for dynamic UI components that render data asynchronously.
Innovation Solution
A framework dynamically generates unique automation tags for third-party components, including children elements, ensuring consistency across reloads and handling asynchronous data, by analyzing HTML files and adding tags as attributes, leveraging MutationObservers for dynamic elements.
Engineering Contradictions & Design Principles
Engineering Contradiction Analysis
1Productivity
If third-party open source packages are used to develop application functionality, then development efficiency is improved, but automation testing becomes difficult due to abstracted source code
Solution Approach 1:
The patent introduces an intermediary mechanism (automation tag generation system) that bridges the gap between third-party components with abstracted code and the automation testing framework. This system injects automation tags into the DOM elements of third-party components, enabling test automation without requiring access to the underlying source code.
2Adaptability or versatility
If source code is abstracted in third-party packages, then code reusability is improved, but access to underlying elements for testing is lost
Solution Approach 1:
The patent creates a virtual copy of the element identification system by injecting automation tags that replicate the functionality of unique element identifiers. These tags serve as proxies for the actual element identities, allowing automation scripts to reference and interact with elements without needing to access or modify the abstracted source code.
3Adaptability or versatility
If dynamic UI components render data asynchronously, then user interface flexibility is improved, but consistent automation tag generation becomes challenging
Solution Approach 1:
The patent implements preliminary action by pre-defining automation tag generation rules and structures before the asynchronous data arrives. The system establishes a framework that can dynamically assign consistent tags based on predefined patterns, ensuring that even as data loads asynchronously, the automation tags maintain consistency and uniqueness throughout the rendering process.
Data Source
AI summary
Systems and methods are provided for analyzing an HTML file to identify elements in the HTML file to which to add unique automation tags, and for each element identified, determining whether the element is a dynamic element. If the system determines that an element is a dynamic element, the system generates an observer for the dynamic element to detect a change to the dynamic element, and if the system detects a signal sent by the observer indicating that a change to the dynamic element has occurred, the system generates a unique automation tag for an element corresponding to the change to the dynamic element. If the system determines that the element is not a dynamic element, the system generates a unique automation tag for the element.


