### Install and copy examples with npm Source: https://github.com/heroamogs/flowstride-docs/blob/prod/guide/working-examples.md Use Node.js 22.12 or newer. Run these commands in a new folder to install Flowstride, initialize it, install Chromium, and copy the native-workflows examples to a new destination. ```sh npm init -y npm i flowstride npx flowstride init npx flowstride install chromium cp -R node_modules/flowstride/examples/native-workflows workflow-examples ``` -------------------------------- ### Install and run Flowstride Source: https://github.com/heroamogs/flowstride-docs/blob/prod/public/examples/flowstride-storage-example/README.txt Install the Flowstride package, install the CLI, and run the example in CI mode. The example uses port 4174, so keep that port free. ```bash npm i flowstride ``` ```bash npx flowstride install ``` ```bash npx flowstride run --ci ``` -------------------------------- ### Install and run with browser engines Source: https://github.com/heroamogs/flowstride-docs/blob/prod/guide/working-examples.md Install and choose a browser engine explicitly. API/UI, table, iframe, and variable examples work with the supported browser engines. Microphone file injection requires Chromium. ```sh npx flowstride install chromium firefox webkit npx flowstride run workflow-examples/api-and-ui/flows/api-and-ui.flow --browser firefox --ci npx flowstride run workflow-examples/api-and-ui/flows/api-and-ui.flow --browser webkit --ci ``` -------------------------------- ### Install Firefox and WebKit binaries Source: https://github.com/heroamogs/flowstride-docs/blob/prod/guide/troubleshooting.md Install Firefox and WebKit browser binaries for Flowstride. ```bash npx flowstride install firefox webkit ``` -------------------------------- ### Install the public engine Source: https://github.com/heroamogs/flowstride-docs/blob/prod/guide/getting-started.md Install Flowstride in a new npm project using Node.js 22.12 or newer. The init command creates required folders and a sample flow, and attempts to install Chromium. ```sh npm init -y npm i flowstride npx flowstride init ``` -------------------------------- ### Start shared application server Source: https://github.com/heroamogs/flowstride-docs/blob/prod/guide/working-examples.md Start the shared application in another terminal and leave it running. It stores disposable demo data in memory and listens on loopback. Restarting the server clears those users and changes; keep the same process running for session-save/session-restore checks. ```sh node workflow-examples/shared/server.mjs ``` -------------------------------- ### Install Flowstride OS and initialize project Source: https://github.com/heroamogs/flowstride-docs/blob/prod/guide/releases.md Install the Flowstride OS npm package and initialize project folders, an example flow, and attempt Chromium installation. Requires Node.js 22.12 or newer. ```sh npm i flowstride npx flowstride init ``` -------------------------------- ### Configure CI to start the application Source: https://github.com/heroamogs/flowstride-docs/blob/prod/guide/working-examples.md Stop the manually started server, then configure this JSON. Keep BASE_URL configured. Flowstride owns this server's startup, readiness check, and shutdown. Keep negative/ and unconfigured service templates outside the passing CI target. ```json { "testDir": "workflow-examples/api-and-ui/flows", "timeout": 10000, "cloudSync": false, "webServer": { "command": "node workflow-examples/shared/server.mjs", "url": "http://127.0.0.1:4107", "timeout": 10000 } } ``` -------------------------------- ### Install browser explicitly Source: https://github.com/heroamogs/flowstride-docs/blob/prod/guide/releases.md Install the matching browser explicitly if the initial setup fails during init. ```sh npx flowstride install ``` -------------------------------- ### Install dependencies and run local dev server Source: https://github.com/heroamogs/flowstride-docs/blob/prod/README.md Use Node.js 22.12 or newer and npm. Run `npm ci` to install dependencies, then start the VitePress dev server on 127.0.0.1:5173 and open the printed URL. ```sh npm ci npm run dev -- --host 127.0.0.1 --port 5173 ``` -------------------------------- ### Set up and run the included canvas game example Source: https://github.com/heroamogs/flowstride-docs/blob/prod/games/getting-started.md Creates a new npm project and copies the native-game example from node_modules/flowstride/examples/native-game. The example includes server.mjs, configuration, and flows/canvas.flow; its webServer starts the local app, waits for readiness, and stops it after the run. Expected: seven passing commands covering navigation, fixture reset, initial snapshot, canvas tap, state, visual change, and a checkpoint. ```sh npm init -y npm i flowstride npx flowstride install chromium cp -R node_modules/flowstride/examples/native-game/. . npx flowstride run --ci ``` -------------------------------- ### Copy examples with PowerShell Source: https://github.com/heroamogs/flowstride-docs/blob/prod/guide/working-examples.md On PowerShell, replace the last command with this Copy-Item command to copy the examples to a new destination. ```powershell Copy-Item -Recurse node_modules/flowstride/examples/native-workflows workflow-examples ``` -------------------------------- ### Start with OS: install, initialize, and run flows Source: https://github.com/heroamogs/flowstride-docs/blob/prod/guide/editions.md Use these commands to install Flowstride and run flows locally without a Cloud account. The OS edition includes the local dashboard, manual testing, and native CI and browser-game APIs. ```sh npm i flowstride npx flowstride init npx flowstride run flows ``` -------------------------------- ### Flowstride DSL: Verify an Order Scenario Source: https://github.com/heroamogs/flowstride-docs/blob/prod/manual-workspace/to-automation.md Use this Flowstride DSL example to automate a manual case that verifies an order is visible to its customer. It shows a Feature/Scenario structure with Given/When/Then steps, including API setup via flow.post, a status check with flow.expect, opening a page with flow.open, and a visibility assertion. The setup endpoint and order identifier are illustrative; your application must implement its own fixture and authentication. ```flow Feature: Order history Scenario: A created order is visible to its customer Given "The customer order is prepared" flow.post "/api/test/orders" with reqBody """ { "fixture": "registered-customer-one-item" } """ And "The setup succeeds" flow.expect status "201"; When "The customer opens order history" flow.open "/orders"; Then "The order is visible" flow.expect visible "DOCS-ORDER-001"; ``` -------------------------------- ### Regenerate example downloads and hash manifest Source: https://github.com/heroamogs/flowstride-docs/blob/prod/README.md After changing editable example source in `public/examples`, run this script to regenerate downloads and the hash manifest. ```sh python3 scripts/package-examples.py ``` -------------------------------- ### Install missing Firefox and WebKit binaries Source: https://github.com/heroamogs/flowstride-docs/blob/prod/guide/browser-compatibility.md Install the engine you actually selected when binaries are missing. Use Flowstride's matching installer rather than an unrelated global Playwright installation. ```sh npx flowstride install firefox npx flowstride install webkit ``` -------------------------------- ### Create project-root .env Source: https://github.com/heroamogs/flowstride-docs/blob/prod/guide/working-examples.md Create a project-root .env file with these variables. Keep your existing configuration and use a new destination. ```dotenv BASE_URL=http://127.0.0.1:4107 EXAMPLE_LABEL="Workflow fixture" ``` -------------------------------- ### Install Flowstride Chromium Source: https://github.com/heroamogs/flowstride-docs/blob/prod/guide/audio-to-text.md Install the Chromium browser required for audio-file microphone injection. Run after the normal npm setup including `npx flowstride init`. Audio-file microphone injection requires Chromium. ```sh npx flowstride install chromium ``` -------------------------------- ### Targeting examples for common page situations Source: https://github.com/heroamogs/flowstride-docs/blob/prod/guide/targeting.md Table of targeting examples for distinct button text, input placeholders, repeated labels, record-scoped actions, stable test attributes, repeated controls, and table coordinates. All use zero-based indexing where noted. ```flow flow.click button "Login"; ``` ```flow flow.type input "Email" "reader@example.test"; ``` ```flow flow.click "Edit" near "Billing address"; ``` ```flow flow.click button "View" inside "#order-102"; ``` ```flow flow.click "[data-testid='save-profile']"; ``` ```flow flow.click "Edit[1]"; ``` ```flow flow.click "table[0] tr[2] td[0]"; ``` -------------------------------- ### Install browsers and run with Firefox headed Source: https://github.com/heroamogs/flowstride-docs/blob/prod/guide/browser-compatibility.md Install Chromium, Firefox, and WebKit binaries, then run flows with Firefox in headed mode. Chromium is the default; Firefox and WebKit are explicit choices. Installing several browsers does not select all of them for a run—run once per browser or use a CI browser matrix. ```sh npx flowstride install chromium firefox webkit npx flowstride run flows --browser firefox --headed ``` -------------------------------- ### Install and run with browser selection Source: https://github.com/heroamogs/flowstride-docs/blob/prod/guide/native-browser-workflows.md Install browser binaries for Chromium, Firefox, and WebKit, then run flows with a specific engine. Use --browser firefox or --browser webkit to select the test engine. The install command downloads binaries without opening a browser window. ```sh npx flowstride install chromium firefox webkit npx flowstride run flows --browser firefox --ci ``` -------------------------------- ### Install browsers with OS dependencies on Linux CI Source: https://github.com/heroamogs/flowstride-docs/blob/prod/guide/browser-compatibility.md On supported Linux CI runners, include operating-system dependencies when installing browsers. Use Flowstride's matching installer rather than an unrelated global Playwright installation. ```sh npx flowstride install chromium firefox webkit --with-deps ``` -------------------------------- ### Serve production build locally Source: https://github.com/heroamogs/flowstride-docs/blob/prod/README.md Starts a local preview server for the production build on 127.0.0.1:5173. ```sh npm run preview -- --host 127.0.0.1 --port 5173 ``` -------------------------------- ### Start a local application for CI with webServer Source: https://github.com/heroamogs/flowstride-docs/blob/prod/guide/configuration.md Configures a local web server for CI runs. The readiness URL must be loopback HTTP(S) and the working directory must be inside the project. Flowstride refuses an already-serving readiness URL and stops the server it started. For interactive runs, start the application yourself. ```json { "baseUrl": "http://127.0.0.1:3000", "webServer": { "command": "npm run dev", "url": "http://127.0.0.1:3000", "cwd": ".", "timeout": 60000 } } ``` -------------------------------- ### flow.trace.start Source: https://github.com/heroamogs/flowstride-docs/blob/prod/reference/native-browser-commands.md Starts tracing the current profile. Rejects if a trace is already active. ```APIDOC ## flow.trace.start ### Description Starts tracing the current profile. Rejects if a trace is already active. ### Command `flow.trace.start` ### Parameters - **name** (string) - Optional - Name of the trace. ``` -------------------------------- ### Check Flowstride version Source: https://github.com/heroamogs/flowstride-docs/blob/prod/guide/troubleshooting.md Verify the installed Flowstride version and confirm the running environment (engine banner, Cloud host, CI or interactive mode). ```bash npx flowstride --version ``` -------------------------------- ### Install additional engines and run with Firefox Source: https://github.com/heroamogs/flowstride-docs/blob/prod/guide/releases.md Install Chromium, Firefox, and WebKit engines, then run flows with the Firefox browser. ```sh npx flowstride install chromium firefox webkit npx flowstride run flows --browser firefox ``` -------------------------------- ### Run, inspect, repeat Source: https://github.com/heroamogs/flowstride-docs/blob/prod/guide/getting-started.md Run flows with or without a dashboard, and open the Manual Workspace. The first command opens the interactive automation dashboard, the second writes CI reports, and the third opens the Manual Workspace. ```sh npx flowstride run flows npx flowstride run flows --ci npx flowstride open ``` -------------------------------- ### API setup call with flow.post Source: https://github.com/heroamogs/flowstride-docs/blob/prod/guide/your-first-script.md Use this Flowstride command to prepare test data via an API endpoint. The endpoint, request fields, response status, authentication, and account preparation must match your application; Flowstride does not create the endpoint. Place setup commands under Given in a complete scenario, assert the response, and use the same prepared customer in the browser. ```flow flow.post "/api/test/customers" with reqBody """ { "email": "reader@example.test", "name": "Documentation Reader" } """ flow.expect status "201"; ``` -------------------------------- ### Reproducible CI install with npm ci Source: https://github.com/heroamogs/flowstride-docs/blob/prod/guide/releases.md Use npm ci in CI to install dependencies from the lockfile, then install browser system dependencies and run flows in CI mode. ```sh npm ci npx flowstride install --with-deps npx flowstride run flows --ci ``` -------------------------------- ### Install Chromium and run flow with audio injection Source: https://github.com/heroamogs/flowstride-docs/blob/prod/flow-language/flow-commands/flow.injectAudio.md Install the Chromium browser and run a flow that uses flow.injectAudio. The worker pre-scans the batch for the first literal audio path and configures the browser before launch. Run different fixtures in separate invocations. ```sh npx flowstride install chromium npx flowstride run flows/audio-to-text.flow --browser chromium ``` -------------------------------- ### flow.clock.install Source: https://github.com/heroamogs/flowstride-docs/blob/prod/reference/native-browser-commands.md Installs page clock control. Optionally accepts a time to set. ```APIDOC ## flow.clock.install ### Description Installs page clock control. Optionally accepts a time to set. ### Command `flow.clock.install` ### Parameters - **time** (string|number) - Optional - Date string or numeric time to set. ### Notes - Install before the application creates timers. ``` -------------------------------- ### Run table tests in OS or Cloud with Chromium Source: https://github.com/heroamogs/flowstride-docs/blob/prod/guide/table-testing.md Runs the example table test files without the unrelated sample created by init. The first test finds FS-102 with status Approved and opens its details; the coordinate test selects FS-102 then FS-101. OS runs without an account; Cloud requires connecting your account and accepting the engine installation. ```sh npx flowstride run flows/table.flow --browser chromium npx flowstride run flows/table-coordinates.flow --browser chromium ``` -------------------------------- ### flow.stub.install Source: https://github.com/heroamogs/flowstride-docs/blob/prod/reference/native-browser-commands.md Installs a spy or stub on a replaceable function reachable from window. Supports modes to observe, return a value, or throw an error, with optional async behavior. ```APIDOC ## flow.stub.install ### Description Installs a spy or stub on a replaceable function reachable from `window`. A spy observes calls and invokes the original; a stub replaces its result or throws. Supports `async` for promise results/rejections and `beforeLoad` for initializers. ### Command `flow.stub.install` ### Parameters - **name** (string) - Required - Name of the double. - **target** (dotted string) - Required - Dotted path to the replaceable function reachable from `window`. - **mode** (string) - Optional - `spy` (default), `return`, or `throw`. - **value** (any) - Optional - Value to return when mode is `return`. - **error** (any) - Optional - Error to throw when mode is `throw`. - **async** (boolean) - Optional - If true, produces a promise result/rejection. - **beforeLoad** (boolean) - Optional - Installs an initializer; cannot discover a function not yet defined by application code. ### Behavior - Doubles belong to the page; a same-name double on another profile/page is separate. - Call arguments are compared with JSON-compatible captured values. - Restore before replacing an existing name. ``` -------------------------------- ### Configure application URL and test credentials in .env Source: https://github.com/heroamogs/flowstride-docs/blob/prod/guide/your-first-script.md Create a .env file in the project root. Flowstride loads it automatically when running a flow, in both OS and Cloud. BASE_URL is the base for relative browser and API URLs; with the example value, flow.open "/login"; opens http://127.0.0.1:3000/login. Keep .env out of Git and share placeholder values in .env.example. ```dotenv BASE_URL=http://127.0.0.1:3000 TEST_EMAIL=tester@example.test TEST_PASSWORD=replace-with-your-test-account-password ``` -------------------------------- ### flow.open example with relative URL Source: https://github.com/heroamogs/flowstride-docs/blob/prod/flow-language/flow-commands/flow.open.md Opens an application URL; relative URLs are resolved against the configured baseUrl. Use an explicit HTTP(S) base URL and call this command within a complete Given/When/Then scenario. Opening a page does not automatically authenticate it. ```flow flow.open "/account"; ``` -------------------------------- ### Run exact flow files Source: https://github.com/heroamogs/flowstride-docs/blob/prod/guide/working-examples.md Run an exact file so unrelated starter flows and deliberate failures are not included. The first two should pass; the last should fail, exit nonzero, and retain the failed step's diagnostic evidence. Read the step-level error in flowstride-artifacts/summary.json, not just aggregate counts. ```sh npx flowstride run workflow-examples/api-and-ui/flows/api-and-ui.flow npx flowstride run workflow-examples/api-and-ui/flows/api-and-ui.flow --ci npx flowstride run workflow-examples/api-and-ui/negative/wrong-backend-state.flow --ci ``` -------------------------------- ### Install and run table tests with Firefox or WebKit Source: https://github.com/heroamogs/flowstride-docs/blob/prod/guide/table-testing.md Installs browser binaries for Firefox and WebKit, then runs the table test with each browser. Use this when you need to test in browsers other than Chromium. ```sh npx flowstride install firefox webkit npx flowstride run flows/table.flow --browser firefox npx flowstride run flows/table.flow --browser webkit ``` -------------------------------- ### flow.post example with reqBody and flow.expect Source: https://github.com/heroamogs/flowstride-docs/blob/prod/flow-language/flow-commands/flow.post.md Creates a resource by posting to a relative URL using the configured baseUrl. The expected status and payload are defined by your application, not by Flowstride. Use strict camelCase for modifiers like `with reqBody`. ```flow flow.post "/api/customers" with reqBody """ { "name": "Documentation Reader" } """ flow.expect status "201"; ``` -------------------------------- ### flow.try click example Source: https://github.com/heroamogs/flowstride-docs/blob/prod/flow-language/flow-commands/flow.try.md Makes an action optional so its failure is logged without failing the test. Use for genuinely optional UI like a banner that may not appear; do not apply to required login, data setup, or final assertions. Optional actions are still subject to the command's target, path, and runtime restrictions. ```flow flow.try click "Dismiss announcement"; ``` -------------------------------- ### flow.waitForPipeline usage example Source: https://github.com/heroamogs/flowstride-docs/blob/prod/flow-language/flow-commands/flow.waitForPipeline.md Waits for the active audio fixture's estimated duration, then clicks the stop button and asserts the transcript. Requires an active audio fixture with a conventional 44-byte WAV header (uncompressed PCM). ```flow flow.waitForPipeline; flow.click button "Stop recording"; flow.expect transcript contains "Hello Flowstride. Your order is ready."; ``` -------------------------------- ### Control time with flow.clock commands Source: https://github.com/heroamogs/flowstride-docs/blob/prod/guide/native-browser-workflows.md Installs a fixed clock, pauses at a specific time, opens a page, and advances time by 5000 milliseconds. Clock commands include pauseAt, resume, runFor, fastForward, setFixedTime, and setSystemTime. Install the clock before the application installs its timers; time control affects only the browser page, not the backend or OS clock. ```flow flow.clock.install { "time": "2026-01-01T00:00:00Z" }; flow.clock.pauseAt { "time": "2026-01-01T00:00:00Z" }; flow.open "/timer"; flow.clock.runFor { "milliseconds": 5000 }; ``` -------------------------------- ### Optional flowstride.config.json example Source: https://github.com/heroamogs/flowstride-docs/blob/prod/guide/configuration.md Create flowstride.config.json in the project root to customize execution settings or store the base URL. The JSON must be an object without comments. Paths must stay inside the project, and the artifact directory cannot be the project root. ```json { "testDir": "flows", "baseUrl": "http://127.0.0.1:3000", "timeout": 30000, "headless": true, "device": "desktop", "artifactsDir": "flowstride-artifacts", "recordVideo": true, "browserErrors": "fail", "cloudSync": false } ``` -------------------------------- ### Run the table application Source: https://github.com/heroamogs/flowstride-docs/blob/prod/guide/table-testing.md Starts the Node.js server defined in table-app.mjs. Run this in a separate terminal and leave it running while testing. ```sh node table-app.mjs ``` -------------------------------- ### Browser configuration JSON example Source: https://github.com/heroamogs/flowstride-docs/blob/prod/guide/native-browser-workflows.md Example browserOptions configuration selecting Firefox with locale, timezone, color scheme, permissions, geolocation, and service worker blocking. Firefox is used because Chromium currently has a custom-locale limitation. Use browserOptions for the default profile and options in flow.browser.create for a separate profile. ```json { "browser": "firefox", "browserOptions": { "locale": "en-GB", "timezoneId": "Europe/London", "colorScheme": "dark", "permissions": ["geolocation"], "geolocation": { "latitude": 6.5244, "longitude": 3.3792 }, "serviceWorkers": "block" } } ``` -------------------------------- ### Connect Cloud: login and check status Source: https://github.com/heroamogs/flowstride-docs/blob/prod/guide/editions.md After creating a free Cloud account and developer token, run these commands to authenticate. Paste the token into the masked prompt and accept the Cloud engine installation when offered. Free accounts can use this connection flow. ```sh npx flowstride login npx flowstride status ``` -------------------------------- ### Stub a function with flow.stub and verify calls Source: https://github.com/heroamogs/flowstride-docs/blob/prod/guide/native-browser-workflows.md Installs a spy on analytics.track, clicks a purchase button, expects one call with argument 'purchase', then restores the stub. A spy records calls and invokes the original function; modes 'return' and 'throw' replace it, and 'async: true' returns a promise. 'beforeLoad: true' installs on the next document, but cannot replace a function that does not yet exist. Doubles belong to a page and are restored on cleanup. ```flow flow.stub.install { "name": "analytics", "target": "analytics.track", "mode": "spy" }; flow.click button "Purchase"; flow.stub.expect { "name": "analytics", "count": 1, "args": ["purchase"] }; flow.stub.restore { "name": "analytics" }; ``` -------------------------------- ### Intentional mismatch example for flow.expect Source: https://github.com/heroamogs/flowstride-docs/blob/prod/guide/api-testing.md Try this intentional mismatch against the example's actual reader; it must fail. Restore the passing expectation afterward. ```flow flow.expect resBody "name" to.not.be "Documentation Reader"; ``` -------------------------------- ### flow.stub.restore Source: https://github.com/heroamogs/flowstride-docs/blob/prod/reference/native-browser-commands.md Restores the original function on the current page for a previously installed double. ```APIDOC ## flow.stub.restore ### Description Restores the original function on the current page for a previously installed double. ### Command `flow.stub.restore` ### Parameters - **name** (string) - Required - Name of the double to restore. ``` -------------------------------- ### Validate site with npm run check Source: https://github.com/heroamogs/flowstride-docs/blob/prod/README.md Runs checks for public content, JSON formatting, example asset hashes, and manual design structure, then builds the site and verifies rendered links and heading anchors. Local search is generated during the build. ```sh npm run check ``` -------------------------------- ### Merge shard summaries Source: https://github.com/heroamogs/flowstride-docs/blob/prod/guide/native-browser-workflows.md Merges the summary.json files from all three shards. Merging rejects missing/duplicate shards, mixed source suites, and mixed browser configurations; a failed or interrupted shard cannot become a passing merge. Setup .first.flow files execute independently on every machine, so setup must be safe to repeat. ```sh npx flowstride merge shard-1/summary.json shard-2/summary.json shard-3/summary.json ``` -------------------------------- ### flow.put example with reqBody and flow.expect Source: https://github.com/heroamogs/flowstride-docs/blob/prod/flow-language/flow-commands/flow.put.md Replaces or updates a resource at a relative URL using the configured baseUrl. The example sends a JSON body with the `with reqBody` modifier and asserts a 200 status with `flow.expect`. The expected status and payload are defined by your application, not by Flowstride; a DELETE endpoint may correctly return 204 instead of 200. ```flow flow.put "/api/customers/DOCS-001" with reqBody """ { "name": "Documentation Reader" } """ flow.expect status "200"; ``` -------------------------------- ### Run flows with Firefox Source: https://github.com/heroamogs/flowstride-docs/blob/prod/guide/troubleshooting.md Run Flowstride flows using the Firefox browser in headed mode. ```bash npx flowstride run flows --browser firefox --headed ``` -------------------------------- ### Generate GitHub Actions workflow Source: https://github.com/heroamogs/flowstride-docs/blob/prod/guide/native-ci-games.md Creates `.github/workflows/flowstride.yml` explicitly; it is not created during package installation and an existing file is not overwritten. The generated workflow checks out the repo, installs locked npm dependencies and browsers, runs native CI, and uploads artifacts even on failure. ```sh npx flowstride ci init github ``` -------------------------------- ### api.get(url, headers?) Source: https://github.com/heroamogs/flowstride-docs/blob/prod/flow-language/getting-started/plugins.md Performs an HTTP GET request and returns a Promise of the parsed response body. This is part of the common SDK contract available to plugins. ```APIDOC ## api.get(url, headers?) ### Description Performs an HTTP GET request and returns a Promise of the parsed response body. This is part of the common SDK contract available to plugins. ### Method Function call ### Endpoint `api.get(url, headers?)` ### Parameters - **url** (string) - Required - The URL to request. - **headers** (object) - Optional - A string map of HTTP headers. ### Response Returns a Promise of the parsed response body. ``` -------------------------------- ### Flowstride component test scenario for React Counter Source: https://github.com/heroamogs/flowstride-docs/blob/prod/guide/native-browser-workflows.md Place these commands under Given/When/Then in a `.flow` scenario. The harness starts and cleans up a local Vite harness; it does not load your application Vite configuration, framework router, backend, or production build automatically. An optional `css` array imports project styles. ```flow flow.component.mount { "framework": "react", "module": "src/components/Counter.jsx", "props": { "heading": "Counter example" } }; flow.click button "Add one"; flow.assert.that { "selector": "#count", "condition": "text", "value": "1" }; flow.component.update { "props": { "heading": "Updated counter" } }; flow.assert.that { "role": "heading", "name": "Updated counter", "condition": "visible" }; flow.component.unmount {}; ``` -------------------------------- ### Run Flowstride suite in CI mode Source: https://github.com/heroamogs/flowstride-docs/blob/prod/guide/native-ci-games.md Installs Flowstride and runs the `flows` suite with native CI enabled. `--ci` forces headless mode, writes reports, and exits; a failed, incomplete, or crashed run returns nonzero. ```sh npx flowstride install npx flowstride run flows --ci ``` -------------------------------- ### flow.forceClick example Source: https://github.com/heroamogs/flowstride-docs/blob/prod/flow-language/flow-commands/flow.forceClick.md Forces a click on a button when standard actionability checks do not apply. Can bypass user-interaction checks but does not guarantee CAPTCHA or anti-bot bypass and should not mask real usability defects. Use inside a complete Given/When/Then scenario. ```flow flow.forceClick button "Continue"; ``` -------------------------------- ### Full journey: get OTP, type, accept dialog, verify Source: https://github.com/heroamogs/flowstride-docs/blob/prod/guide/email-otp.md Use in a .flow scenario to retrieve an OTP from FlowMail, type it into the input, accept the dialog, and click Verify. Register the dialog handler before the action that opens the dialog. Finish with an assertion such as flow.expect visible "Logout"; to prove the application accepted the code. ```flow flow.mail.getOtp "@randomEmail@flowstridemail.com" into "myOtp"; flow.type input "Enter 6-digit OTP" "@myOtp"; flow.acceptDialog; flow.click button "Verify OTP"; ``` -------------------------------- ### Run flows with CLI options Source: https://github.com/heroamogs/flowstride-docs/blob/prod/guide/the-cli.md Shows three example invocations of `npx flowstride run` using `--ci`, `--env`, `--workers`, and `--config`. `--workers` is a run option, not a configuration-file field; workspace and CPU limits may reduce the requested count. ```sh npx flowstride run flows/account.flow --ci --env staging ``` ```sh npx flowstride run flows --workers 4 ``` ```sh npx flowstride run flows --config flowstride.test.json ``` -------------------------------- ### Single field or split digit boxes: get OTP, passcode, verify Source: https://github.com/heroamogs/flowstride-docs/blob/prod/guide/email-otp.md Use flow.passcode for a segmented OTP control; it distributes characters across its fields. Replace "Verification code" with the input/container your page exposes. The helper supports a single input, a matching container of split inputs, and its supported OTP-input fallback. It enters an already obtained value; the application decides whether it is valid. ```flow flow.mail.getOtp "@randomEmail@flowstridemail.com" into "myOtp"; flow.passcode "Verification code" "@myOtp"; flow.click button "Verify"; flow.expect visible "My account"; ``` -------------------------------- ### Input qualifiers and placeholders Source: https://github.com/heroamogs/flowstride-docs/blob/prod/guide/targeting.md Two equivalent ways to target an input by its placeholder text. The explicit `placeholder` form resolves a placeholder; the `input` qualifier uses a narrower input-specific search and may not match every external `