Search code examples
c#winformswinappdriver

winappdriver get Data from System.Data.DataRowView


I am writing an UI Test for a Windows Forms application, up untill now I was able to extract the nessesary information for the Tests with the Windows Kit inspect tool

The Inspector Tool enter image description here

now my problem is, I got the following list, but I cant get the text of the list item. Normally the text of an element is the property Name but in this list its just "System.Data.DataRowView"

The List in the UI enter image description here

for anyone corious, this is how im getting the element (C#)

WindowsElement element = driver.FindElementByName("System.Data.DataRowView");

and this is how it looks like in the Debugger: enter image description here


Solution

  • Just found out it is not possible, this issiue on the github repository describes it:

    https://github.com/microsoft/WinAppDriver/issues/1475

    The only workarounds are screnshoting and extracting the Text with OCR