Overview
Bring a specific application window to the foreground and make it the active window for interactions.Syntax
Parameters
Application name (e.g.,
'Google Chrome', 'Microsoft Edge', 'Notepad')Returns
Promise<string> - Result message
Examples
Common Applications
After Opening Applications
Best Practices
Focus before UI interactionsAlways focus the target application before interacting with its UI:
Wait after launching appsGive applications time to open before focusing:
Use exact application names
Use Cases
Multi-Application Testing
Multi-Application Testing
Browser Switching
Browser Switching
Desktop Application Testing
Desktop Application Testing
Window Management
Window Management
Common Application Names
Browsers
'Google Chrome''Microsoft Edge''Mozilla Firefox''Safari'(macOS)
Office Applications
'Microsoft Word''Microsoft Excel''Microsoft PowerPoint''Microsoft Outlook'
Development Tools
'Visual Studio Code''Visual Studio''IntelliJ IDEA''Sublime Text'
System Applications
'Notepad''File Explorer''Command Prompt''Windows PowerShell''Task Manager'
Communication
'Microsoft Teams''Slack''Discord''Zoom'
Complete Example
Related Methods
exec()- Launch applications with PowerShellpressKeys()- Use Alt+Tab to switch windowsfind()- Locate elements in the focused window

