### Download Sample App and Flows Source: https://docs.maestro.dev/cloud/run-maestro-tests-in-the-cloud Use the `download-samples` command to download a sample app and Flow file to get started quickly. ```bash maestro download-samples ``` -------------------------------- ### Custom Path and Label for startRecording Source: https://docs.maestro.dev/reference/commands-available/startrecording This example uses expanded syntax to specify a custom directory, a descriptive label for reports, and marks the command as optional. This ensures the test continues even if the video engine fails to start. ```yaml - startRecording: path: "recordings/user_onboarding" label: "Capture onboarding sequence for evidence" optional: true ``` -------------------------------- ### Query Documentation Dynamically Source: https://docs.maestro.dev/maestro-cli/how-to-install-maestro-cli Example of how to perform an HTTP GET request to query the documentation dynamically with a question. ```http GET https://docs.maestro.dev/maestro-cli/how-to-install-maestro-cli.md?ask= ``` -------------------------------- ### Query Documentation Example Source: https://docs.maestro.dev/reference/commands-available/hidekeyboard To get more information not directly on the page, query the documentation dynamically using the 'ask' query parameter. ```http GET https://docs.maestro.dev/reference/commands-available/hidekeyboard.md?ask= ``` -------------------------------- ### Dynamic Documentation Query Example Source: https://docs.maestro.dev/maestro-flows/workspace-management/design-your-test-architecture/repository-configuration Perform an HTTP GET request to query documentation dynamically. Include your question as the value for the 'ask' query parameter. ```http GET https://docs.maestro.dev/maestro-flows/workspace-management/design-your-test-architecture/repository-configuration.md?ask= ``` -------------------------------- ### Install Maestro CLI Version 1.39.0 Source: https://docs.maestro.dev/maestro-cli/how-to-install-maestro-cli/update-the-maestro-cli This is an example of installing a specific version, 1.39.0, of the Maestro CLI by setting the MAESTRO_VERSION environment variable. ```bash export MAESTRO_VERSION=1.39.0; curl -Ls "https://get.maestro.mobile.dev" | bash ``` -------------------------------- ### Querying Documentation Example Source: https://docs.maestro.dev/reference/commands-available/toggleairplanemode To get additional information not directly present on the page, perform an HTTP GET request on the current page URL with the 'ask' query parameter. The question should be specific and self-contained. ```http GET https://docs.maestro.dev/reference/commands-available/toggleairplanemode.md?ask= ``` -------------------------------- ### Query documentation dynamically Source: https://docs.maestro.dev/reference/commands-available/setpermissions This example shows how to query the documentation dynamically using an HTTP GET request with the `ask` query parameter. This is useful for retrieving specific information or related documentation sections not explicitly present on the current page. ```http GET https://docs.maestro.dev/reference/commands-available/setpermissions.md?ask= ``` -------------------------------- ### View all available device start options Source: https://docs.maestro.dev/maestro-flows/flow-control-and-logic/specify-and-start-devices Displays all available options and configurations for starting devices, including device models, platforms, and OS versions. ```bash maestro start-device ``` -------------------------------- ### Dynamic Documentation Query Example Source: https://docs.maestro.dev/reference/workspace-configuration To get additional information not directly present on a page, you can query the documentation dynamically. Perform an HTTP GET request on the page URL with the `ask` query parameter, providing a specific, self-contained question in natural language. ```http GET https://docs.maestro.dev/reference/workspace-configuration.md?ask= ``` -------------------------------- ### Query Documentation API Example Source: https://docs.maestro.dev/maestro-cloud/notifications/configure-webhooks To get additional information not explicitly present on a page, you can query the documentation dynamically. Make a GET request to the page URL with an 'ask' query parameter containing your question. ```http GET https://docs.maestro.dev/maestro-cloud/notifications/configure-webhooks.md?ask= ``` -------------------------------- ### Install Maestro CLI Source: https://docs.maestro.dev/maestro-cloud/ci-cd-integration/generic-ci-platform Install the Maestro CLI on your CI runner using the provided script. Ensure the CLI is installed before proceeding with cloud commands. ```bash curl -Ls "https://get.maestro.mobile.dev" | bash ``` -------------------------------- ### Full flow example Source: https://docs.maestro.dev/reference/commands-available/tapon An example demonstrating a sequence of commands, including `tapOn`, to add a new contact. ```APIDOC ## Full Flow Example ```yaml appId: com.google.android.contacts --- - launchApp - tapOn: id: ".*floating_action_button.*" # regex - inputText: "John" - tapOn: "Last Name" - inputText: "Snow" - tapOn: ".*Save.*" ``` ``` -------------------------------- ### Install Maestro CLI on macOS using curl Source: https://docs.maestro.dev/maestro-cli/how-to-install-maestro-cli Install Maestro CLI on macOS by downloading and executing the installation script. ```bash curl -fsSL "https://get.maestro.mobile.dev" | bash ``` -------------------------------- ### Install Maestro CLI on macOS using Homebrew Source: https://docs.maestro.dev/maestro-cli/how-to-install-maestro-cli Install Maestro CLI on macOS using Homebrew by tapping the repository and installing the package. ```bash brew tap mobile-dev-inc/tap brew install mobile-dev-inc/tap/maestro ``` -------------------------------- ### Querying Documentation Dynamically Source: https://docs.maestro.dev/reference/commands-available/presskey This example demonstrates how to query the Maestro documentation dynamically using an HTTP GET request with the 'ask' query parameter. This is useful for retrieving information not explicitly present on the current page. ```http GET https://docs.maestro.dev/reference/commands-available/presskey.md?ask= ``` -------------------------------- ### Start ADB Server on Windows Source: https://docs.maestro.dev/maestro-cli/how-to-install-maestro-cli Starts the ADB server on Windows to allow external connections. Keep this PowerShell window open to maintain the connection. ```powershell adb -a -P 5037 nodaemon server ``` -------------------------------- ### Verify Maestro CLI Installation Source: https://docs.maestro.dev/maestro-cli/how-to-install-maestro-cli Run this command after installation to confirm that the Maestro CLI is working correctly. ```bash maestro --help ``` -------------------------------- ### Query Documentation via GET Request Source: https://docs.maestro.dev/reference/commands-available/takescreenshot Demonstrates how to query the documentation dynamically for additional information not explicitly present on the page using a GET request with an 'ask' parameter. ```http GET https://docs.maestro.dev/reference/commands-available/takescreenshot.md?ask= ``` -------------------------------- ### Basic inputText Usage Example Source: https://docs.maestro.dev/reference/commands-available/inputtext A simple example demonstrating the use of the `inputText` command to add a specific string to a text field. ```yaml - inputText: "Hello World" ``` -------------------------------- ### Query Documentation with GET Request Source: https://docs.maestro.dev/maestro-cloud/ci-cd-integration/github-actions/platform-guides To get more information not present on the current page, make an HTTP GET request to the page URL with the `ask` query parameter. The question should be specific and self-contained. ```http GET https://docs.maestro.dev/maestro-cloud/ci-cd-integration/github-actions/platform-guides.md?ask= ``` -------------------------------- ### Maestro CLI Example: Run Test with Verbose Logging Source: https://docs.maestro.dev/maestro-cli/maestro-cli-commands-and-options Example of running a test with verbose logging enabled and filtering by a specific tag. ```bash maestro --verbose test my-flow.yaml --include-tags=smoke ``` -------------------------------- ### Querying Documentation with GET Request Source: https://docs.maestro.dev/reference/commands-available/assertscreenshot Use this HTTP GET request format to query the documentation dynamically with a specific question. ```http GET https://docs.maestro.dev/reference/commands-available/assertscreenshot.md?ask= ``` -------------------------------- ### Query Documentation Dynamically Source: https://docs.maestro.dev/examples/real-world-examples/advanced-wikipedia-on-android Perform an HTTP GET request to query the documentation dynamically. Use the `ask` query parameter with a specific question to get direct answers and relevant excerpts. ```http GET https://docs.maestro.dev/examples/real-world-examples/advanced-wikipedia-on-android.md?ask= ``` -------------------------------- ### Query Documentation via GET Request Source: https://docs.maestro.dev/maestro-studio/environments-and-variables To get additional information not explicitly present on a page, query the documentation dynamically by making an HTTP GET request to the page URL with the `ask` query parameter. The question should be specific and self-contained. ```http GET https://docs.maestro.dev/maestro-studio/environments-and-variables.md?ask= ``` -------------------------------- ### Basic longPressOn Examples Source: https://docs.maestro.dev/reference/commands-available/longpresson Demonstrates how to perform a long press on a UI element using text, an ID, or point coordinates. These examples show the fundamental usage of the `longPressOn` command. ```yaml - longPressOn: Text ``` ```yaml - longPressOn: id: view_id ``` ```yaml - longPressOn: point: 50%,50% ``` -------------------------------- ### Query documentation dynamically Source: https://docs.maestro.dev/reference/commands-available/doubletapon Perform an HTTP GET request on the current page URL with the 'ask' query parameter to get dynamic information or clarification. ```http GET https://docs.maestro.dev/reference/commands-available/doubletapon.md?ask= ``` -------------------------------- ### Querying Documentation with `ask` Source: https://docs.maestro.dev/reference/commands-available/tapon Perform an HTTP GET request on a documentation URL with the `ask` query parameter to get dynamic answers. The question should be specific and self-contained. ```http GET https://docs.maestro.dev/reference/commands-available/tapon.md?ask= ``` -------------------------------- ### Query Documentation Dynamically Source: https://docs.maestro.dev/maestro-cloud/run-tests-on-maestro-cloud Perform an HTTP GET request with the 'ask' query parameter to get answers to specific questions not explicitly present on the page. ```http GET https://docs.maestro.dev/maestro-cloud/run-tests-on-maestro-cloud.md?ask= ``` -------------------------------- ### Query Documentation Dynamically Source: https://docs.maestro.dev/maestro-flows/workspace-management/sequential-execution To get more information not explicitly on the page, make an HTTP GET request to the current page URL with the `ask` query parameter. The question should be specific and self-contained. ```http GET https://docs.maestro.dev/maestro-flows/workspace-management/sequential-execution.md?ask= ``` -------------------------------- ### Query Documentation via HTTP GET Source: https://docs.maestro.dev/maestro-flows/workspace-management/test-reports-and-artifacts Perform an HTTP GET request on the current page URL with the `ask` query parameter to dynamically query documentation. The question should be specific and self-contained. ```http GET https://docs.maestro.dev/maestro-flows/workspace-management/test-reports-and-artifacts.md?ask= ``` -------------------------------- ### Query Documentation via HTTP GET Source: https://docs.maestro.dev/maestro-flows/flow-control-and-logic/detect-maestro Perform an HTTP GET request on a documentation URL with the 'ask' query parameter to dynamically query for information. The question should be specific and self-contained. ```http GET https://docs.maestro.dev/maestro-flows/flow-control-and-logic/detect-maestro.md?ask= ``` -------------------------------- ### Maestro Cloud with Positional Parameters (Working) Source: https://docs.maestro.dev/maestro-cli/maestro-cli-commands-and-options Illustrates a correctly ordered command using positional parameters for app file and flows. ```bash maestro cloud example.apk ./myTests ``` -------------------------------- ### Query Documentation via HTTP GET Source: https://docs.maestro.dev/reference/commands-available/runflow Perform an HTTP GET request to the current page URL with the `ask` query parameter to dynamically query the documentation. The question should be specific and self-contained. ```http GET https://docs.maestro.dev/reference/commands-available/runflow.md?ask= ``` -------------------------------- ### Query Documentation via HTTP GET Source: https://docs.maestro.dev/reference/commands-available Perform an HTTP GET request to the current page URL with the `ask` query parameter to dynamically query the documentation. The question should be specific and self-contained. ```http GET https://docs.maestro.dev/reference/commands-available.md?ask= ``` -------------------------------- ### Define onFlowStart and onFlowComplete Hooks Source: https://docs.maestro.dev/maestro-flows/flow-control-and-logic/hooks Configure setup and teardown commands to run before and after each Flow. Supports `runFlow`, `runScript`, and other commands. ```yaml # flow.yaml appId: my.app onFlowStart: - runFlow: setup.yaml - runScript: setup.js - onFlowComplete: - runFlow: teardown.yaml - runScript: teardown.js - --- - launchApp ``` -------------------------------- ### Query Documentation with HTTP GET Source: https://docs.maestro.dev/examples/recipes/reset-device-state-android Perform an HTTP GET request to the current page URL with the 'ask' query parameter to dynamically query the documentation. Use this when the answer is not explicitly present, for clarification, or to retrieve related sections. ```http GET https://docs.maestro.dev/examples/recipes/reset-device-state-android.md?ask= ``` -------------------------------- ### setClipboard Syntax Examples Source: https://docs.maestro.dev/reference/commands-available/setclipboard Demonstrates setting the clipboard with a static string and a JavaScript expression. ```yaml - setClipboard: "custom@example.com" # string ``` ```yaml - setClipboard: "${'user' + Math.floor(Math.random() * 1000) + '@example.com'}" # JavaScript expression ``` -------------------------------- ### Query Documentation via HTTP GET Source: https://docs.maestro.dev/get-started/supported-platform/ios Perform an HTTP GET request to the current page URL with the `ask` query parameter to dynamically query the documentation. Use this when the answer is not explicitly present, for clarification, or to retrieve related sections. ```http GET https://docs.maestro.dev/get-started/supported-platform/ios.md?ask= ``` -------------------------------- ### Tap on the 3rd 'Add to Basket' Button Source: https://docs.maestro.dev/examples/recipes/get-the-last-matching-element Example of targeting a specific element using its text and index. Indexes start at 0. ```yaml - tapOn: text: Add to Basket index: 2 # 3rd item. Indexes start at 0 ``` -------------------------------- ### Basic startRecording Usage Source: https://docs.maestro.dev/reference/commands-available/startrecording Use this shorthand syntax to start a recording saved as `recording.mp4`. Ensure `stopRecording` is used to finalize the video. ```yaml appId: yourAppId --- - launchApp - startRecording: recording - stopRecording ``` -------------------------------- ### Query Documentation with HTTP GET Source: https://docs.maestro.dev/maestro-cloud/build-your-app-for-the-cloud Perform an HTTP GET request to query the documentation dynamically. Use the 'ask' query parameter with a specific, self-contained question in natural language. ```http GET https://docs.maestro.dev/maestro-cloud/build-your-app-for-the-cloud.md?ask= ``` -------------------------------- ### Query Documentation with 'ask' Parameter Source: https://docs.maestro.dev/maestro-flows/workspace-management/design-your-test-architecture Perform an HTTP GET request to query documentation dynamically. Use the 'ask' query parameter with a specific, natural language question to get direct answers and relevant excerpts. ```http GET https://docs.maestro.dev/maestro-flows/workspace-management/design-your-test-architecture.md?ask= ``` -------------------------------- ### Query Documentation via HTTP GET Source: https://docs.maestro.dev/maestro-flows/javascript/run-and-debug-javascript Perform an HTTP GET request to the current page URL with the 'ask' query parameter to dynamically query the documentation. The question should be specific and self-contained. ```http GET https://docs.maestro.dev/maestro-flows/javascript/run-and-debug-javascript.md?ask= ``` -------------------------------- ### Maestro CLI Option: Specify Platform Source: https://docs.maestro.dev/maestro-cli/maestro-cli-commands-and-options Use the `-p` or `--platform` flag to select the operating system for running tests. Example format provided. ```bash -p, --platform Select the platform to run the test on. Usage: --platform=ios. ``` -------------------------------- ### Query Documentation via HTTP GET Source: https://docs.maestro.dev/examples/recipes/check-the-clipboard-content Perform an HTTP GET request to the current page URL with the 'ask' query parameter to dynamically query the documentation. The question should be specific and self-contained. ```http GET https://docs.maestro.dev/examples/recipes/check-the-clipboard-content.md?ask= ``` -------------------------------- ### Querying Documentation with `ask` Parameter Source: https://docs.maestro.dev/reference/commands-available/stoprecording This example shows how to use the `ask` query parameter to dynamically query the documentation. This is useful for retrieving specific information not explicitly present on the page or for clarification. ```http GET https://docs.maestro.dev/reference/commands-available/stoprecording.md?ask= ``` -------------------------------- ### Query Documentation Dynamically Source: https://docs.maestro.dev/reference/selectors Perform an HTTP GET request on the current page URL with the `ask` query parameter to get dynamic information. The question should be specific and in natural language. Use this for clarification or to retrieve related documentation sections. ```http GET https://docs.maestro.dev/reference/selectors.md?ask= ``` -------------------------------- ### Query Documentation via HTTP GET Source: https://docs.maestro.dev/reference/commands-available/scrolluntilvisible Perform an HTTP GET request on the current page URL with the `ask` query parameter to dynamically query the documentation. The question should be specific and in natural language. ```http GET https://docs.maestro.dev/reference/commands-available/scrolluntilvisible.md?ask= ``` -------------------------------- ### Query Documentation Dynamically Source: https://docs.maestro.dev/maestro-cloud/advanced-features/reuse-app-binary To get information not explicitly present on the page, make a GET request to the page URL with an `ask` query parameter. The response will include a direct answer and relevant excerpts. ```http GET https://docs.maestro.dev/maestro-cloud/advanced-features/reuse-app-binary.md?ask= ``` -------------------------------- ### Run French-tagged tests with French locale Source: https://docs.maestro.dev/maestro-flows/flow-control-and-logic/test-in-different-locales Combine `--device-locale` with `--include-tags` to run tests only for a specific language. This example starts an Android device with a French locale and then runs only tests tagged as 'french'. ```bash # Start the Android device using the French locale maestro start-device --platform android --device-locale fr_FR # Run only tests tagged as French maestro test --include-tags french .maestro/ ``` -------------------------------- ### Querying Documentation with assertWithAI Source: https://docs.maestro.dev/reference/commands-available/assertwithai This example shows how to dynamically query the documentation for additional information using the `ask` query parameter. This is useful when information is not explicitly present on the current page or requires clarification. ```http GET https://docs.maestro.dev/reference/commands-available/assertwithai.md?ask= ``` -------------------------------- ### Query Documentation Dynamically Source: https://docs.maestro.dev/examples/real-world-examples/automate-facebook-sign-up-android Perform an HTTP GET request on the current page URL with the `ask` query parameter to get additional information not directly available on the page. The question should be specific and self-contained. ```bash GET https://docs.maestro.dev/examples/real-world-examples/automate-facebook-sign-up-android.md?ask= ``` -------------------------------- ### Partial Flow Sequencing Example Source: https://docs.maestro.dev/maestro-flows/workspace-management/sequential-execution This configuration demonstrates how to enforce an order for a subset of your flows. Maestro will execute `flowA` then `flowB` sequentially. Any remaining flows (`C`, `D`, `E` in this example) will be executed non-deterministically after the specified sequence is complete. ```yaml executionOrder: flowsOrder: - flowA - flowB ``` -------------------------------- ### Query Documentation Dynamically Source: https://docs.maestro.dev/reference/commands-available/setclipboard Demonstrates how to query the documentation dynamically using an HTTP GET request with the `ask` query parameter for additional information. ```http GET https://docs.maestro.dev/reference/commands-available/setclipboard.md?ask= ``` -------------------------------- ### Make AppImage Executable and Run Source: https://docs.maestro.dev/get-started/quickstart On Linux, make the AppImage executable and run it with the `--no-sandbox` flag. ```bash chmod +x MaestroStudio.AppImage ./MaestroStudio.AppImage --no-sandbox ``` -------------------------------- ### Using the Image Selection Flow in a Main Test (YAML) Source: https://docs.maestro.dev/examples/recipes/choose-images-from-the-gallery This example shows how to integrate the reusable `pick_first_image.yaml` Flow into your main test suite. Ensure the gallery has content before invoking the subflow after the picker is opened. ```yaml # main_test.yaml - tapOn: "Upload Profile Picture" - runFlow: ../partials/pick_first_image.yaml ``` -------------------------------- ### Querying Documentation via GET Request Source: https://docs.maestro.dev/maestro-cloud/ci-cd-integration/bitbucket-pipelines To get additional information not directly on the page, perform an HTTP GET request with the `ask` query parameter. ```http GET https://docs.maestro.dev/maestro-cloud/ci-cd-integration/bitbucket-pipelines.md?ask= ``` -------------------------------- ### Maestro Cloud with Named Parameters (Order A) Source: https://docs.maestro.dev/maestro-cli/maestro-cli-commands-and-options Demonstrates using named parameters for app file and flows, where the order does not affect execution. ```bash maestro cloud --app-file example.apk --flows ./myTests ``` -------------------------------- ### Querying Documentation with GET Request Source: https://docs.maestro.dev/reference/commands-available/startrecording To get additional information not directly on the page, perform a GET request with the `ask` query parameter. The question should be specific and self-contained. ```http GET https://docs.maestro.dev/reference/commands-available/startrecording.md?ask= ``` -------------------------------- ### Query Documentation Dynamically Source: https://docs.maestro.dev/extra-materials/troubleshooting/bug-report Use this HTTP GET request to ask questions about the documentation. Include your question as the `ask` query parameter to receive a direct answer and relevant excerpts. ```http GET https://docs.maestro.dev/extra-materials/troubleshooting/bug-report.md?ask= ``` -------------------------------- ### Ask a Question via HTTP GET Source: https://docs.maestro.dev/extra-materials Use this method to perform an HTTP GET request on the documentation index with the `ask` parameter to get a direct answer to your question. ```http GET https://docs.maestro.dev/get-started/maestro-solutions.md?ask= ``` -------------------------------- ### Incorporate download flow into main test Source: https://docs.maestro.dev/examples/recipes/download-and-open-a-file This example shows how to include the reusable download and verification flow within your main test file. No extra environment variables are needed unless parameterizing expected text. ```yaml # main_test.yaml - tapOn: 'Reports' - runFlow: ../partials/download_and_verify_pdf.yaml ``` -------------------------------- ### Querying Documentation via HTTP GET Source: https://docs.maestro.dev/maestro-flows/workspace-management/test-discovery-and-tags To get information not explicitly on the page, make an HTTP GET request to the current page URL with an 'ask' query parameter containing your question. ```http GET https://docs.maestro.dev/maestro-flows/workspace-management/test-discovery-and-tags.md?ask= ``` -------------------------------- ### Build iOS Simulator App Bundle with Xcode CLI Source: https://docs.maestro.dev/maestro-cloud/build-your-app-for-the-cloud Create a simulator-compatible .app bundle using the xcodebuild command. This example builds a project named MyApp and saves the output to a build/ directory. ```bash xcodebuild -project MyApp.xcodeproj \ -scheme MyApp \ -configuration Debug \ -destination 'generic/platform=iOS Simulator' \ CONFIGURATION_BUILD_DIR=$PWD/build ``` -------------------------------- ### Install a Specific Maestro CLI Version Source: https://docs.maestro.dev/maestro-cli/how-to-install-maestro-cli/update-the-maestro-cli To install a specific version of Maestro CLI, set the MAESTRO_VERSION environment variable before running the installation script. Replace `{version}` with your desired version number. ```bash export MAESTRO_VERSION={version}; curl -Ls "https://get.maestro.mobile.dev" | bash ``` -------------------------------- ### Running the Maestro Test Source: https://docs.maestro.dev/examples/real-world-examples/automate-facebook-sign-up-android This bash command executes the Facebook sign-up flow defined in the 'facebook.yaml' file using the Maestro CLI. ```bash maestro test facebook.yaml ``` -------------------------------- ### Query Documentation - HTTP GET Source: https://docs.maestro.dev/reference/commands-available/setairplanemode To get additional information not directly present on the page, perform an HTTP GET request to the current page URL with the 'ask' query parameter. The question should be specific and self-contained. ```http GET https://docs.maestro.dev/reference/commands-available/setairplanemode.md?ask= ``` -------------------------------- ### Query Documentation with GET Request Source: https://docs.maestro.dev/reference/commands-available/evalscript To get additional information not directly present on the page, perform an HTTP GET request to the current page URL with the 'ask' query parameter. The question should be specific and self-contained. ```http GET https://docs.maestro.dev/reference/commands-available/evalscript.md?ask= ``` -------------------------------- ### Start a default iOS simulator Source: https://docs.maestro.dev/maestro-flows/flow-control-and-logic/specify-and-start-devices Launches a default iOS simulator (iPhone 11, iOS 15.5). If the simulator already exists, it will be launched. ```bash maestro start-device --platform ios ``` -------------------------------- ### Install Java on WSL2 Source: https://docs.maestro.dev/maestro-cli/how-to-install-maestro-cli Install OpenJDK 17, the required Java version, on your WSL2 environment. ```bash sudo apt update sudo apt install openjdk-17-jdk ``` -------------------------------- ### List all supported local devices Source: https://docs.maestro.dev/maestro-flows/flow-control-and-logic/specify-and-start-devices Lists all supported local device models and OS versions that can be used with Maestro. ```bash maestro list-devices ``` -------------------------------- ### Update Maestro CLI using Installation Script Source: https://docs.maestro.dev/maestro-cli/how-to-install-maestro-cli/update-the-maestro-cli Run this command to update Maestro CLI if you originally installed it using the installation script on macOS, Linux, or WSL2. It fetches and replaces the existing binary with the latest release. ```bash curl -fsSL "https://get.maestro.mobile.dev" | bash ``` -------------------------------- ### Verify Java Installation Source: https://docs.maestro.dev/maestro-cli/how-to-install-maestro-cli Use this command to check if your Java installation meets the minimum version requirement. ```bash java -version ``` -------------------------------- ### Query Documentation Dynamically Source: https://docs.maestro.dev/maestro-flows/javascript/manage-data-and-states Use this method to ask questions about the documentation. Perform an HTTP GET request on the current page URL with the `ask` query parameter. ```HTTP GET https://docs.maestro.dev/maestro-flows/javascript/manage-data-and-states.md?ask= ``` -------------------------------- ### Full Flow Example: Add Contact Source: https://docs.maestro.dev/reference/commands-available/tapon Demonstrates a sequence of Maestro commands to launch an app, add a new contact, and save it. Includes launching the app, tapping buttons, inputting text, and saving. ```yaml appId: com.google.android.contacts --- - launchApp - tapOn: id: ".*floating_action_button.*" # regex - inputText: "John" - tapOn: "Last Name" - inputText: "Snow" - tapOn: ".*Save.*" ``` -------------------------------- ### Flow A Example with Tags Source: https://docs.maestro.dev/maestro-flows/workspace-management/test-discovery-and-tags Example of a Flow file tagged with 'dev' and 'pull-request'. This demonstrates how individual flows can have multiple tags. ```yaml # flowA.yaml appId: com.example.app tags: - dev - pull-request ``` -------------------------------- ### Install Android Platform Tools on WSL2 Source: https://docs.maestro.dev/maestro-cli/how-to-install-maestro-cli Use the sdkmanager to install the necessary platform tools for Android development within WSL2. ```bash sdkmanager --install "platform-tools" ``` -------------------------------- ### Querying Documentation Dynamically Source: https://docs.maestro.dev/maestro-cli/maestro-cli-commands-and-options Perform an HTTP GET request with the 'ask' query parameter to retrieve specific information from the documentation. ```http GET https://docs.maestro.dev/maestro-cli/maestro-cli-commands-and-options.md?ask= ``` -------------------------------- ### Setup Java for Android Builds Source: https://docs.maestro.dev/maestro-cloud/ci-cd-integration/github-actions/platform-guides Configures the Java environment for Android builds using Gradle. ```yaml - uses: actions/setup-java@v3 with: java-version: 11 distribution: 'temurin' ``` -------------------------------- ### Query Documentation Index Source: https://docs.maestro.dev/maestro-cli Use this GET request to ask a question about the documentation. The question should be specific and self-contained. The response includes direct answers and relevant excerpts. ```http GET https://docs.maestro.dev/get-started/maestro-mcp.md?ask= ``` -------------------------------- ### Flow B Example with Tags Source: https://docs.maestro.dev/maestro-flows/workspace-management/test-discovery-and-tags Example of a Flow file tagged only with 'dev'. This contrasts with Flow A and is used to illustrate tag filtering logic. ```yaml # flowB.yaml appId: com.example.app tags: - dev ``` -------------------------------- ### Querying Documentation Dynamically Source: https://docs.maestro.dev/reference/commands-available/launchapp Perform an HTTP GET request with an 'ask' query parameter to dynamically query the documentation for specific information or clarification. ```http GET https://docs.maestro.dev/reference/commands-available/launchapp.md?ask= ``` -------------------------------- ### Query Documentation Dynamically Source: https://docs.maestro.dev/reference/commands-available/setorientation To get more information not present on the page, perform an HTTP GET request with the 'ask' query parameter. The question should be specific and self-contained. ```http GET https://docs.maestro.dev/reference/commands-available/setorientation.md?ask= ``` -------------------------------- ### Upload App Binary with Maestro CLI Source: https://docs.maestro.dev/maestro-cloud/build-your-app-for-the-cloud Use the Maestro CLI to upload your app binary and flows to Maestro Cloud. Replace '[your-app-binary]' and '[your-flow-directory]' with your specific paths. ```bash maestro cloud --app-binary [your-app-binary] --flows [your-flow-directory] ``` -------------------------------- ### Query Documentation Dynamically Source: https://docs.maestro.dev/maestro-flows/workspace-management/record-your-flow To get answers not explicitly on the page, make a GET request to the documentation URL with an `ask` query parameter containing your question. ```http GET https://docs.maestro.dev/maestro-flows/workspace-management/record-your-flow.md?ask= ``` -------------------------------- ### Query Documentation with 'ask' parameter Source: https://docs.maestro.dev/maestro-cli/using-a-proxy-with-maestro-cli Perform an HTTP GET request to query the documentation dynamically by appending the 'ask' query parameter with your question. ```http GET https://docs.maestro.dev/maestro-cli/using-a-proxy-with-maestro-cli.md?ask= ``` -------------------------------- ### Query documentation dynamically Source: https://docs.maestro.dev/maestro-flows/flow-control-and-logic/how-to-use-selectors To get additional information not directly on the page, query the documentation dynamically using a GET request with the 'ask' query parameter. ```http GET https://docs.maestro.dev/maestro-flows/flow-control-and-logic/how-to-use-selectors.md?ask= ``` -------------------------------- ### Query Documentation Dynamically Source: https://docs.maestro.dev/maestro-cloud/environment-configuration/configure-the-os To get information not explicitly on the page, make a GET request to the documentation URL with an `ask` query parameter containing your question. ```http GET https://docs.maestro.dev/maestro-cloud/environment-configuration/configure-the-os.md?ask= ``` -------------------------------- ### Query Documentation via HTTP GET Source: https://docs.maestro.dev/get-started/supported-platform/android/jetpack Perform an HTTP GET request on the current page URL with the `ask` query parameter to dynamically query documentation. Use this when the answer is not explicitly present, requires clarification, or to retrieve related sections. ```http GET https://docs.maestro.dev/get-started/supported-platform/android/jetpack.md?ask= ``` -------------------------------- ### Query Documentation API Source: https://docs.maestro.dev/maestro-cli/how-to-install-maestro-cli/update-the-maestro-cli To get information not explicitly on the page, make a GET request to the documentation URL with an 'ask' query parameter containing your question. ```http GET https://docs.maestro.dev/maestro-cli/how-to-install-maestro-cli/update-the-maestro-cli.md?ask= ``` -------------------------------- ### Basic Nested Flow Example Source: https://docs.maestro.dev/maestro-flows/flow-control-and-logic/nested-flows Demonstrates how to run a subflow for login from a main test flow. The `login.yaml` handles authentication, and `profile_test.yaml` calls it. ```yaml appId: org.wikipedia --- - launchApp - runFlow: ../common/login.yaml - assertVisible: "Explore" ``` ```yaml appId: org.wikipedia --- - tapOn: id: drawer_icon_menu - tapOn: LOG IN / JOIN WIKIPEDIA - tapOn: Username - inputText: myUsername - tapOn: Password - inputText: myPassword - tapOn: LOG IN ```