WindowsDriver fails to initialize when using CustomCapabilities instead of the Windows execution profile

Hi everyone,

I currently have a project that involves both Web and Windows components. It was originally built using Katalon version 9, where the WindowsDriver had to be manually initialized in order to run the execution — which worked fine.

Now, we’re planning to migrate to Katalon version 10. In this version, the Windows driver (FlaUI) is already integrated, and that’s where the issues began.

What happened?

When testing the case that includes the Windows part using the Windows execution profile, the test runs successfully: it launches the application, navigates through it, but then fails when it reaches the code that executes a Web fragment. To avoid this, both drivers need to be initialized simultaneously (based on my experience with Appium and Chrome, this approach has worked).

How do we do that? By using CustomCapabilities. The configuration was set up, but it doesn’t work.

Error:

I tried with
Windows.*startApplicationWithTitle - same result
*
I’ve tried different ways, including sending the application path from the custom file, but it doesn’t work

I don’t know what’s going on, but CustomCapabilities doesn’t initialize FlaUI

3 Likes

Hi @o.castano

I have experienced the same problem. If you have found a solution, please let me know

hi @o.castano & @elisatek2001

seems it’s like limitation in Katalon 10, not a configuration issue

in v10, Windows automation (FlaUI / WindowsDriver) only initializes correctly when using the Windows execution profile.
CustomCapabilities does not support initializing WindowsDriver and WebDriver together, even if the capabilities are defined correctly.

that’s why it worked in Katalon 9 (manual driver control) but fails in v10, where Katalon manages the Windows driver lifecycle internally.

supported options:

  • Run the test using the Windows execution profile, start Windows first, then execute Web steps.
  • Or split Windows and Web into separate test cases / executions.

AFAIK using CustomCapabilities for dual Windows + Web drivers is currently not supported in Katalon 10.

Problem Analysis

You’ve identified a known architectural limitation in Katalon Studio 10 when attempting hybrid testing with both Web and Windows components. Here’s what’s happening:

The Core Issue:

  • In Katalon 9, you manually initialized the WindowsDriver, which allowed you to control when and how the driver was instantiated
  • In Katalon 10, the FlaUI driver (Windows driver) is now integrated and automatically managed by Katalon Studio
  • Critical Limitation: Katalon Studio 10 is designed to work with one driver at a time per execution profile. When you use the Windows execution profile, it initializes the Windows driver, but the architecture doesn’t support simultaneous initialization of both Web and Windows drivers in a single test execution

This is an architectural constraint, not a configuration issue—which is why your CustomCapabilities approach isn’t working as expected.


Solution / Recommended Approaches

Option 1: Separate Test Cases (Recommended for Katalon 10)

Split your hybrid test into separate test cases:

  1. Test Case 1 - Windows Fragment: Execute all Windows-specific operations
  2. Test Case 2 - Web Fragment: Execute all Web-specific operations
  3. Test Suite: Call both test cases sequentially
// Test Suite execution flow
WebUI.callTestCase(findTestCase('Windows/WindowsOperations'), [:])
WebUI.callTestCase('Web/WebOperations', [:])

Advantages:

  • Each test case uses its appropriate driver (Windows or Web)
  • No driver conflicts
  • Cleaner separation of concerns
  • Easier to maintain and debug

Option 2: Use Custom Keywords with Driver Management

Create custom keywords that manage driver switching:

// CustomKeywords/HybridTestingKeywords.groovy
@Keyword
def switchToWindowsDriver() {
    // Initialize Windows driver context
    Windows.startApplication('path/to/app.exe')
}

@Keyword
def switchToWebDriver() {
    // Initialize Web driver context
    WebUI.openBrowser('https://your-url.com')
}

@Keyword
def performWindowsActions() {
    switchToWindowsDriver()
    // Windows operations here
    Windows.click(findTestObject('Windows/Button'))
}

@Keyword
def performWebActions() {
    switchToWebDriver()
    // Web operations here
    WebUI.click(findTestObject('Web/Button'))
}

Then in your test case:

performWindowsActions()
performWebActions()

Option 3: Sequential Execution with Proper Cleanup

If you must keep operations in one test case, ensure proper driver lifecycle management:

// Test Case: Hybrid Test
import com.kms.katalon.core.webui.keyword.WebUiBuiltInKeywords as WebUI
import com.kms.katalon.core.windows.keyword.WindowsBuiltinKeywords as Windows

// Phase 1: Windows Operations
Windows.startApplication('C:\\path\\to\\app.exe')
Windows.click(findTestObject('Windows/LoginButton'))
Windows.setText(findTestObject('Windows/UsernameField'), 'testuser')
Windows.delay(2)
Windows.closeApplication()

// Phase 2: Web Operations (after Windows driver is closed)
WebUI.openBrowser('https://your-application.com')
WebUI.click(findTestObject('Web/LoginButton'))
WebUI.setText(findTestObject('Web/UsernameField'), 'testuser')
WebUI.closeBrowser()

Key Considerations

Why CustomCapabilities Doesn’t Work for Hybrid Testing

The CustomCapabilities feature in Katalon 10 is designed to configure one driver with multiple capabilities, not to initialize multiple different drivers simultaneously. The documentation explicitly states:

“You can have at most one web driver and one mobile driver here since there may be a potential conflict if you use multiple web or mobile drivers in the same test execution.”

This limitation applies to Web + Windows combinations as well.

Migration Notes from Katalon 9 to 10

  1. Driver Initialization: In KS 10, the FlaUI driver auto-starts on localhost:4723 (no manual initialization needed)
  2. Desired Capabilities: Update any custom capabilities with the appium: prefix (e.g., appium:appWorkingDir, appium:appArguments)
  3. Known Limitations (per official docs):
    • Application closing may be delayed
    • Multiple windows can cause focus issues
    • Dropdown lists and context menus cannot be inspected locally

Best Practice for Hybrid Projects

  • Use Execution Profiles: Create separate profiles for Windows and Web testing
  • Modularize Test Cases: Keep Windows and Web operations in separate test cases
  • Use Test Suites: Orchestrate the execution flow through test suites
  • Leverage Custom Keywords: Abstract driver-specific logic into reusable keywords

References


Bottom Line: The simultaneous initialization of both Web and Windows drivers in a single execution is an architectural limitation in Katalon 10. The recommended approach is to split your hybrid test into separate test cases or use sequential execution with proper driver lifecycle management. This aligns with Katalon’s design philosophy and will provide more stable, maintainable tests.

Thank you for your response. My question now is, do you have any plans to organize this limitation in the short term?