Browser Extension Selector Generation for Web Automation Testing
Find Innovative SolutionsGenerate Solutions
Solution Overview
Problem
Current automation testing tools for web applications require manual generation and rewriting of selectors, which is cumbersome, error-prone, and time-consuming, especially after website updates.
Innovation Solution
A browser extension that uses natural language processing and DOM inspection to automatically generate multiple types of selectors for webpage elements, including XPath and CSS selectors, and can generate code fragments for test scripts.
Engineering Contradictions & Design Principles
Engineering Contradiction Analysis
1Reliability
If manual generation and rewriting of selectors is performed, then accuracy and reliability of selectors can be maintained, but time consumption and labor intensity increase significantly
Solution Approach 1:
The system enables self-service by allowing the browser extension to automatically generate and update selectors without human intervention. The extension inspects the DOM structure, identifies target elements, and generates appropriate selectors (XPath, CSS) autonomously, eliminating the need for manual selector creation and maintenance while maintaining reliability through programmatic consistency
Solution Approach 2:
The patent replaces the mechanical manual process of selector generation with an automated computational system. The browser extension uses DOM inspection algorithms and selector generation logic to substitute human manual work, transforming a labor-intensive mechanical task into an automated computational process that reduces time consumption while maintaining selector accuracy
2Adaptability or versatility
If manual rewriting of selectors is performed after website updates, then selectors can be updated to reflect changes, but error rate and time consumption increase
Solution Approach 1:
The system implements feedback by automatically detecting changes in the DOM structure after website updates. The browser extension re-inspects the updated page, compares the new DOM structure with existing selectors, and identifies which selectors need updating. This feedback loop ensures selectors adapt to website changes automatically without manual intervention
Solution Approach 2:
The patent applies preliminary action by proactively generating updated selectors before they are needed for testing. When a website update occurs, the extension automatically inspects the new DOM structure and generates updated selectors in advance, so that when testing resumes, the selectors are already current and accurate, eliminating the need for manual rewriting
3Productivity
If automation testing tools are used, then testing efficiency is improved, but automatic selector generation capability is lacking
Solution Approach 1:
The patent applies universality by designing a browser extension that performs multiple functions: it can inspect DOM structures, generate various types of selectors (XPath, CSS), update existing selectors, and integrate with automation testing tools. This multi-functional tool eliminates the need for separate manual selector generation processes, fully automating the selector lifecycle while maintaining compatibility with existing testing frameworks
Data Source
AI summary
Described are methods and corresponding systems for generating and using selectors during web development. In some implementations, one or more natural language statements are obtained as input to a software application, for example, a web browser extension. The one or more input statements are analyzed, using natural language processing, to identify a first web element of a webpage and an action to be performed with respect to the first web element. A selector is then generated based on one or more attributes of the first web element. The selector operates as an address of the first web element and can, for example, be an XPath or CSS selector. To provide a user with access to the selector, the selector can be displayed on a user interface and/or saved to an output file. In some instances, the selector is generated as part of program code executable to perform the action.


