Text is visible in UI of WPF application but WinAppdriver is unable to identify the text

408 Views Asked by At

I am trying to automate a windows Application (WPF) using WinAppdriver v1.2.1 and Java. However I am facing an issue now in identifying the Text which is visible in the UI but winappdriver is not able to locate it. (I made sure that the xpath is correct). I even tried the xpath generated by UIRecorder

In screenshot below, the highlighted text is what I want to locate:

enter image description here

Astonishingly, the Inspect.exe tool is able to show the text and the control type is UIA_TextControl and all other attributes are available, as displayed in screenshot below:

enter image description here

Since the driver was not able to identify Text, to verify this strange behaviour, I used another UI inspect tool. When trying to locate the text using FlaUInspect, the Text Control is not visible under TreeItem.

I am wondering:

  1. Why these Windows UI inspect tools have different behaviour and Why winappdriver is not able to identify the TextControl when it is clearly visible in UI and in inspect.exe tool?

  2. Has anyone faced similar issue ever?

0

There are 0 best solutions below