Description
Thefocus-application
command displays a specific application window to the foreground. This ensures that subsequent commands interact with the correct application during a test.
Arguments
Argument | Type | Description |
---|---|---|
name | string | The name of the application to focus. This should match the application’s display name. |
Example usage
Protips
- Ensure the application name matches the exact name displayed in your operating system’s task manager.
- Use this command at the start of a test or before interacting with an application to avoid focus-related issues.
If the specified application isn’t running, the command will fail. Ensure the application is open before using this command.
For example, to launch chrome try using the exec command:
Notes
- The
focus-application
command is useful for multi-application workflows where you need to switch between different apps during a test.