AutoMouser: AI Chrome extension that tracks user browser operations in real time and automatically generates automation scripts

Written by
Clara Bennett
Updated on:July-16th-2025
Recommendation

AutoMouser: Generate Selenium scripts with one click, an intelligent assistant for automated testing.
Core content:
1. Functions and technical details of the Chrome extension AutoMouser
2. Core functions of real-time interactive tracking and automatic code generation
3. Application and advantages of AutoMouser in automated testing

Yang Fangxian
Founder of 53AI/Most Valuable Expert of Tencent Cloud (TVP)

Quick Reading

  1. Function : Track user interaction behavior in real time and automatically generate Selenium test code.
  2. Technology : Based on OpenAI's GPT model, it supports multiple XPath generation strategies.
  3. Application : Suitable for automated test script generation and user interaction behavior recording.

Main text (with running examples)

What is AutoMouser

AutoMouser is a Chrome extension that intelligently tracks user browser actions, such as clicks, drags, and hovers, and converts these actions into clearly structured, easy-to-maintain Python Selenium scripts. By recording user interactions, AutoMouser simplifies the creation of automated tests and improves test efficiency.

The core function of AutoMouser is to automatically convert the user's browser operation into Selenium test code with the help of OpenAI's GPT model. This enables developers and test engineers to quickly generate automated test scripts, reducing the time and complexity of manually writing test scripts.

AutoMouser Key Features

  • Real-time interaction tracking : It can capture the user's browser operations in real time, including clicks, inputs, scrolling, etc., and accurately record the user's various interactive behaviors on the web page.
  • Automatic code generation : With the help of OpenAI's GPT model, recorded user operations are automatically converted into Selenium test code to generate Python Selenium scripts.
  • Intelligent input integration : Intelligently integrate user input operations, optimize code structure, and make the generated test scripts more concise and efficient.
  • Window size change detection : It can detect changes in the size of the browser window to ensure that the generated test code can adapt to different window sizes.
  • JSON action log export : supports exporting user interaction data into action log files in JSON format, making it easier for users to view, analyze and further process the original data.
  • Multiple XPath generation strategies : Using multiple XPath generation strategies can more accurately locate web page elements and improve the accuracy and reliability of testing.
  • Code structure optimization : The output Selenium test code structure is clear and neat, easy to read and understand, and convenient for developers to carry out subsequent development and maintenance work.

How to Run AutoMouser

1. Install the extension

  1. Visit the GitHub repository and clone it or download the source code.
  2. Open the Chrome browser and navigate tochrome://extensions/page.
  3. Enable "Developer Mode" in the upper right corner.
  4. Click "Load Unpacked" and select the extension directory.
  5. existbackground.jsConfigure your OpenAI API key in

2. Use extensions

  1. Click the AutoMouser icon in the Chrome toolbar to start recording.
  2. Perform the actions you want to automate.
  3. Click the icon again to stop recording and generate code.
  4. Download two files:tracking_log.json(raw interaction data) andselenium_test.py(Generated Selenium test script).
  5. Inspect and run the generated Selenium code in the Python environment