Troubleshooting
Solutions for common issues when testing Tauri applications with WebdriverIO.
Driver Installation Issues
"tauri-driver not found"
The service cannot find the tauri-driver executable.
Solution 1: Enable Auto-Installation
services: [
['@wdio/tauri-service', {
autoInstallTauriDriver: true, // Requires Rust/cargo
}]
]
Solution 2: Manual Installation
# Install tauri-driver via cargo
cargo install tauri-driver
# Verify installation
which tauri-driver # macOS/Linux
where tauri-driver # Windows
Solution 3: Specify Path Manually
If installed in a non-standard location:
services: [
['@wdio/tauri-service', {
tauriDriverPath: '/custom/path/tauri-driver'
}]
]
"WebKitWebDriver not found" (Linux only)
WebKitWebDriver is not installed on your Linux system.
Supported Distributions
Install for your distribution:
# Debian/Ubuntu
sudo apt-get install -y webkit2gtk-driver
# Fedora 40+
sudo dnf install -y webkit2gtk-driver
# Arch Linux
sudo pacman -S webkit2gtk-4.1
# Void Linux
sudo xbps-install -y webkit2gtk-devel
Unsupported Distributions
- Alpine Linux: Cannot build Tauri apps (musl incompatibility). Use Ubuntu, Debian, Fedora, or Arch instead.
- CentOS/RHEL: Stream 9 has glib too old (requires 2.70+), Stream 10 removed WebKitGTK. Use Fedora 40+ instead.
- openSUSE/SUSE: No official WebKitWebDriver package. Building from source is complex and not recommended.
"MSEdgeDriver not found" (Windows only)
The Edge WebDriver for Windows is not found.
Solution 1: Enable Auto-Download
services: [
['@wdio/tauri-service', {
autoDownloadEdgeDriver: true // Default: true
}]
]
Solution 2: Manual Download
-
Check your WebView2 version:
- Build your app:
cargo build --release - Right-click the .exe → Properties → Details
- Note the "File version" (e.g., 143.0.3650.139)
- Build your app:
-
Download matching MSEdgeDriver from Microsoft Edge WebDriver
-
Add to PATH or specify in config:
services: [
['@wdio/tauri-service', {
autoDownloadEdgeDriver: false
}]
]
See Edge WebDriver (Windows) for detailed setup.
Plugin Issues
"Tauri plugin not available"
The plugin required for testing is not detected.
Check 1: Plugin Registered in Rust
Edit src-tauri/src/main.rs:
fn main() {
tauri::Builder::default()
.plugin(tauri_plugin_wdio::init()) // This line required
.run(tauri::generate_context!())
.expect("error while running tauri application");
}
Check 2: Frontend Import Present
Ensure the import is in your HTML or main JS file:
<script type="module">
import '@wdio/tauri-plugin';
</script>
Check 3: withGlobalTauri Enabled
Edit src-tauri/tauri.conf.json:
{
"app": {
"withGlobalTauri": true
}
}
Check 4: Permissions Configured
Edit src-tauri/capabilities/default.json:
{
"permissions": [
"core:default",
"core:window:default",
"wdio:default"
]
}
Check 5: Rebuild Application
cd src-tauri
cargo clean
cargo build --release
See Plugin Setup for complete installation guide.
"window.wdioTauri is undefined"
The frontend plugin didn't initialize.
Solution 1: Add Delay for Initialization
it('should have plugin', async () => {
// Wait for plugin to initialize
await browser.pause(500);
const hasPlugin = await browser.tauri.execute(() => {
return typeof window.wdioTauri !== 'undefined';
});
expect(hasPlugin).toBe(true);
});
Solution 2: Check Import Timing
Make sure the plugin is imported before tests run:
- In
index.htmlfor standard Tauri apps - In your main framework entry point (main.ts, main.js)
- Not inside an iframe or separate context
Solution 3: Verify Plugin Loaded
it('should verify plugin is available', async () => {
const available = await browser.tauri.execute(() => {
return 'wdioTauri' in window;
});
expect(available).toBe(true);
});