# Can't Automate Windows Calculator

**URL:** <https://forum.katalon.com/t/cant-automate-windows-calculator/178645>\
**Category:** Miscellaneous\
**Created:** [July 18, 2025, 1:52am UTC](https://forum.katalon.com/t/cant-automate-windows-calculator/178645 "2025-07-18T01:52:38Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![jeanroody.saintjean1](https://dub1.discourse-cdn.com/katalon/user_avatar/forum.katalon.com/jeanroody.saintjean1/32/30227_2.png) [@jeanroody.saintjean1](https://forum.katalon.com/u/jeanroody.saintjean1)\
**Post date:** [July 18, 2025, 1:52am UTC](https://forum.katalon.com/t/cant-automate-windows-calculator/178645/1 "2025-07-18T01:52:38Z")

</div>

Hello,

I’m having trouble automate the windows calculator. When I click on the Window Recorder, give my file path (C:\Windows\System32\calc.exe), and then click start to start the recording, the calculator opens but I got this error message.

Please help if you know how to solve this issue. Thank you.

java.util.concurrent.ExecutionException: org.openqa.selenium.SessionNotCreatedException: Unable to create a new remote session. Please check the server log for more details. Original error: Failed to locate opened application window with appId: C:\Windows\System32\calc.exe, and processId: 9856 (WARNING: The server did not provide any stacktrace information)

Command duration or timeout: 318 milliseconds

Build info: version: ‘3.141.59’, revision: ‘unknown’, time: ‘unknown’

System info: host: ‘’, ip: ‘’, os.name: ‘Windows 11’, os.arch: ‘amd64’, os.version: ‘10.0’, java.version: ‘17.0.7’

Driver info: driver.version: WindowsDriver

Build info: version: ‘3.141.59’, revision: ‘unknown’, time: ‘unknown’

System info: host: ‘’, ip: ‘’, os.name: ‘Windows 11’, os.arch: ‘amd64’, os.version: ‘10.0’, java.version: ‘17.0.7’

Driver info: driver.version: WindowsDriver

at com.kms.katalon.composer.components.impl.dialogs.ProgressMonitorDialogWithThread.runAndWait(ProgressMonitorDialogWithThread.java:49)

at com.kms.katalon.composer.windows.dialog.WindowsAppComposite$5.run(WindowsAppComposite.java:239)

at org.eclipse.jface.operation.ModalContext$ModalContextThread.run(ModalContext.java:122)

Caused by: org.openqa.selenium.SessionNotCreatedException: Unable to create a new remote session. Please check the server log for more details. Original error: Failed to locate opened application window with appId: C:\Windows\System32\calc.exe, and processId: 9856 (WARNING: The server did not provide any stacktrace information)

Command duration or timeout: 318 milliseconds

Build info: version: ‘3.141.59’, revision: ‘unknown’, time: ‘unknown’

System info: host: ‘’, ip: ‘1’, os.name: ‘Windows 11’, os.arch: ‘amd64’, os.version: ‘10.0’, java.version: ‘17.0.7’

Driver info: driver.version: WindowsDriver

Build info: version: ‘3.141.59’, revision: ‘unknown’, time: ‘unknown’

System info: host: ‘’, ip: ‘’, os.name: ‘Windows 11’, os.arch: ‘amd64’, os.version: ‘10.0’, java.version: ‘17.0.7’

Driver info: driver.version: WindowsDriver

at io.appium.java\_client.remote.AppiumCommandExecutor$1.createSession(AppiumCommandExecutor.java:208)

at io.appium.java\_client.remote.AppiumCommandExecutor.createSession(AppiumCommandExecutor.java:217)

at io.appium.java\_client.remote.AppiumCommandExecutor.execute(AppiumCommandExecutor.java:239)

at org.openqa.selenium.remote.RemoteWebDriver.execute(RemoteWebDriver.java:552)

at io.appium.java\_client.DefaultGenericMobileDriver.execute(DefaultGenericMobileDriver.java:42)

at io.appium.java\_client.AppiumDriver.execute(AppiumDriver.java:1)

at io.appium.java\_client.windows.WindowsDriver.execute(WindowsDriver.java:1)

at org.openqa.selenium.remote.RemoteWebDriver.startSession(RemoteWebDriver.java:213)

at org.openqa.selenium.remote.RemoteWebDriver.(RemoteWebDriver.java:131)

at io.appium.java\_client.DefaultGenericMobileDriver.(DefaultGenericMobileDriver.java:38)

at io.appium.java\_client.AppiumDriver.(AppiumDriver.java:84)

at io.appium.java\_client.windows.WindowsDriver.(WindowsDriver.java:38)

at com.kms.katalon.core.windows.driver.WindowsDriverFactory.newWindowsDriver(WindowsDriverFactory.java:184)

at com.kms.katalon.core.windows.driver.WindowsDriverFactory.startApplication(WindowsDriverFactory.java:142)

at com.kms.katalon.composer.windows.spy.WindowsInspectorController.startApplication(WindowsInspectorController.java:149)

at com.kms.katalon.composer.windows.dialog.WindowsAppComposite$5$1.call(WindowsAppComposite.java:242)

at com.kms.katalon.composer.components.impl.dialogs.ProgressMonitorDialogWithThread.startThreadAndWait(ProgressMonitorDialogWithThread.java:36)

at com.kms.katalon.composer.components.impl.dialogs.ProgressMonitorDialogWithThread.runAndWait(ProgressMonitorDialogWithThread.java:48)

… 2 more

Caused by: java.lang.reflect.InvocationTargetException

at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)

at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:77)

at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)

at io.appium.java\_client.remote.AppiumCommandExecutor$1.createSession(AppiumCommandExecutor.java:186)

… 19 more

