- Home
- Skills
- Testing & Debugging
- macuitest
macuitest
Drive and test native macOS applications using the accessibility tree and macuitest CLI.
Free
macuitest
Example session with this skill installed
I need to automate the macOS Calculator. Can you show me how to read the tree and press the '7' button using macuitest?
- Read your context and instructions
- Compiled the macuitest
I will inspect the Calculator's UI tree to find the stable locator for the '7' button and then provide the command to interact with it.
macOS Calculator Automation
To automate the Calculator, we first need to map the accessibility tree to identify the correct identifiers. Note that the Calculator window may need to be active to see all elements.
| Step | Command | Purpose |
|---|---|---|
| 1. Launch | macuitest launch Calculator | Ensures the application is running and in the foreground. |
| 2. Inspect | macuitest tree Calculator --activate | Prints the UI tree with ax() locators for every button. |
| 3. Interact | macuitest press Calculator 'ax(identifier="Seven", kind=Button)' | Sends a native press action to the '7' button. |
| 4. Verify | macuitest read Calculator 'ax(identifier="display", kind=StaticText)' | Confirms the result appears in the display area. |
Python Implementation
If you are building a reusable script, you can use the following structure:
from macuitest import App
calc = App("Calculator")
calc.launch()
# Using the locator identified from the tree command
seven_button = 'ax(identifier="Seven", kind=Button)'
calc.press(seven_button)
# Wait for the display to update
calc.wait('ax(value="7", kind=StaticText)', timeout=2)
print("Successfully pressed 7")
Next steps
- Run
macuitest tree Calculatorin your terminal to verify your specific macOS version uses the "Seven" identifier. - Grant Accessibility permissions to your terminal or IDE in System Settings.
- Use
macuitest capture Calculator --out calc_screen.pyto generate a page object module.
Connects securely to your tools. The creator never sees your data.
About this skill
Automating macOS desktop applications often fails when relying on brittle image recognition or coordinate-based clicks that break with theme changes. This skill provides the precise expertise needed to drive Mac apps via the native accessibility tree using the macuitest framework.
What it does
- UI Inspection Read the full accessibility tree to identify exact element locators.
- Reliable Interaction Use background-aware commands like
pressandsetthat don't require app focus. - Test Suite Authoring Generate reusable screen modules and Python-based UI test suites.
- Visual Verification Capture screenshots and perform visible-text matching for elements lacking accessibility labels.
- State Management Handle app lifecycles including launching, quitting, and managing modal dialogs.
How it works
- Inspection Run
macuitest tree <app>to map the UI and find stableax()locators. - Action Selection Choose between
pressfor background execution orclickfor elements without accessibility actions. - Scripting Use
macuitest captureto export locators into a Python module for structured testing. - Validation Confirm UI changes using
readorwaitcommands to ensure the application state reached the target.
Frameworks & tools
Specifically designed for the macuitest CLI and Python library (0.11.0+). It requires macOS and interacts with the native Accessibility and Screen Recording APIs.
Why this beats prompting it yourself
Generic AI models often hallucinate coordinates or suggest Selenium-style commands that don't work on Cocoa apps. This skill understands the specific nuances of the macOS accessibility tree, such as which elements require click versus press and how to avoid unstable AppKit identifiers.
Use cases
- Automate repetitive tasks in desktop apps like Calculator, TextEdit, or System Settings.
- Build regression test suites for native macOS software.
- Scrape data from desktop applications that lack a public API.
- Synchronize desktop app states as part of a larger system workflow.
Known limitations
Requires macOS Accessibility and Screen Recording permissions. Not compatible with web pages or iOS apps. Electron apps provide limited tree visibility and may require image-based fallbacks.
How to use
- 1
Connect your agent to the Agensi MCP
Copy the prompt and paste it into Claude, ChatGPT, Cursor or any agent that supports MCP. It sets up the connection for you. Manual setup
- 2
Sign in to Agensi
Your agent shows a sign-in link. Sign in and click Allow.
- 3
Ask for what you need
Your agent loads this skill and uses it on your task. It always asks before buying a skill.
Reviews
No reviews yet
Be one of the first to try it. Every listed skill goes through the trust checks below.
Security scanned
Checked by our 8-point scan before listing
Fresh listing
Recently published to Agensi
Free to use
No account required to browse
Trust & safety
Security scan
Security scan passed 11 days ago
- Free with an Agensi account
- Software
Python
Permissions
What's inside
Frequently Asked Questions
New in Testing & Debugging
Find more skills like this on the Claude Skills Marketplace, the Codex Skills Marketplace and the Gemini Skills Marketplace, or browse Claude Skills for Testing & Debugging.