WindowsDriver NULL: starting WinAppDriver and MSIX App from Code

Hi!

When i start WinAppDriver and the App (installed MSIX package) manually and start the inspector: everything works out correct. Also running tests did work

When I start WinnAppDriver and App from Code:

  • Driver started and listening
  • App started
  • But i cant get the driver-Session, brause it is saied to be NULL.

ANY IDEAS? Could this be because of the app, being installed from an MSIX package?!?

String startWinAppDriver = GlobalVariable.WinAppDriver
ProcessBuilder builder = new ProcessBuilder(startWinAppDriver).inheritIO()
Process startWinAppDriverProcess = builder.start()


String aumid = "Microsoft.WindowsCalculator_8wekyb3d8bbwe!App"
String appArguments = "shell:appsFolder\\$aumid"
String[] cmd = ["explorer.exe", appArguments]
Process process = new ProcessBuilder(cmd).start()


WindowsDriver driver = WindowsDriverFactory.getWindowsDriver()
driver.manage().window().maximize()

Test Cases/_Sandbox/StartApp/Calc FAILED.
Reason:
java.lang.NullPointerException: Cannot invoke "com.kms.katalon.core.windows.driver.WindowsSession.getRunningDriver()" 
because "com.kms.katalon.core.windows.driver.WindowsDriverFactory.windowsSession" is null

1 Like

Hi,

Thank you for letting us know your problems. I think the error relates to Windows drivers and the required library. Can you please take a look at this setup Set up WinAppDriver in Katalon Studio | Katalon Docs to make sure WinAppDriver is good? Also, try WindowsDriverFactory.createWindowsSession() to create the session so that you will not receive NULL

Hi and thank you for your quick answer.
WinAppDriver seems to be running correctly.
I’m afraid, the function .createWindowsSession() is not available → WindowsDriverFactory (Katalon Studio API Specification).
I’m working with the free version at the moment. Would PRO make a difference here?

I got an official statement now: “I’ve confirmed with our team that MSIX-packed application is not supported by Katalon now […]”

Additionally there was an issue with appium version.

2 Likes

Hi there,

Thank you very much for your topic. Please note that it may take a little while before a member of our community or from Katalon team responds to you.

Thanks!

1 Like