@qawolf/flows/windows defines flows that run on a Windows 11 desktop VM. A flow drives Chrome through Playwright and native apps through the Appium Windows driver.
For a walkthrough, see Testing Windows desktop apps.
Primary exports
flow(...)launch()startApp(...)expecttestContextDependencies
LaunchResult, NativeDriver, StartAppOptions, NativeSubject and WindowsExpect types, plus Windows-specific target, callback context and flow definition types.
Example:
Targets
Every run gets a fresh VM, which QA Wolf discards when the run ends.
Flow callback context
All Windows flow callbacks receive:inputssetOutput(...)test(...)
browser, context and page, connected to Chrome on the VM.
On Windows,
launch: true starts the browser, not an app. On Android and iOS it starts the app. Start a native app with startApp(...).Target model
The target input model is:launch takes only true. Windows flows have no launch options.
flow(...)
Use flow(...) for Windows authoring.
- without launch, the callback receives
inputs,setOutput(...), andtest(...) - with
launch: true, the flow callslaunch()before the callback, and the callback also receivesbrowser,context, andpage
launch()
Connects to Chrome on the VM over the Chrome DevTools Protocol. Takes no options. Returns:
startApp(...)
Opens an Appium Windows driver session and returns its WebdriverIO driver, typed NativeDriver. This API is only available while a flow is running.
{ "appium:app": string }. With no argument, the session covers the whole desktop.
Example:
Capabilities
Any other key passes to the driver unchanged. See the Appium Windows driver capabilities for the full list.
QA Wolf always sets
platformName and appium:automationName to Windows. It defaults appium:deviceName to WindowsPC and appium:newCommandTimeout to 3600.
App resolution
QA Wolf decides where theappium:app value lives in this order:
- An
httporhttpsURL — the VM downloads it. - A drive-letter or UNC path, such as
C:\...or\\server\share\...— a location on the VM, used as is. - An absolute path, or one starting with
./or../— a file on the runner, copied to the VM. - A bare file name — looked up in uploaded builds (
RUN_INPUTS_EXECUTABLES_DIR), then team storage (TEAM_STORAGE_DIR), and copied to the VM when found. - Anything else, such as an app user model ID — passed to the driver to resolve on the VM.
.msi before the session opens. When the installer leaves exactly one program, the session starts it. Otherwise the start fails until qawolf:launch names the program. An install gets 15 minutes.
startApp(...) does not read RUN_INPUT_PATH. A flow that tests an uploaded build passes it in:
Several apps
Each call returns its own driver, so a flow can drive several apps and the browser at once. Apps started earlier in the run stay open. Calls run one at a time. When a flow runs again on the same runner,startApp(...) first closes the sessions the previous run left, along with their apps.
Example:
Window size
qawolf:windowSize makes screenshots and coordinates match across runs. The start fails if the window doesn’t take the size. A session over the whole desktop has no window to size, so qawolf:windowSize needs appium:app or appium:appTopLevelWindow with it.
Files on the VM
Team storage and uploaded builds are mounted on the runner, not the VM. Move files with the driver:pushFile(path, base64Data)— writes a file on the VM.pullFile(path)— returns a file’s contents as base64.pullFolder(path)— returns a folder as a base64 zip.execute("windows: deleteFile", { remotePath })— deletes a file.windows: deleteFolderdeletes a folder.
qawolf, so C:\Users\qawolf\Desktop is its desktop.
expect
The exported expect dispatches on its subject:
- A WebdriverIO driver, element, or element query not yet awaited — the
expect-webdriveriomatchers, includingtoHaveScreenshot. - Anything else, including a Playwright
pageor locator — the Playwright matchers.
expect.soft dispatches the same way. Import expect from @qawolf/flows/windows rather than from expect-webdriverio or @playwright/test, so QA Wolf’s defaults stay in effect.
Example:
testContextDependencies
testContextDependencies is exported for runner and tooling integration. Flow authors should usually use the public callback parameters above instead of depending on the raw runner dependency list.