Description

The focus-application command brings a specific application window to the foreground. This ensures that subsequent commands interact with the correct application during a test.

Arguments

ArgumentTypeDescription
namestringThe name of the application to focus. This should match the application’s display name.

Example usage

command: focus-application
name: Google Chrome

Protips

  • Ensure the application name matches the exact name displayed in your operating system’s task manager or application switcher.
  • Use this command at the start of a test or before interacting with an application to avoid focus-related issues.

Gotchas

  • If the specified application isn’t running, the command will fail. Ensure the application is open before using this command.
  • On macOS, the application name is case-sensitive.

Notes

  • The focus-application command is useful for multi-application workflows where you need to switch between different apps during a test.
  • Supported on both Windows and macOS environments.