SuperAPI AI Directory

AutoMouser - AI Chrome Extension, Automatically Generate Test Code with Real-Time Interaction Tracking

Author: AI小集 · Original source: AI工具集

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 users' browser actions, such as clicks, drags, hovers, etc., it converts them into well-structured, easy-to-maintain Python Selenium scripts, simplifying the process of creating automated tests.

Main Features of AutoMouser

  • Real-Time Interaction Tracking: It can capture users' browser actions in real time, including clicks, inputs, scrolling, etc., accurately recording various interaction behaviors on web pages, providing detailed operation data for automated testing.
  • Automatic Code Generation: With the help of OpenAI's GPT model, it automatically converts recorded user actions into Selenium test code, generating Python Selenium scripts, simplifying the process of creating automated tests, and improving testing efficiency.
  • Intelligent Input Integration: It intelligently integrates users' input actions and optimizes the code structure, making the generated test scripts more concise and efficient, and easier to maintain and modify later.
  • Window Size Change Detection: It can detect changes in the browser window size, ensuring that the generated test code can adapt to different window dimensions and improving test compatibility and stability.
  • JSON Action Log Export: It supports exporting users' interaction data as JSON-format action log files, making it convenient for users to view, analyze, and further process the raw data, and also facilitating test debugging and optimization.
  • Multiple XPath Generation Strategies: It adopts multiple XPath generation strategies, can locate web page elements more accurately, improves the accuracy and reliability of tests, and ensures the smooth execution of automated tests.
  • Code Structure Optimization: The output Selenium test code has a clear and tidy structure and is easy to read and understand, making it convenient for developers to carry out subsequent development and maintenance work, and helping to improve team collaboration efficiency.

AutoMouser Project Address

How to Use AutoMouser

  • Install the Extension:
    • 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 unpacked" and select the extension directory.
    • Configure your OpenAI API key in background.js.
  • Use the Extension:
    • Click the AutoMouser icon in the Chrome toolbar to start recording.
    • Perform the actions 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 (the generated Selenium test script).
    • Check and run the generated Selenium code in a Python environment.

Application Scenarios of AutoMouser

  • Automated Test Script Generation: Software developers and test engineers can quickly generate automated test scripts. By recording browser actions and converting them into Python Selenium scripts, they can simplify the test creation process and improve testing efficiency and accuracy.
  • User Interaction Behavior Recording: It can track user interactions such as clicks, inputs, and scrolling in real time, record these operations, and export the operation logs in JSON format, making it convenient to analyze and study user behavior.
  • Quick creation of test cases: It 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.