1

I've started using FlaUI for Automating my thick client .net application. The application is Windows Form based. The start was good and Login Form was identified and I could Login, but after that came the dead end and I found that almost everything in the application is developed as Pane control type.

So, there is grid, table etc. but they all just appear as Pane type when I see the object hierarchy using Inspect.exe or FLAUInspect tools. And nothing really appears in thier property, so it seems that nothing could be read. But before giving up I just wanted to check with experienced audience on this forum if there is really any way to get the data from Pane objects.

Please suggest if there is any way, even that means using other libraries like UIAutomation, TestStack.White, etc.

UPDATE: I now understand little more about this. So, the objects that are there in the pane are developed in syncfusion and devexpress. Is it possible to identify objects developed in syncfusion and devexpress using FlaUI or UIAutomation or TestStack.White, etc ?

user85
  • 1,526
  • 5
  • 26
  • 42

2 Answers2

0

I don't know if you have already tried the following steps. Have you add automationId's to your objects in xaml code with:

AutomationProperties.AutomationId="AnyID"

In the testcode, first initialize the main window of the application.

MainWindow = fApplication.GetMainWindow(fAutomation, null)?.AsWindow()

After that you can find your objects by the automationId's, like:

MainWindow .FindFirstDescendant(cf => cf.ByAutomationId(AnyID))

I did it this way, and don't have to know the hierarchy of my application. Maybe this will work?

Doortjuh
  • 71
  • 8
0

Most UI Frameworks nowadays fully support UI Automation. So first make sure that you have a recent version of your framework (syncfusion, devexpress). In addition, some frameworks provide settings to enable UI Automation. Like for devexpress, you need to set

ClearAutomationEventsHelper.IsEnabled = false;

at the start of your application to test so it exposes way more things (like tabs) to FlaUI.

Roemer
  • 2,012
  • 1
  • 24
  • 26