AB
AiBoss
project

AutoMouser - An AI Chrome extension that provides real-time interactive tracking and automatically generates test code.

AutoMouser is a Chrome extension that intelligently tracks user interactions and automatically generates Selenium test code based on OpenAI's GPT model. It records user browser actions such as clicks, drags, and hovers...

What is AutoMouser?

AutoMouser is a Chrome extension that intelligently tracks user interactions and automatically generates Selenium test code based on OpenAI's GPT model. By recording user browser actions such as clicks, drags, and hovers, it transforms these actions into well-structured and easily maintainable Python Selenium scripts, simplifying the creation of automated tests.

AutoMouser's main functions

  • Real-time interactive trackingIt can capture users' browser operations in real time, including clicks, input, scrolling, etc., accurately recording various user interactions on web pages and providing detailed operational data for automated testing.
  • Automatic code generationBy leveraging OpenAI's GPT model, recorded user actions are automatically converted into Selenium test code, generating Python Selenium scripts, simplifying the creation process of automated tests and improving testing efficiency.
  • Intelligent input integrationIt intelligently integrates user input operations, optimizes code structure, and makes the generated test scripts more concise, efficient, and easier to maintain and modify.
  • Window size change detectionIt can detect changes in browser window size, ensuring that the generated test code can adapt to different window sizes, thus improving test compatibility and stability.
  • JSON Action Log ExportIt supports exporting user interaction data as JSON format action log files, making it convenient for users to view, analyze and further process the raw data, and also providing convenience for test debugging and optimization.
  • Multiple XPath generation strategiesEmploying multiple XPath generation strategies, it can more accurately locate web page elements, improve the accuracy and reliability of testing, and ensure the smooth execution of automated tests.
  • Code structure optimizationThe output Selenium test code has a clear and clean structure, is easy to read and understand, facilitates subsequent development and maintenance by developers, and helps improve team collaboration efficiency.

AutoMouser's project address

How to use AutoMouser

  • Install extensions:
    • Visit the GitHub repository, clone the repository, or download the source code.
    • Open the Chrome browser and navigate to the chrome://extensions/ page.
    • Enable "Developer mode" in the upper right corner.
    • Click "Load Unpackaged" and select the extended directory.
    • Configure your OpenAI API key in background.js.
  • Use extensions:
    • Click the AutoMouser icon in the Chrome toolbar to start recording.
    • Perform the operations you want to automate.
    • Click the icon again to stop recording and generate code.
    • Download two files: tracking_log.json (raw interaction data) and selenium_test.py (generated Selenium test script).
    • Inspect and run the generated Selenium code in a Python environment.

Application scenarios of AutoMouser

  • Automated test script generationSoftware developers and test engineers can quickly generate automated test scripts by recording browser operations and converting them into Python Selenium scripts, simplifying the test creation process and improving test efficiency and accuracy.
  • User interaction behavior logsIt can track users' clicks, inputs, scrolling and other interactive operations in real time, record these operations, and export the operation logs in JSON format, which facilitates the analysis and research of user behavior.
  • Quick creation of test casesIt helps testers quickly create test cases, reducing the time and complexity of manually writing test scripts, and is suitable for professionals who need to perform browser automation testing frequently.