microsoft / WinAppDriver

Windows Application Driver
MIT License
3.64k stars 1.4k forks source link

Can't execute winforms control methods #1545

Open andreypalamarchuk1993 opened 3 years ago

andreypalamarchuk1993 commented 3 years ago

Can't get winforms controls properties Screenshot_8 Also can't execute controls methods Screenshot_9

anunay1 commented 3 years ago

What does inspect show?

anunay1 commented 3 years ago

Can you use inspect.exe

andreypalamarchuk1993 commented 3 years ago

@anunay1 Inspect has this

Data in inspect `Name: "" ControlType: UIA_ListControlTypeId (0xC358) LocalizedControlType: "list" BoundingRectangle: {l:312 t:270 r:432 b:365} IsEnabled: true IsOffscreen: false IsKeyboardFocusable: true HasKeyboardFocus: false AcceleratorKey: [Not supported] AccessKey: "" ProcessId: 25336 RuntimeId: [2A.2019A] AutomationId: "listBox1" FrameworkId: "WinForm" ClassName: "WindowsForms10.LISTBOX.app.0.141b42a_r9_ad1" NativeWindowHandle: 0x2019A IsControlElement: [Not supported] IsContentElement: [Not supported] ProviderDescription: "[pid:9192,hwnd:0x2019A Main:Nested [pid:25336,hwnd:0x2019A Main(parent link):Microsoft: MSAA Proxy (unmanaged:uiautomationcore.dll)]; Nonclient:Microsoft: Non-Client Proxy (unmanaged:uiautomationcore.dll); Hwnd(parent link):Microsoft: HWND Proxy (unmanaged:uiautomationcore.dll)]" IsPeripheral: [Not supported] AriaRole: [Not supported] AriaProperties: [Not supported] LiveSettingProperty: [Not supported] IsPassword: false ItemStatus: [Not supported] ItemType: [Not supported] IsRequiredForForm: [Not supported] IsDataValidForForm: [Not supported] HelpText: "" LabeledBy: [Not supported] DescribedBy: [Not supported] ControllerForProperty: [Not supported] FlowsTo: [Not supported] FlowsFrom: [Not supported] ClickablePoint: [Not supported] Culture: [Not supported] Orientation: [Not supported] OptimizeForVisualContent: [Not supported] PositionInSet: [Not supported] SizeOfSet: [Not supported] Level: [Not supported] AnnotationTypes: [Not supported] AnnotationObjects: [Not supported] LandmarkType: [Not supported] LocalizedLandmarkType: [Not supported] FullDescription: [Not supported] IsDialog: [Not supported] FillColor: [Not supported] OutlineColor: [Not supported] OutlineThickness: [Not supported] FillType: [Not supported] CenterPoint: [Not supported] Rotation: [Not supported] Size: [Not supported] VisualEffects: [Not supported] HeadingLevel: [Not supported] Annotation.AnnotationTypeName: [Not supported] Annotation.AnnotationTypeId: [Not supported] Annotation.Author: [Not supported] Annotation.DateTime: [Not supported] Annotation.Target: [Not supported] Drag.DropEffect: [Not supported] Drag.DropEffects: [Not supported] Drag.GrabbedItems: [Not supported] Drag.IsGrabbed: [Not supported] Dock.DockPosition: [Not supported] DropTarget.DropTargetEffect: [Not supported] DropTarget.DropTargetEffects: [Not supported] ExpandCollapse.ExpandCollapseState: [Not supported] Grid.ColumnCount: [Not supported] Grid.RowCount: [Not supported] GridItem.Column: [Not supported] GridItem.ColumnSpan: [Not supported] GridItem.ContainingGrid: [Not supported] GridItem.Row: [Not supported] GridItem.RowSpan: [Not supported] LegacyIAccessible.ChildId: 0 LegacyIAccessible.DefaultAction: "" LegacyIAccessible.Description: "" LegacyIAccessible.Help: "" LegacyIAccessible.KeyboardShortcut: "" LegacyIAccessible.Name: "" LegacyIAccessible.Role: list (0x21) LegacyIAccessible.State: focusable (0x100000) LegacyIAccessible.Value: "" MultipleView.CurrentView: [Not supported] MultipleView.SupportedViews: [Not supported] ObjectModel.UnderlyingObjectModel: [Not supported] RangeValue.IsReadOnly: [Not supported] RangeValue.LargeChange: [Not supported] RangeValue.Maximum: [Not supported] RangeValue.Minimum: [Not supported] RangeValue.SmallChange: [Not supported] RangeValue.Value: [Not supported] Selection.CanSelectMultiple: false Selection.IsSelectionRequired: true Selection.Selection: Selection2.FirstSelectedItem: [Not supported] Selection2.LastSelectedItem: [Not supported] Selection2.CurrentSelectedItem: [Not supported] Selection2.ItemCount: [Not supported] SelectionItem.IsSelected: [Not supported] SelectionItem.SelectionContainer: [Not supported] Scroll.HorizontallyScrollable: [Not supported] Scroll.HorizontalScrollPercent: [Not supported] Scroll.HorizontalViewSize: [Not supported] Scroll.VerticallyScrollable: [Not supported] Scroll.VerticalScrollPercent: [Not supported] Scroll.VerticalViewSize: [Not supported] SpreadsheetItem.AnnotationObjects: [Not supported] SpreadsheetItem.AnnotationTypes: [Not supported] SpreadsheetItem.Formula: [Not supported] Style.ExtendedProperties: [Not supported] Style.FillColor: [Not supported] Style.FillPatternColor: [Not supported] Style.FillPatternStyle: [Not supported] Style.Shape: [Not supported] Style.StyleId: [Not supported] Style.StyleName: [Not supported] Value.IsReadOnly: [Not supported] Value.Value: [Not supported] Table.ColumnHeaders: [Not supported] Table.ItemColumnHeaderItems: [Not supported] Table.ItemRowHeaderItems: [Not supported] Table.RowHeaders: [Not supported] Table.RowOrColumnMajor: [Not supported] Toggle.ToggleState: [Not supported] Transform.CanMove: [Not supported] Transform.CanResize: [Not supported] Transform.CanRotate: [Not supported] Transform2.CanZoom: [Not supported] Transform2.ZoomLevel: [Not supported] Transform2.ZoomMinimum: [Not supported] Transform2.ZoomMaximum: [Not supported] Window.CanMaximize: [Not supported] Window.CanMinimize: [Not supported] Window.IsModal: [Not supported] Window.IsTopmost: [Not supported] Window.WindowInteractionState: [Not supported] Window.WindowVisualState: [Not supported] IsAnnotationPatternAvailable: false IsDragPatternAvailable: false IsDockPatternAvailable: false IsDropTargetPatternAvailable: false IsExpandCollapsePatternAvailable: false IsGridItemPatternAvailable: false IsGridPatternAvailable: false IsInvokePatternAvailable: false IsItemContainerPatternAvailable: false IsLegacyIAccessiblePatternAvailable: true IsMultipleViewPatternAvailable: false IsObjectModelPatternAvailable: false IsRangeValuePatternAvailable: false IsScrollItemPatternAvailable: false IsScrollPatternAvailable: false IsSelectionItemPatternAvailable: false IsSelectionPatternAvailable: true IsSpreadsheetItemPatternAvailable: false IsSpreadsheetPatternAvailable: false IsStylesPatternAvailable: false IsSynchronizedInputPatternAvailable: false IsTableItemPatternAvailable: false IsTablePatternAvailable: false IsTextChildPatternAvailable: false IsTextEditPatternAvailable: false IsTextPatternAvailable: false IsTextPattern2Available: false IsTogglePatternAvailable: false IsTransformPatternAvailable: false IsTransform2PatternAvailable: false IsValuePatternAvailable: false IsVirtualizedItemPatternAvailable: false IsWindowPatternAvailable: false IsCustomNavigationPatternAvailable: false IsSelectionPattern2Available: [Not supported] FirstChild: "sdf" list item LastChild: "swerwer" list item Next: (null) title bar Previous: [null] Other Props: Object has no additional properties Children: "sdf" list item "sdf" list item "swerwer" list item Ancestors: "Form1" window "Desktop" pane [ No Parent ] `
andreypalamarchuk1993 commented 3 years ago

@anunay1 Inspect has something looks like properties (not properties witch related to control) but without methods. My goal to execute method like GetRows() which is implemented in control. As I understand it can be possible if the driver uses WinAPI.

andreypalamarchuk1993 commented 3 years ago

@anunay1 ping