WinAppDriver: Element not found in WinAppDriver but found in Inspect

50 views Asked by At

I need to interact with a button inside my application which have three child elements inside:

Inspect vision

  1. An Icon
  2. A TextBlock
  3. A Button

The problem is that this "DisplayName" element isn't visible for WinAppDriver. I get this button element and print each child element 'AutomationId':

var btnChildElements = btnElement.FindElementsByXPath("//*");

Console.WriteLine("Elements count: " + btnChildElements.Count);

foreach (var element in btnChildElements)
{
    Console.WriteLine("ID: " + element.GetAttribute("AutomationId"));
}

Here's the output:

Elements count: 3
ID: 
ID: Icon
ID: CloseButton

I forwarded the case to the development team to make this element visible to WinAppDriver. However, they investigated and were unable to discover the reason.

Any idea of ​​the possible reason and solution to make this element visible to WinAppDriver?

Thanks in advance!

0

There are 0 answers