tauri-plugin-automation 0.1.2

Tauri plugin for automation via WebDriver
docs.rs failed to build tauri-plugin-automation-0.1.2
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.

tauri-plugin-automation

Enable cross-platform integration tests for Tauri apps using CrabNebula Webdriver for Tauri.

Installation

DO NOT include the automation plugin for production builds. This kind of instrumentation should only be available for test-only builds.

  • Install the plugin crate:
cd src-tauri
cargo add tauri-plugin-automation 
  • Register the plugin:

Make sure you register the plugin as early as possible using tauri::Builder::plugin instead of AppHandle#plugin so it is ready when your app starts.

ALWAYS use a conditional compilation check to make sure the automation plugin is not added for production builds.

let mut builder = tauri::Builder::default();
#[cfg(debug_assertions)] // alternatively: #[cfg(feature = "automation")]
{
  builder = builder.plugin(tauri_plugin_automation::init());
}

builder
  .run(tauri::generate_context!())
  .expect("error while running tauri application");