tauri-plugin-fanto 0.1.1

tauri plugin fantoccini integrated with webdriver-downloader
docs.rs failed to build tauri-plugin-fanto-0.1.1
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 fanto

Fantoccini integrated with webdriver downloader

Install

src-tauri/Cargo.toml

[dependencies]
tauri-plugin-fanto = "0.1.1"

Usage

src-tauri/src/main.rs

use tauri::AppHandle;
use tauri_plugin_fanto::{
    FantoExt,
    fantoccini::{
        Locator,
        key::Key,
    },
    Error,
};

#[tauri::command]
async fn greet(app: tauri::AppHandle) -> Result<(), Error> {
    let fanto = app.fanto();

    let driver = fanto.driver().await?;

    driver.goto("https://www.example.com").await?;
    driver.find(Locator::XPath("//a")).await?
        .click().await?;

    Ok(())
}

fn main() {
    tauri::Builder::default()
        .plugin(tauri_plugin_fanto::init())
        .invoke_handler(tauri::generate_handler![greet])
        .run(tauri::generate_context!())
        .expect("error while running tauri application");
}