/** * Copyright (c) Microsoft Corporation. * Licensed under the MIT License. * * @format */ import { AutomationClient } from '@react-native-windows/automation-channel'; /** * Schema of tree dumped node */ export type UIElement = { XamlType: string; Foreground?: string | null; Background?: string | null; Padding?: string | null; Margin?: string | null; RenderSize?: number[] | null; Visibility?: 'Collapsed' | 'Visible' | null; CornerRadius?: string | null; BorderThickness?: string | null; Width?: number | null; Height?: number | null; BorderBrush?: string | null; VerticalAlignment?: string | null; HorizontalAlignment?: string | null; Clip?: string | null; FlowDirection?: string | null; Name?: string | null; Text?: string | null; children?: UIElement[]; [index: string]: unknown; }; export type AutomationNode = { AutomationId?: string; ControlType?: number; LocalizedControlType?: string; Name?: string; __Children?: [AutomationNode]; }; export type ComponentNode = { Type: string; _Props?: { TestId?: string; Sources?: [{ Uri?: string; }]; }; __Children?: [ComponentNode]; }; export type VisualNode = { Comment?: string; Offset?: `${number} ${number} ${number}`; Size?: `${number} ${number}`; 'Visual Type'?: string; __Children?: [VisualNode]; }; export type VisualTree = { 'Automation Tree': AutomationNode; 'Component Tree': ComponentNode; 'Visual Tree': VisualNode; }; declare global { const automationClient: AutomationClient | undefined; } /** * Dump a section of the native visual tree. */ export default function dumpVisualTree(accessibilityId: string, opts?: { pruneCollapsed?: boolean; deterministicOnly?: boolean; removeDefaultProps?: boolean; removeGuidsFromImageSources?: boolean; additionalProperties?: string[]; }): Promise;