docs.rs failed to build tauri-plugin-automation-server-0.1.0
Please check the build logs for more information.
See Builds for ideas on how to fix a failed build, or Metadata for how to configure docs.rs builds.
If you believe this is docs.rs' fault, open an issue.
Please check the build logs for more information.
See Builds for ideas on how to fix a failed build, or Metadata for how to configure docs.rs builds.
If you believe this is docs.rs' fault, open an issue.
Visit the last successful build:
tauri-plugin-automation-server-0.2.0
tauri-plugin-automation
HTTP automation server for Tauri apps. Enables external control and automated testing.
Why?
Tauri's WebDriver support doesn't work on macOS (WKWebView lacks a driver). This plugin provides a lightweight HTTP API alternative that works everywhere.
Features
- HTTP API on port 9876 for external control
- DOM commands: click, type, getText, navigate, waitFor, etc.
- Screenshots: Capture the current page as PNG
- Works on macOS: No WebDriver needed
- Scriptable: Perfect for automated testing tools
Installation
Rust
Add to your Cargo.toml:
[]
= { = "https://github.com/dcherrera/tauri-plugin-automation" }
Update your main.rs:
JavaScript
Copy guest-js/src/ to your project, or install from npm (when published):
Initialize in your app entry point:
import { initAutomation } from './automation' // or 'tauri-plugin-automation-api'
// After your app mounts
initAutomation()
API
Health Check
Execute Command
Screenshot
Available Commands
| Command | Args | Description |
|---|---|---|
navigate |
{path} |
Navigate to route |
click |
{selector} |
Click element |
type |
{selector, text} |
Type into input |
clear |
{selector} |
Clear input |
getText |
{selector} |
Get element text |
getValue |
{selector} |
Get input value |
getAttribute |
{selector, attribute} |
Get attribute |
exists |
{selector} |
Check if element exists |
waitFor |
{selector, timeout?} |
Wait for element |
select |
{selector, value} |
Select dropdown option |
check |
{selector} |
Check checkbox |
uncheck |
{selector} |
Uncheck checkbox |
getUrl |
- | Get current URL |
getTitle |
- | Get page title |
focus |
{selector} |
Focus element |
blur |
{selector} |
Blur element |
pressKey |
{key, selector?} |
Press keyboard key |
scrollTo |
{selector} |
Scroll to element |
submit |
{selector} |
Submit form |
wait |
{ms} |
Wait milliseconds |
eval |
{script} |
Execute JavaScript |
getElements |
{selector} |
Get all matching elements |
getHtml |
{selector?} |
Get element HTML |
Example: Automated Testing
=
# Navigate to login
# Fill form
# Submit
# Take screenshot to verify
=
Security
This plugin opens an HTTP server on localhost. For production:
- Disable in release builds using Cargo features:
[]
= [] # Don't include automation by default
= ["tauri-plugin-automation"]
- Only enable when needed:
License
MIT Transparency License - see LICENSE