Caused by: org.openqa.selenium.WebDriverException: Failed to locate opened application window with appId: C:\Windows\System32\calc.exe, and processId: 9856 (WARNING: The server did not provide any stacktrace information)

Command duration or timeout: 318 milliseconds

Build info: version: ‘3.141.59’, revision: ‘unknown’, time: ‘unknown’

System info: host: ‘’, ip: ‘’, os.name: ‘Windows 11’, os.arch: ‘amd64’, os.version: ‘10.0’, java.version: ‘17.0.7’

Driver info: driver.version: WindowsDriver

at java.base/jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)

at java.base/jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:77)

at java.base/jdk.internal.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)

at org.openqa.selenium.remote.ErrorHandler.createThrowable(ErrorHandler.java:214)

at org.openqa.selenium.remote.ErrorHandler.throwIfResponseFailed(ErrorHandler.java:166)

at org.openqa.selenium.remote.JsonWireProtocolResponse.lambda$errorHandler$0(JsonWireProtocolResponse.java:54)

at org.openqa.selenium.remote.HandshakeResponse.lambda$getResponseFunction$0(HandshakeResponse.java:30)

at org.openqa.selenium.remote.ProtocolHandshake.lambda$createSession$0(ProtocolHandshake.java:126)

at org.openqa.selenium.remote.ProtocolHandshake.createSession(ProtocolHandshake.java:128)

… 23 more

---

<div class="post-metadata">

**Author:** ![dineshh](https://dub1.discourse-cdn.com/katalon/user_avatar/forum.katalon.com/dineshh/32/24488_2.png) [@dineshh](https://forum.katalon.com/u/dineshh)\
**Post date:** [July 18, 2025, 6:05am UTC](https://forum.katalon.com/t/cant-automate-windows-calculator/178645/2 "2025-07-18T06:05:26Z")

</div>

kindly format your code with ``` for better readability

---

<div class="post-metadata">

**Author:** ![dineshh](https://dub1.discourse-cdn.com/katalon/user_avatar/forum.katalon.com/dineshh/32/24488_2.png) [@dineshh](https://forum.katalon.com/u/dineshh)\
**Post date:** [July 18, 2025, 6:07am UTC](https://forum.katalon.com/t/cant-automate-windows-calculator/178645/3 "2025-07-18T06:07:50Z")

</div>

To automate the Windows Calculator using Katalon Studio, follow these steps to resolve the common issues with WinAppDriver:

## Step-by-Step Solution:

1. **Use Correct Calculator Path:**

groovy

```auto
// Use this path for modern Windows 10/11 Calculator
String calculatorPath = "Microsoft.WindowsCalculator_8wekyb3d8bbwe!App"

// Or try the UWP version path
// String calculatorPath = "C:\\Windows\\System32\\calc.exe"

```

1. **Start WinAppDriver Before Execution:**

- Download [WinAppDriver](https://github.com/microsoft/WinAppDriver/releases)
- Run it as Administrator before executing tests
- Default URL: `http://127.0.0.1:4723/`

1. **Katalon Script Configuration:**

groovy

```auto
import org.openqa.selenium.windows.WindowsDriver
import org.openqa.selenium.remote.DesiredCapabilities

// Configure Desired Capabilities
DesiredCapabilities capabilities = new DesiredCapabilities()
capabilities.setCapability("app", calculatorPath)
capabilities.setCapability("platformName", "Windows")
capabilities.setCapability("deviceName", "WindowsPC")

// Initialize WindowsDriver
WindowsDriver driver = new WindowsDriver(new URL("http://127.0.0.1:4723"), capabilities)

```

1. **Handle UAC Prompt (If Appearing):**

groovy

```auto
// Add this capability to bypass UI automation restrictions
capabilities.setCapability("ms:waitForAppLaunch", 15)

```

## Troubleshooting Checklist:

1. **Run as Administrator:**

- Run Katalon Studio as Administrator
- Run WinAppDriver as Administrator

1. **Calculator Version Compatibility:**

- For Windows 10/11, use the UWP Calculator path shown above
- For older Windows versions, try:

groovy

```auto
String calculatorPath = "C:\\Windows\\System32\\calc.exe"

```

1. **Check Calculator Process:**

- Ensure Calculator isn’t running in background before test

groovy

```auto
Runtime.getRuntime().exec("taskkill /f /im Calculator.exe")

```

1. **WinAppDriver Logs:**

- Check logs at `C:\Program Files (x86)\Windows Application Driver\WinAppDriver.log` for detailed errors

1. **Firewall Exception:**

- Allow `WinAppDriver.exe` through Windows Defender Firewall

## Alternative Automation Approach:

If WinAppDriver issues persist, use Windows native automation:

groovy

```auto
// Example using autoIT integration
Runtime.getRuntime().exec("autoit_script.exe")

// Sample autoIT script (calculator.au3)
WinActivate("Calculator")
ControlClick("Calculator", "", "Button1") // Clicks '1'
ControlClick("Calculator", "", "Button23") // Clicks '='

```

## Final Verification:

After implementation, check:

1. WinAppDriver is running (system tray icon visible)
2. No Calculator instances running before test
3. Correct capabilities set for your Windows version
4. Katalon and WinAppDriver both running as Administrator

---

<div class="post-metadata">

**Author:** ![morgan.giribuola](https://dub1.discourse-cdn.com/katalon/user_avatar/forum.katalon.com/morgan.giribuola/32/23869_2.png) [@morgan.giribuola](https://forum.katalon.com/u/morgan.giribuola)\
**Post date:** [July 18, 2025, 3:09pm UTC](https://forum.katalon.com/t/cant-automate-windows-calculator/178645/4 "2025-07-18T15:09:03Z")

</div>

Did you start the WindowsAppDriver before using the recorder ?
