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.
Helpers for platform differences
For platform-specific implementation differences that don’t fit neatly into a Page Object — such as log capture, where iOS uses"safariConsole" and parses JSON while Android uses "browser" with logging preferences — write a helper function that handles the difference internally. The flow calls the helper and stays linear.
Module-level code should be limited to imports, constants, and pure helper functions. Runtime APIs like
launch(), expect, device, and platform.target only work inside the flow callback — calling them at the module level will throw.Use platform-specific entry points
Rather than writing one flow that handles multiple platforms, write separate flows using the entry point for each platform. Thedevice API surface is consistent across platforms, so the flows look similar even though they run on different infrastructure.
Use environment variables to parameterize flows
Environment variables let the same flow run against different environments without code changes. Reference them withprocess.env.VAR_NAME.
Pass data between flows
Useinputs and setOutput to share data between flows in the same run — for example, passing a user ID created in one flow to another flow that needs to log in as that user. See Passing data between flows for the full model.
platform.target for edge cases
For rare cases where a single flow genuinely needs to branch on the active platform at runtime, use platform.target from the top-level @qawolf/flows package.
platform.target frequently, consider splitting into platform-specific flows instead. See the Top-Level Reference for the full platform API.