In short: I want to use UI Automation in FL Studio 20 using C#. I know there are a lot UI automation frameworks out there. Currently, I'm using Teststack.White but this framework is made for Win32, WinForms, WPF, Silverlight and SWT based applications. It works sort of for FL Studio 20. Here's what I mean:
The red rectangle is from a UI Inspection tool. And it is exactly what Teststack.White sees. It can make out the containers, but never the actual, clickable elements. Right now the only option I have left to click the button, is to get the location of the container and then simulate a mouse click with an offset. But that's only gonna work if the display resolution stays the same.
So my question is: Is there any framework that can handle these type of UI's? And does anyone know what GUI technology FL Studio is using? I know it's written in Delphi but that's all I know.
Here's the code that clicks the button using the offset-method I mentioned above (it's for a different button, but the code stays roughly the same):
TestStack.White.Application application = TestStack.White.Application.Launch(@"C:\Program Files (x86)\Image-Line\FL Studio 20\FL.exe");
this.window = application.GetWindow("FL Studio 20", InitializeOption.NoCache);
UIItemCollection coll = window.Items;
Panel itemToClick = null;
foreach (UIItem item in coll)
{
if (item.Name.Contains("Piano roll"))
{
if (((Panel)item).Items.Count == 0)
{
itemToClick = (Panel)item;
break;
}
}
}
window.Focus();
var mouse = window.Mouse;
Point p = itemToClick.Location;
p.Offset(11, 12);
mouse.Click(p);