如何使用UIA2或UIA3访问/查找FLAUI未读取的元素?由于FLAUIInspect没有在窗口下显示任何可用元素(而inspect.exe则显示所有可用元素),因此FindAll (子/承担者)不会提供任何元素。
有使用FLAUI获取这些元素的wat吗??

发布于 2021-12-13 20:38:03
首先,您必须访问需要查看的元素。在您的情况下,“”窗格--它是主窗口内的“控制类型面板”,所以您必须这样做:
var automation = new UIA3Automation();
var app = FlaUI.Core.Application.Attach(application.Process.Id); //Here you can attach or start a application by path
var window = app.GetMainWindow(automation); //Get hold of the window
var allObj = window.FindAllChildren();
var panel = allObj.Where(x => x.AutomationId == "16386096").FirstOrDefault().FindAllChildren(); //Here you can use other property unique to the panel, I used the AutomationId for example获得面板后,现在可以找到所有的子objects.emphasized文本。
发布于 2022-10-18 09:56:03
您需要公开该元素的AutomationPeer,FlaUI没有找到该元素。
https://stackoverflow.com/questions/69998494
复制相似问题