create_session
Launch a Windows application and start a new Appium session for UI automation. Supports attaching to running windows or launching new instances.
Instructions
Launch a Windows application and start a new Appium session. Ask the user before calling — confirm they want a new app instance launched.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| app | No | Executable path (e.g. "C:\\Windows\\notepad.exe") or UWP App ID (e.g. "Microsoft.WindowsCalculator_8wekyb3d8bbwe!App") or "Root" to attach to the desktop root. Omit when using appTopLevelWindow to attach to an already-running window. | |
| jdkPath | No | Path to the JDK installation used to inject the Java agent (e.g. "C:\\Program Files\\Eclipse Adoptium\\jdk-21"). Required if javaSwing is true and JAVA_HOME is not set. | |
| javaSwing | No | Enable Java agent support for automating Java Swing/AWT applications. Injects a JVM agent that exposes Java class names, accessible names, and roles for element finding. | |
| appArguments | No | Command-line arguments to pass to the app | |
| dotnetBridge | No | Enable .NET bridge support for automating WinForms/WPF apps with custom-drawn controls (e.g. DevExpress) that expose little or nothing via UIA. Injects a bridge DLL into the target CLR process. Requires appTopLevelWindow — there is no launch-time injection for .NET, only attach to an already-running process. | |
| appWorkingDir | No | Working directory for the app process | |
| shouldCloseApp | No | Whether to close the app when delete_session is called | |
| webviewEnabled | No | Enable WebView/CDP support for hybrid apps (Edge/Chrome-based embedded webviews) | |
| delayAfterClick | No | Milliseconds to wait after each click | |
| implicitTimeout | No | Implicit element wait timeout in milliseconds | |
| delayBeforeClick | No | Milliseconds to wait before each click | |
| waitForAppLaunch | No | Milliseconds to wait after app launch before interacting | |
| appTopLevelWindow | No | Native window handle (decimal or hex string, e.g. "0x001A0B2C") of an already-running window to attach to instead of launching a new app. Use with javaSwing:true to attach the Java agent to an existing Java Swing/AWT window, or with dotnetBridge:true to attach the .NET bridge to an existing WinForms/WPF window. | |
| smoothPointerMove | No | Easing function name for smooth pointer movement | |
| ieDriverServerPath | No | Absolute path to a local IEDriverServer.exe. Overrides the auto-downloaded binary when IE windows are automated. Example: "C:\\WebDriver\\IEDriverServer.exe" | |
| webviewDevtoolsPort | No | DevTools remote debugging port the embedded webview is listening on | |
| newSessionCommandTimeout | No | Seconds of inactivity before Appium auto-closes the session (default: 3600). Maps to Appium newCommandTimeout capability. |