1

Trying to automate my windows application with FlaUI and noticed some components are not recognized.

  1. Launch application immediately opens a window which has a Grid Pane.

  2. The opened window has an item to be selected from the grid (from the list of items) to proceed further.

  3. However UIA3 and UIA2 finds it difficult to get the element and its Value. (see below) enter image description here

  4. In the above screenshot the Value is supposed to be “Item to be selected from the list” but instead it is [#30093]. Q: How to get the actual value from application??

  5. While verifying in inspect.exe I noticed that the components are displayed but the same is not shown in FlauInspect.exe (screens below)

  6. SSC window has 7 subitems shown by Inspect while in Flauinspect.exe it shows only a button. Inspect.exe enter image description here

Flauinspect.exe enter image description here

SandyKrish
  • 11
  • 2
  • Since inspect can see your element it is very likely this is a bug with FlaUI itself. In scenarios like this FlaUI provides access to the underlying raw ui automation object. You should give using the AutomationElement property a try on the parent object and see if you can find the element you are looking for. I can write up a answer once I get home. – Max Young Nov 08 '21 at 19:58
  • hey @MaxYoung thanks for your response. Can you please help me with "In scenarios like this FlaUI provides access to the underlying raw ui automation object" ?? how do I access elements using the Raw UI objects? – SandyKrish Nov 09 '21 at 09:36
  • sorry have not had time to write a proper answer but [here](https://github.com/FlaUI/FlaUI/blob/master/src/FlaUI.UIA3/UIA3Automation.cs#L70) is the native/raw automation element property. This allows you to bypass FlaUI and directly interact with the automation element. When I said "In scenarios like this" I was referring to when you have a UIA client like inspect which works but then FlaUI Inspect does not yield the same results. This indicates that the framework itself has a bug and is why the native property exists so that in these cases a developer can continue to work past the bug. – Max Young Nov 10 '21 at 04:12
  • can you write a line of code on how to use the native property? I have the below code but not sure if this is what needs to be done. Moreover if the below is correct then how to get the property value of the "nativeTextElement" var nativeTextElement = gridPane.FindFirstChild(x => x.ByControlType(ControlType.Text)).ToNative(); – SandyKrish Nov 11 '21 at 07:28

0 Answers0