PageSourceSearch

https://webdriver.io/assets/js/b906b1bf.9f6c2687.js

js webdriver.io collected 2026-09-24 08:32:44 UTC 24,612 bytes, 1 lines download raw bytes

1"use strict";(self.webpackChunkwebsite=self.webpackChunkwebsite||[]).push([[5513],{22002:(e,n,i)=>{i.d(n,{R:()=>a,x:()=>l});var r=i(7378);const s={},t=r.createContext(s);function a(e){const n=r.useContext(t);return r.useMemo(function(){return"function"==typeof e?e(n):{...n,...e}},[n,e])}function l(e){let n;return n=e.disableParentContext?"function"==typeof e.components?e.components(s):e.components||s:a(e.components),r.createElement(t.Provider,{value:n},e.children)}},30595:(e,n,i)=>{i.r(n),i.d(n,{assets:()=>d,contentTitle:()=>l,default:()=>u,frontMatter:()=>a,metadata:()=>r,toc:()=>o});const r=JSON.parse('{"id":"desktop-testing/tauri/quick-start","title":"Quick Start","description":"Get up and running with WebdriverIO and Tauri E2E testing in minutes.","source":"@site/docs/desktop-testing/tauri/quick-start.md","sourceDirName":"desktop-testing/tauri","slug":"/desktop-testing/tauri/quick-start","permalink":"/docs/desktop-testing/tauri/quick-start","draft":false,"unlisted":false,"editUrl":"https://github.com/webdriverio/desktop-mobile/edit/main/packages/tauri-service/docs/quick-start.md","tags":[],"version":"current","frontMatter":{"id":"quick-start","title":"Quick Start","custom_edit_url":"https://github.com/webdriverio/desktop-mobile/edit/main/packages/tauri-service/docs/quick-start.md"},"sidebar":"docs","previous":{"title":"Tauri","permalink":"/docs/desktop-testing/tauri"},"next":{"title":"Configuration","permalink":"/docs/desktop-testing/tauri/configuration"}}');var s=i(86106),t=i(22002);const a={id:"quick-start",title:"Quick Start",custom_edit_url:"https://github.com/webdriverio/desktop-mobile/edit/main/packages/tauri-service/docs/quick-start.md"},l=void 0,d={},o=[{value:"Prerequisites",id:"prerequisites",level:2},{value:"Required Software",id:"required-software",level:3},{value:"Platform-Specific Requirements",id:"platform-specific-requirements",level:3},{value:"Windows",id:"windows",level:4},{value:"Linux",id:"linux",level:4},{value:"macOS",id:"macos",level:4},{value:"Setting Up a Tauri App",id:"setting-up-a-tauri-app",level:2},{value:"Fastest Way: Use Tauri CLI",id:"fastest-way-use-tauri-cli",level:3},{value:"Manual Setup",id:"manual-setup",level:3},{value:"Essential Files",id:"essential-files",level:3},{value:"Tauri Plugin Setup",id:"tauri-plugin-setup",level:2},{value:"Complete Plugin Setup",id:"complete-plugin-setup",level:3},{value:"Building the Tauri App",id:"building-the-tauri-app",level:2},{value:"WebdriverIO Installation",id:"webdriverio-installation",level:2},{value:"1. Install WebdriverIO",id:"1-install-webdriverio",level:3},{value:"2. Initialize Configuration",id:"2-initialize-configuration",level:3},{value:"3. Create a Test",id:"3-create-a-test",level:3},{value:"Running Tests",id:"running-tests",level:2},{value:"Run All Tests",id:"run-all-tests",level:3},{value:"Run Specific Test File",id:"run-specific-test-file",level:3},{value:"Run in Watch Mode",id:"run-in-watch-mode",level:3},{value:"Run with Debug Logging",id:"run-with-debug-logging",level:3},{value:"Troubleshooting",id:"troubleshooting",level:2},{value:""Cannot find module '@wdio/tauri-plugin'"",id:"cannot-find-module-wdiotauri-plugin",level:3},{value:""tauri-driver not found" or "No driverProvider configured"",id:"tauri-driver-not-found-or-no-driverprovider-configured",level:3},{value:""Application not found at path"",id:"application-not-found-at-path",level:3},{value:"Tests timeout on Windows",id:"tests-timeout-on-windows",level:3},{value:""Test failed with Firefox" Error",id:"test-failed-with-firefox-error",level:3},{value:"Next Steps",id:"next-steps",level:2},{value:"Common Patterns",id:"common-patterns",level:2},{value:"Test Custom Tauri Commands",id:"test-custom-tauri-commands",level:3},{value:"Capture Logs",id:"capture-logs",level:3},{value:"Multiremote Testing",id:"multiremote-testing",level:3},{value:"CI/CD Integration",id:"cicd-integration",level:3},{value:"See Also",id:"see-also",level:2}];function c(e){const n={a:"a",code:"code",h2:"h2",h3:"h3",h4:"h4",li:"li",ol:"ol",p:"p",pre:"pre",strong:"strong",ul:"ul",...(0,t.R)(),...e.components};return(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(n.p,{children:"Get up and running with WebdriverIO and Tauri E2E testing in minutes."}),"\n",(0,s.jsx)(n.h2,{id:"prerequisites",children:"Prerequisites"}),"\n",(0,s.jsx)(n.h3,{id:"required-software",children:"Required Software"}),"\n",(0,s.jsxs)(n.ol,{children:["\n",(0,s.jsxs)(n.li,{children:["\n",(0,s.jsxs)(n.p,{children:[(0,s.jsx)(n.strong,{children:"Node.js 18+"})," - Download from ",(0,s.jsx)(n.a,{href:"https://nodejs.org",children:"nodejs.org"})]}),"\n"]}),"\n",(0,s.jsxs)(n.li,{children:["\n",(0,s.jsxs)(n.p,{children:[(0,s.jsx)(n.strong,{children:"Rust Toolchain"})," - Required for building Tauri apps and tauri-driver"]}),"\n",(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{className:"language-bash",children:"curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh\n"})}),"\n"]}),"\n",(0,s.jsxs)(n.li,{children:["\n",(0,s.jsxs)(n.p,{children:[(0,s.jsx)(n.strong,{children:"Tauri CLI"})," - Install globally or as dev dependency"]}),"\n",(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{className:"language-bash",children:"npm install -g @tauri-apps/cli\n# or\ncargo install tauri-cli\n"})}),"\n"]}),"\n"]}),"\n",(0,s.jsx)(n.h3,{id:"platform-specific-requirements",children:"Platform-Specific Requirements"}),"\n",(0,s.jsx)(n.h4,{id:"windows",children:"Windows"}),"\n",(0,s.jsxs)(n.ul,{children:["\n",(0,s.jsxs)(n.li,{children:[(0,s.jsx)(n.strong,{children:"Microsoft Visual C++ Build Tools"})," - Download from ",(0,s.jsx)(n.a,{href:"https://visualstudio.microsoft.com/visual-cpp-build-tools/",children:"Microsoft Visual C++"})]}),"\n",(0,s.jsxs)(n.li,{children:[(0,s.jsx)(n.strong,{children:"Edge WebDriver"})," - Auto-managed by the service (see ",(0,s.jsx)(n.a,{href:"/docs/desktop-testing/tauri/edge-webdriver-windows",children:"Edge WebDriver Windows"}),")"]}),"\n"]}),"\n",(0,s.jsx)(n.h4,{id:"linux",children:"Linux"}),"\n",(0,s.jsxs)(n.ul,{children:["\n",(0,s.jsxs)(n.li,{children:[(0,s.jsx)(n.strong,{children:"WebKitGTK Development Libraries"})," - Install WebKitWebDriver","\n",(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{className:"language-bash",children:"# Debian/Ubuntu\nsudo apt-get install -y webkit2gtk-driver\n\n# Fedora 40+\nsudo dnf install -y webkit2gtk-driver\n\n# Arch Linux\nsudo pacman -S webkit2gtk-4.1\n\n# V
1oid Linux\nsudo xbps-install -y webkit2gtk-devel\n"})}),"\n"]}),"\n"]}),"\n",(0,s.jsxs)(n.p,{children:["See ",(0,s.jsx)(n.a,{href:"/docs/desktop-testing/tauri/platform-support",children:"Platform Support"})," for detailed distribution support information."]}),"\n",(0,s.jsx)(n.h4,{id:"macos",children:"macOS"}),"\n",(0,s.jsxs)(n.p,{children:["\u2705 ",(0,s.jsx)(n.strong,{children:"Supported"})," - Use the embedded WebDriver provider (",(0,s.jsx)(n.code,{children:"driverProvider: 'embedded'"}),") for native macOS testing without external dependencies. See ",(0,s.jsx)(n.a,{href:"/docs/desktop-testing/tauri/platform-support",children:"Platform Support"})," for details."]}),"\n",(0,s.jsx)(n.h2,{id:"setting-up-a-tauri-app",children:"Setting Up a Tauri App"}),"\n",(0,s.jsx)(n.h3,{id:"fastest-way-use-tauri-cli",children:"Fastest Way: Use Tauri CLI"}),"\n",(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{className:"language-bash",children:"npm create tauri-app@latest\n"})}),"\n",(0,s.jsx)(n.p,{children:"Follow the prompts and select your preferred frontend framework."}),"\n",(0,s.jsx)(n.h3,{id:"manual-setup",children:"Manual Setup"}),"\n",(0,s.jsx)(n.p,{children:"Create a minimal Tauri app:"}),"\n",(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{className:"language-bash",children:'mkdir my-tauri-app\ncd my-tauri-app\n\n# Create frontend (use any framework or plain HTML)\nmkdir src\necho \'<h1>Hello, Tauri!</h1>\' > src/index.html\n\n# Create Rust backend\ncargo init --name my_app src-tauri\ncd src-tauri\n\n# Add Tauri to Cargo.toml\n# [depen
1dencies]\n# tauri = { version = "2.9", features = ["shell-open"] }\n# tauri-build = "2.0"\n'})}),"\n",(0,s.jsx)(n.h3,{id:"essential-files",children:"Essential Files"}),"\n",(0,s.jsx)(n.p,{children:"Create the minimal required files for a Tauri app:"}),"\n",(0,s.jsx)(n.p,{children:(0,s.jsx)(n.strong,{children:(0,s.jsx)(n.code,{children:"src-tauri/src/main.rs"})})}),"\n",(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{className:"language-rust",children:'#![cfg_attr(not(debug_assertions), windows_subsystem = "windows")]\n\nfn main() {\n    tauri::Builder::default()\n        .run(tauri::generate_context!())\n        .expect("error while running tauri application");\n}\n'})}),"\n",(0,s.jsx)(n.p,{children:(0,s.jsx)(n.strong,{children:(0,s.jsx)(n.code,{children:"src-tauri/tauri.conf.json"})})}),"\n",(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{className:"language-json",children:'{\n  "$schema": "https://schema.tauri.app/config/2",\n  "productName": "my-app",\n  "version": "0.1.0",\n  "identifier": "com.mycompany.myapp",\n  "build": {\n    "frontendDist": "../src",\n    "beforeDevCommand": "echo \'dev server running\'",\n    "beforeBuildCommand": "echo \'building frontend\'"\n  },\n  "app": {\n    "withGlobalTauri": true,\n    "windows": [\n      {\n        "title": "My App",\n        "width": 800,\n        "height": 600\n      }\n    ]\n  }\n}\n'})}),"\n",(0,s.jsxs)(n.p,{children:[(0,s.jsx)(n.strong,{children:(0,s.jsx)(n.code,{children:"src-tauri/Cargo.toml"})})," - Add:"]}),"\n",(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{className:"language-toml",children:'[depen
1dencies]\ntauri = { version = "2", features = [] }\ntauri-plugin-wdio = "1"\n\n[build-dependencies]\ntauri-build = "2"\n'})}),"\n",(0,s.jsx)(n.p,{children:(0,s.jsx)(n.strong,{children:(0,s.jsx)(n.code,{children:"src-tauri/build.rs"})})}),"\n",(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{className:"language-rust",children:"fn main() {\n    tauri_build::build()\n}\n"})}),"\n",(0,s.jsx)(n.h2,{id:"tauri-plugin-setup",children:"Tauri Plugin Setup"}),"\n",(0,s.jsxs)(n.p,{children:["\u26a0\ufe0f ",(0,s.jsx)(n.strong,{children:"The tauri-plugin-wdio is required for testing"})," - Skip this section only if you want basic WebDriver operations without mocking or log capture."]}),"\n",(0,s.jsx)(n.h3,{id:"complete-plugin-setup",children:"Complete Plugin Setup"}),"\n",(0,s.jsxs)(n.ol,{children:["\n",(0,s.jsxs)(n.li,{children:["\n",(0,s.jsxs)(n.p,{children:[(0,s.jsx)(n.strong,{children:"Already added to Cargo.toml"})," (see above)"]}),"\n"]}),"\n",(0,s.jsxs)(n.li,{children:["\n",(0,s.jsx)(n.p,{children:(0,s.jsxs)(n.strong,{children:["Register in ",(0,s.jsx)(n.code,{children:"src-tauri/src/main.rs"})]})}),"\n"]}),"\n"]}),"\n",(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{className:"language-rust",children:'fn main() {\n    tauri::Builder::default()\n        .plugin(tauri_plugin_wdio::init())  // Add this line\n        .run(tauri::generate_context!())\n        .expect("error while running tauri application");\n}\n'})}),"\n",(0,s.jsxs)(n.ol,{start:"3",children:["\n",(0,s.jsx)(n.li,{children:(0,s.jsxs)(n.strong,{children:["Create ",(0,s.jsx)(n.code,{children:"src-tauri/capabilities/default.json"})]})}),"\n"]}),"\n",(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{className:"language-json",children:'{\n  "identifier": "default",\n  "windows": ["main"],\n  "permissions": [\n    "core:default",\n    "core:window:default",\n    "wdio:default"\n  ]\n}\n'})}),"\n",(0,s.jsxs)(n.ol,{start:"4",children:["\n",(0,s.jsx)(n.li,{children:(0,s.jsxs)(n.strong,{children:["Import frontend plugin in ",(0,s.jsx)(n.code,{children:"src/index.html"})]})}),"\n"]}),"\n",(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{className:"language-html",children:'<!DOCTYPE html>\n<html>\n  <head>\n    <meta charset="UTF-8" />\n    <title>My App</title>\n  </head>\n  <body>\n    <h1>Hello, Tauri!</h1>\n\n    \x3c!-- Import WebdriverIO Tauri plugin (required for testing) --\x3e\n    <script type="module">\n      import \'@wdio/tauri-plugin\';\n    <\/script>\n  </body>\n</html>\n'})}),"\n",(0,s.jsxs)(n.p,{children:["For detailed plugin setup and troubleshooting, see ",(0,s.jsx)(n.a,{href:"/docs/desktop-testing/tauri/plugin-setup",children:"Plugin Setup"}),"."]}),"\n",(0,s.jsx)(n.h2,{id:"building-the-tauri-app",children:"Building the Tauri App"}),"\n",(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{className:"language-bash",children:"# Build for release (required for testing with WebdriverIO)\ncd src-tauri\ncargo build --release\n"})}),"\n",(0,s.jsx)(n.p,{children:"On macOS/Linux, you'll also need to give the app executable permissions:"}),"\n",(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{className:"language-bash",children:"chmod +x target/release/my_app  # Linux/macOS\n# or on Windows:\n# target\\release\\my_app.exe\n"})}),"\n",(0,s.jsx)(n.h2,{id:"webdriverio-installation",children:"WebdriverIO Installation"}),"\n",(0,s.jsx)(n.h3,{id:"1-install-webdriverio",children:"1. Install WebdriverIO"}),"\n",(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{className:"language-bash",children:"npm install --save-dev @wdio/cli @wdio/tauri-service\n"})}),"\n",(0,s.jsx)(n.h3,{id:"2-initialize-configuration",children:"2. Initialize Configuration"}),"\n",(0,s.jsx)(n.p,{children:"Use the WebdriverIO CLI setup wizard:"}),"\n",(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{className:"language-bash",children:"npx wdio config\n"})}),"\n",(0,s.jsxs)(n.p,{children:["Or manually create ",(0,s.jsx)(n.code,{children:"wdio.conf.ts"}),":"]}),"\n",(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{className:"language-typescript",children:"export const config = {\n  runner: 'local',\n  specs: ['./test/specs/**/*.spec.ts'],\n  maxInstances: 1,\n\n  // Tauri service configuration\n  services: [['@wdio/tauri-service', {\n    appBinaryPath: './src-tauri/target/release/my-app.exe', // Adjust for your OS/app name\n    driverProvider: 'embedded',  // Use embedded WebDriver (recommended, no external drivers needed)\n    // driverProvider: 'official',  // Use external tauri-driver (explicit opt-in)\n    // driverProvider: 'crabnebula',  // Use CrabNebula (requires paid API key)\n  }]],\n\n  // Capabilities\n  capabilities: [{\n    browserName: 'tauri',\n    'tauri:options': {\n      application: './src-tauri/target/release/my-app.exe',  // Path to built binary\n    },\n  }],\n\n  // Logging\n  logLevel: 'info',\n  bail: 0,\n  baseUrl: 'http://localhost:4444',\n  waitforTimeout: 10000,\n  connectionRetryTimeout: 90000,\n  connectionRetryCount: 3,\n\n  // Test configuration\n  framework: 'mocha',\n  mochaOpts: {\n    ui: 'bdd',\n    timeout: 60000,\n  },\n};\n"})}),"\n",(0,s.jsx)(n.h3,{id:"3-create-a-test",children:"3. Create a Test"}),"\n",(0,s.jsxs)(n.p,{children:["Create ",(0,s.jsx)(n.code,{children:"test/specs/example.spec.ts"}),":"]}),"\n",(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{className:"language-typescript",children:"describe('My Tauri App', () => {\n  it('should display hello world', async () => {\n    // Wait for the app to fully load\n    await browser.pause(500);\n\n    // Find and check a heading\n    const heading = await browser.$('h1');\n    expect(await heading.getText()).toBe('Hello, Tauri!');\n  });\n\n  it('should execute Tauri commands', async () => {\n    // Execute JavaScript in the Tauri frontend context with access to Tauri APIs\n    const result = await browser.tauri.execute(({ core }) =>
1 {\n      return core.invoke('get_platform_info');\n    });\n\n    console.log('Platform info:', result);\n  });\n\n  it('should mock Tauri commands', async () => {\n    // Mock a Tauri command\n    const mock = await browser.tauri.mock('get_user');\n    await mock.mockReturnValue({ id: 1, name: 'Test User' });\n\n    // Execute code that uses the mocked command\n    const user = await browser.tauri.execute(({ core }) => {\n      return core.invoke('get_user');\n    });\n\n    expect(user).toEqual({ id: 1, name: 'Test User' });\n  });\n});\n"})}),"\n",(0,s.jsx)(n.h2,{id:"running-tests",children:"Running Tests"}),"\n",(0,s.jsx)(n.h3,{id:"run-all-tests",children:"Run All Tests"}),"\n",(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{className:"language-bash",children:"npx wdio run wdio.conf.ts\n"})}),"\n",(0,s.jsx)(n.h3,{id:"run-specific-test-file",children:"Run Specific Test File"}),"\n",(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{className:"language-bash",children:"npx wdio run wdio.conf.ts --spec test/specs/example.spec.ts\n"})}),"\n",(0,s.jsx)(n.h3,{id:"run-in-watch-mode",children:"Run in Watch Mode"}),"\n",(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{className:"language-bash",children:"npx wdio run wdio.conf.ts --watch\n"})}),"\n",(0,s.jsx)(n.h3,{id:"run-with-debug-logging",children:"Run with Debug Logging"}),"\n",(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{className:"language-bash",children:"npx wdio run wdio.conf.ts --logLevel debug\n"})}),"\n",(0,s.jsx)(n.h2,{id:"troubleshooting",children:"Troubleshooting"}),"\n",(0,s.jsx)(n.h3,{id:"cannot-find-module-wdiotauri-plugin",children:"\"Cannot find module '@wdio/tauri-plugin'\""}),"\n",(0,s.jsx)(n.p,{children:"The frontend plugin import is failing. Make sure:"}),"\n",(0,s.jsxs)(n.ol,{children:["\n",(0,s.jsxs)(n.li,{children:["\n",(0,s.jsx)(n.p,{children:"Install the peer dependencies:"}),"\n",(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{className:"language-bash",children:"npm install --save-dev @wdio/tauri-plugin\n"})}),"\n"]}),"\n",(0,s.jsxs)(n.li,{children:["\n",(0,s.jsx)(n.p,{children:"The import is in your HTML/JS entry point before tests run"}),"\n"]}),"\n"]}),"\n",(0,s.jsx)(n.h3,{id:"tauri-driver-not-found-or-no-driverprovider-configured",children:'"tauri-driver not found" or "No driverProvider configured"'}),"\n",(0,s.jsx)(n.p,{children:"The service couldn't determine which driver to use, or couldn't find tauri-driver. Solutions:"}),"\n",(0,s.jsxs)(n.ol,{children:["\n",(0,s.jsxs)(n.li,{children:["\n",(0,s.jsxs)(n.p,{children:[(0,s.jsx)(n.strong,{children:"Use embedded provider"})," (no external driver needed):"]}),"\n",(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{className:"language-typescript",children:"driverProvider: 'embedded'\n"})}),"\n",(0,s.jsxs)(n.p,{children:["Requires ",(0,s.jsx)(n.code,{children:"tauri-plugin-wdio-webdriver"})," in your Tauri app. On macOS this is auto-detected."]}),"\n"]}),"\n",(0,s.jsxs)(n.li,{children:["\n",(0,s.jsxs)(n.p,{children:[(0,s.jsx)(n.strong,{children:"Install tauri-driver manually"})," (if using ",(0,s.jsx)(n.code,{children:"driverProvider: 'official'"}),"):"]}),"\n",(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{className:"language-bash",children:"cargo install tauri-driver\n"})}),"\n"]}),"\n",(0,s.jsxs)(n.li,{children:["\n",(0,s.jsxs)(n.p,{children:[(0,s.jsx)(n.strong,{children:"Or enable auto-install"})," in ",(0,s.jsx)(n.code,{children:"wdio.conf.ts"}),":"]}),"\n",(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{className:"language-typescript",children:"driverProvider: 'official',\nautoInstallTauriDriver: true\n"})}),"\n"]}),"\n"]}),"\n",(0,s.jsx)(n.h3,{id:"application-not-found-at-path",children:'"Application not found at path"'}),"\n",(0,s.jsxs)(n.p,{children:["The ",(0,s.jsx)(n.code,{children:"appBinaryPath"})," is wrong. Verify:"]}),"\n",(0,s.jsxs)(n.ol,{children:["\n",(0,s.jsxs)(n.li,{children:["You built the app in release mode: ",(0,s.jsx)(n.code,{children:"cargo build --release"})]}),"\n",(0,s.jsxs)(n.li,{children:["The path exists: ",(0,s.jsx)(n.code,{children:"./src-tauri/target/release/my-app.exe"})]}),"\n",(0,s.jsxs)(n.li,{children:["Update the path in ",(0,s.jsx)(n.code,{children:"wdio.conf.ts"})," if needed"]}),"\n"]}),"\n",(0,s.jsx)(n.h3,{id:"tests-timeout-on-windows",children:"Tests timeout on Windows"}),"\n",(0,s.jsx)(n.p,{children:"Edge WebDriver version mismatch. The service auto-manages this, but if issues persist:"}),"\n",(0,s.jsxs)(n.ol,{children:["\n",(0,s.jsxs)(n.li,{children:["See ",(0,s.jsx)(n.a,{href:"/docs/desktop-testing/tauri/edge-webdriver-windows",children:"Edge WebDriver (Windows)"})]}),"\n",(0,s.jsx)(n.li,{children:"Check your Edge version: Settings \u2192 About Microsoft Edge"}),"\n",(0,s.jsx)(n.li,{children:"Verify the driver version matches"}),"\n"]}),"\n",(0,s.jsx)(n.h3,{id:"test-failed-with-firefox-error",children:'"Test failed with Firefox" Error'}),"\n",(0,s.jsxs)(n.p,{children:["Make sure you're using ",(0,s.jsx)(n.code,{children:"browserName: 'tauri'"})," in capabilities, not other browsers."]}),"\n",(0,s.jsx)(n.h2,{id:"next-steps",children:"Next Steps"}),"\n",(0,s.jsxs)(n.ol,{children:["\n",(0,s.jsxs)(n.li,{children:[(0,s.jsx)(n.strong,{children:"Add more tests"})," - See ",(0,s.jsx)(n.a,{href:"/docs/desktop-testing/tauri/usage-examples",children:"Usage Examples"})," for patterns"]}),"\n",(0,s.jsxs)(n.li,{children:[(0,s.jsx)(n.strong,{children:"Advanced features"})," - Read about ",(0,s.jsx)(n.a,{href:"/docs/desktop-testing/tauri/api#mock-functions",children:"Mocking"})," and ",(0,s.jsx)(n.a,{href:"/docs/desktop-testing/tauri/log-forwarding",children:"Logging"})]}),"\n",(0,s.jsxs)(n.li,{children:[(0,s.jsx)(n.strong,{children:"Configure the service"})," - See ",(0,s.jsx)(n.a,{href:"/docs/desktop-testing/tauri/configuration",children:"Configuration"})," for all options"]}),"\n",(0,s.jsxs)(n.li,{children:[(0,s.jsx)(n.strong,{children:"Debug issues"})," - Check ",(0,s.jsx)(n.a,{href:"/docs/desktop-testing/tauri/troubleshooting",children:"Troubleshooting"})]}),"\n"]}),"\n",(0,s.jsx)(n.h2,{id:"common-patterns",children:"Common Patterns"}),"\n",(0,s.jsx)(n.h3,{id:"test-custom-tauri-commands",children:"Test Custom Tauri Commands"}),"\n",(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{className:"language-typescript",children:"it('should call custom commands', async () => {\n  const result = await browser.tauri.execute(({ core }) =>
1 {\n    return core.invoke('my_custom_command', { param: 'value' });\n  });\n\n  expect(result).toBeDefined();\n});\n"})}),"\n",(0,s.jsx)(n.h3,{id:"capture-logs",children:"Capture Logs"}),"\n",(0,s.jsxs)(n.p,{children:["Enable log capture in ",(0,s.jsx)(n.code,{children:"wdio.conf.ts"}),":"]}),"\n",(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{className:"language-typescript",children:"services: [['@wdio/tauri-service', {\n  captureBackendLogs: true,\n  captureFrontendLogs: true,\n  backendLogLevel: 'debug',\n  frontendLogLevel: 'debug',\n}]],\n"})}),"\n",(0,s.jsx)(n.h3,{id:"multiremote-testing",children:"Multiremote Testing"}),"\n",(0,s.jsx)(n.p,{children:"Run multiple instances of your app:"}),"\n",(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{className:"language-typescript",children:"capabilities: [\n  {\n    browserName: 'tauri',\n    'tauri:options': {\n      application: './src-tauri/target/release/my-app.exe',\n    },\n  },\n  {\n    browserName: 'tauri',\n    'tauri:options': {\n      application: './src-tauri/target/release/my-app.exe',\n    },\n  },\n],\n"})}),"\n",(0,s.jsx)(n.h3,{id:"cicd-integration",children:"CI/CD Integration"}),"\n",(0,s.jsx)(n.p,{children:"Example GitHub Actions workflow:"}),"\n",(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{className:"language-yaml",children:"name: E2E Tests\non: [push, pull_request]\n\njobs:\n  test:\n    runs-on: windows-latest  # or ubuntu-latest\n    steps:\n      - uses: actions/checkout@v3\n      - uses: actions/setup-node@v3\n        with:\n          node-version: '18'\n      - uses: dtolnay/rust-toolchain@stable\n\n      - name: Install dependencies\n        run: npm install\n\n      - name: Build Tauri app\n        run: npm run tauri build\n\n      - name: Run tests\n        run: npm run test:e2e\n"})}),"\n",(0,s.jsx)(n.h2,{id:"see-also",children:"See Also"}),"\n",(0,s.jsxs)(n.ul,{children:["\n",(0,s.jsx)(n.li,{children:(0,s.jsx)(n.a,{href:"/docs/desktop-testing/tauri/configuration",children:"Configuration Reference"})}),"\n",(0,s.jsx)(n.li,{children:(0,s.jsx)(n.a,{href:"/docs/desktop-testing/tauri/api",children:"API Reference"})}),"\n",(0,s.jsx)(n.li,{children:(0,s.jsx)(n.a,{href:"/docs/desktop-testing/tauri/plugin-setup",children:"Plugin Setup"})}),"\n",(0,s.jsx)(n.li,{children:(0,s.jsx)(n.a,{href:"/docs/desktop-testing/tauri/platform-support",children:"Platform Support"})}),"\n",(0,s.jsx)(n.li,{children:(0,s.jsx)(n.a,{href:"/docs/desktop-testing/tauri/troubleshooting",children:"Troubleshooting"})}),"\n",(0,s.jsx)(n.li,{children:(0,s.jsx)(n.a,{href:"https://webdriver.io/docs",children:"WebdriverIO Documentation"})}),"\n",(0,s.jsx)(n.li,{children:(0,s.jsx)(n.a,{href:"https://v2.tauri.app",children:"Tauri Documentation"})}),"\n"]})]})}function u(e={}){const{wrapper:n}={...(0,t.R)(),...e.components};return n?(0,s.jsx)(n,{...e,children:(0,s.jsx)(c,{...e})}):c(e)}}}]);

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.