Microsoft Windows App - cannot record test cases due to stack overflow and other errors

Trying to use Windows Desktop automation to record a test case but cannot due to issues with all methods (mentioned below):

  1. using Windows Recorder option: repeatedly get error message ‘WebDriverException:Connection refused’ in Katalon and driver stops with message ‘Process is terminated due to StackOverflowException.’ (I have WinAppDriver 1.2.1 installed and started by the way).
  2. using Native Windows Recorder option: app opens but no further steps are recorded. Message in cmd prompt reads “HTTP/1.1 404 Not Found
    Content-Length: 128
    Content-Type: application/json”. No further entries are recorded.
  3. Windows Spy - not found a good way of locating elements. Even AutomationID can return more than one element, same for Name values.

Operating System

  • For example: Windows 10

Katalon Studio Version

KSE 8.0.5

Katalon Studio logs

  • Windows logs folder: \config.metadata.log
    ATTACHED log.txt (515.1 KB)

Appliction under test:

Dynamics 365 for Desktop [Microsoft.MicrosoftDynamics365ForWindows10_3.21072.8.0_x64__8wekyb3d8bbwe]
The app ID opens a Windows Store application.

Steps to reproduce - for Windows Recorder that results in WinAppDriver crashing:

  1. start WinAppDriver from the command line (navigate to directory and open application)

  2. Enable Dev mode in Win 10

  3. Open Windows Recorder in Katalon

  4. Supply Application ID as Application File.

  5. Click Start

  6. Wait for screen to load and then refresh it, because screen has been captured before load finishes

  7. Find element on screen for action and then press ‘Click’ for example

  8. Note activity in command prompt - loads of these:
    "Exception: Encountered element sharing the same runtimeId 42.1246640.4.5.1.619

    new Object {15:00, wj-cell wj-alt, 42.1246640.4.5.1.619}
    runtimeId 42.1246640.4.5.1.619
    className wj-cell wj-alt
    name 15:00
    NativeWindowHandle 0

    existing Object {15:00, wj-cell wj-alt, 42.1246640.4.5.1.619}
    runtimeId 42.1246640.4.5.1.619
    className wj-cell wj-alt
    name 15:00
    NativeWindowHandle 0
    Ignoring new object and keeping existing one"

  9. In command prompt, get message “Process is terminated due to StackOverflowException.”

  10. In katalon, see warning ‘unable to perform action: Click’ due to “org.openqa.selenium.WebDriverException: Connection refused: connect” (presume because the WinAppDriver has crashed by this point)

Hi @Dan_Bown,

Thanks for reaching out. Below are some recommendations from us:

  1. Close all running apps except Dynamics 365 for Desktop to avoid being crashed due to out of memory.
  2. If the 1st one does not work, please download the latest version of WinAppDriver (version 1.2.99) and try again.

Regards,
Shin

Hi @Shin
I did try closing all but essential apps and also increased heap size but no result. Your colleague linked me some similar tickets for WinAppDriver related to other MS products and I’m now raising a ticket for this app - seems to be a problem with the MS Dynamics desktop app.
For ref, I used Inspect.exe to check and that also crashes out.
Thanks, Dan