I need to interact with a button inside my application which have three child elements inside:
- An Icon
- A TextBlock
- 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!