locked
Can i test Window app via UIAutomation on Windows container? RRS feed

  • Question

  • Hello.

    I tried to test how to use UI Automatic test for Windows App during few weeks.
    But Windows container dosen't get element of UI via UIAutomation.

    ※ i used mcr.microsoft.com/windows:1903 image.

    When AutoTest Tool open dialog, Tools try to find elemental on dialog. But it can't be found.
    Does anyone known this issue? I need to help your advise and hope to find solution for this.

    ------------------------- Log ------------------------------------

    Windows.Select File at Dialog (C:\Windows\win.ini) is called
    Can not find file open dialog
    Error during capture
    System.ComponentModel.Win32Exception (0x80004005): The handle is invalid
       at System.Drawing.Graphics.CopyFromScreen(Int32 sourceX, Int32 sourceY, Int32 destinationX, Int32 destinationY, Size blockRegionSize, CopyPixelOperation copyPixelOperation)
       at System.Drawing.Graphics.CopyFromScreen(Int32 sourceX, Int32 sourceY, Int32 destinationX, Int32 destinationY, Size blockRegionSize)
       at HP.GFriend.Keywords.Windows.GetScreenShot(Rect bound) in



    • Edited by DJ-kor Monday, June 17, 2019 5:26 AM
    Monday, June 17, 2019 4:09 AM

All replies

  • In my experience, windows (including new dialogs that appear, such as from clicking through menus, etc.) do not always appear in the level of the UI hierarchy that you would expect when interacting with them inside of containers vs. in a normal desktop environment. All of my testing has been around using the STUPS UIAutomation PowerShell modules, so far.

    If possible, have you tried determining if any new window elements are available at the desktop / root UI element after causing the dialog to appear?

    Wednesday, July 17, 2019 5:25 PM