Skip to main content

Documentation Index

Fetch the complete documentation index at: https://docs.qawolf.com/llms.txt

Use this file to discover all available pages before exploring further.

Electron flows use @qawolf/flows/web. The callback receives the first window as page, giving you the full Playwright API for interacting with the app.

Examples

Launch and interact with an Electron app
import { flow } from "@qawolf/flows/web";

export default flow(
  "Sign in to desktop app",
  {
    target: "Electron",
    launch: { executablePath: "/Applications/MyApp.app/Contents/MacOS/MyApp" },
  },
  async ({ page, test }) => {
    await test("sign in", async () => {
      await page.getByRole("button", { name: "Sign in" }).click();
    });
  },
);
Choose the executable path at runtime Use explicit launch when the path depends on runtime logic — for example, switching between a stable and canary build.
import { flow, launch } from "@qawolf/flows/web";

export default flow("Sign in to desktop app", "Web - Chrome", async () => {
  const useCanary = process.env.USE_CANARY_APP === "true";

  const { firstWindowPage } = await launch({
    kind: "electron",
    executablePath: useCanary
      ? "/Applications/MyApp Canary.app/Contents/MacOS/MyApp"
      : "/Applications/MyApp.app/Contents/MacOS/MyApp",
  });

  await firstWindowPage.getByRole("button", { name: "Sign in" }).click();
});

When to use

  • Your app is a desktop application built with Electron
  • You need to test app startup, window behavior, or native OS integrations
  • Your flow needs to interact with the first Electron window before any navigation
  • You want to switch between builds — stable vs canary — at runtime

Notes

Declarative vs explicit launch For most Electron flows, use the declarative style with target: "Electron" and launch.executablePath. The callback receives the first window as page automatically. Use explicit launch({ kind: "electron", executablePath }) only when the executable path depends on runtime logic. In this case, the first window is returned as firstWindowPage rather than injected as page. For the full Electron launch shape, see the Web API Reference.
Last modified on May 6, 2026