Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- https://www.autoitscript.com/forum/topic/153520-iuiautomation-ms-framework-automate-chrome-ff-ie/?do=findComment&comment=1156373
- At least we have an element title: [[MKT, Market]] class: [ListBoxItem]
- Having the following values for all properties:
- Title is: <[MKT, Market]> Class := <ListBoxItem> controltype:= <UIA_ListItemControlTypeId> ,<50007> , (0000C357) 690;531;76;20
- *** Parent Information top down ***
- 3: Title is: <SHOONYA- > Class := <WindowsForms10.Window.8.app.0.38431b5_r7_ad1> controltype:= <UIA_WindowControlTypeId> ,<50032> , (0000C370) 0;0;1680;1020
- "Title:=SHOONYA- ;controltype:=UIA_WindowControlTypeId;class:=WindowsForms10.Window.8.app.0.38431b5_r7_ad1""
- 2: Title is: <Sell Order Entry - > Class := <Window> controltype:= <UIA_WindowControlTypeId> ,<50032> , (0000C370) 204;435;1050;130
- "Title:=Sell Order Entry - ;controltype:=UIA_WindowControlTypeId;class:=Window""
- 1: Title is: <> Class := <Popup> controltype:= <UIA_WindowControlTypeId> ,<50032> , (0000C370) 688;510;80;81
- "Title:=;controltype:=UIA_WindowControlTypeId;class:=Popup""
- 0: Title is: <> Class := <ScrollViewer> controltype:= <UIA_PaneControlTypeId> ,<50033> , (0000C371) 689;511;78;79
- "Title:=;controltype:=UIA_PaneControlTypeId;class:=ScrollViewer""
- ;~ *** Standard code maintainable ***
- #include "UIAWrappers.au3"
- AutoItSetOption("MustDeclareVars", 1)
- _UIA_setVar("oP1","Title:=SHOONYA- ;controltype:=UIA_WindowControlTypeId;class:=WindowsForms10.Window.8.app.0.38431b5_r7_ad1") ;SHOONYA-
- _UIA_setVar("oP2","Title:=Sell Order Entry - ;controltype:=UIA_WindowControlTypeId;class:=Window") ;Sell Order Entry -
- _UIA_setVar("oP3","Title:=;controltype:=UIA_WindowControlTypeId;class:=Popup") ;
- _UIA_setVar("oP4","Title:=;controltype:=UIA_PaneControlTypeId;class:=ScrollViewer") ;
- ;~ $oUIElement=_UIA_getObjectByFindAll("[MKT,Market].mainwindow", "title:=[MKT, Market];ControlType:=UIA_ListItemControlTypeId", $treescope_subtree)
- _UIA_setVar("oUIElement","Title:=[MKT, Market];controltype:=UIA_ListItemControlTypeId;class:=ListBoxItem") ;ControlType:=UIA_ListItemControlTypeId;classname:=ListBoxItem")
- ;~ Actions split away from logical/technical definition above can come from configfiles
- ;~_UIA_Action("oP1","highlight")
- _UIA_Action("oP1","setfocus")
- ;~_UIA_Action("oP2","highlight")
- _UIA_Action("oP2","setfocus")
- ;~_UIA_Action("oP3","highlight")
- _UIA_Action("oP3","setfocus")
- ;~_UIA_Action("oP4","highlight")
- _UIA_Action("oP4","setfocus")
- _UIA_action("oUIElement","highlight")
- ;~_UIA_action("oUIElement","click")
- ;~ *** Standard code Flexible***
- #include "UIAWrappers.au3"
- AutoItSetOption("MustDeclareVars", 1)
- Local $oP3=_UIA_getObjectByFindAll($UIA_oDesktop, "Title:=SHOONYA- ;controltype:=UIA_WindowControlTypeId;class:=WindowsForms10.Window.8.app.0.38431b5_r7_ad1", $treescope_children)
- _UIA_Action($oP3,"setfocus")
- Local $oP2=_UIA_getObjectByFindAll($oP3, "Title:=Sell Order Entry - ;controltype:=UIA_WindowControlTypeId;class:=Window", $treescope_children)
- _UIA_Action($oP2,"setfocus")
- Local $oP1=_UIA_getObjectByFindAll($oP2, "Title:=;controltype:=UIA_WindowControlTypeId;class:=Popup", $treescope_children)
- _UIA_Action($oP1,"setfocus")
- Local $oP0=_UIA_getObjectByFindAll($oP1, "Title:=;controltype:=UIA_PaneControlTypeId;class:=ScrollViewer", $treescope_children)
- ;~ First find the object in the parent before you can do something
- ;~$oUIElement=_UIA_getObjectByFindAll("[MKT,Market].mainwindow", "title:=[MKT, Market];ControlType:=UIA_ListItemControlTypeId", $treescope_subtree)
- Local $oUIElement=_UIA_getObjectByFindAll($oP0, "title:=[MKT, Market];ControlType:=UIA_ListItemControlTypeId", $treescope_subtree)
- ;~_UIA_action($oUIElement,"highlight")
- _UIA_action($oUIElement,"click")
- *** Detailed properties of the highlighted element ***
- UIA_title:= <[MKT, Market]>
- UIA_text:= <[MKT, Market]>
- UIA_regexptitle:= <[MKT, Market]>
- UIA_class:= <ListBoxItem>
- UIA_regexpclass:= <ListBoxItem>
- UIA_iaccessiblechildId:= <0>
- UIA_handle:= <0>
- UIA_RuntimeId:= <7;804;51353651>
- UIA_BoundingRectangle:= <690;531;76;20>
- UIA_ProcessId:= <804>
- UIA_ControlType:= <50007>
- UIA_LocalizedControlType:= <list item>
- UIA_Name:= <[MKT, Market]>
- UIA_HasKeyboardFocus:= <True>
- UIA_IsKeyboardFocusable:= <True>
- UIA_IsEnabled:= <True>
- UIA_ClassName:= <ListBoxItem>
- UIA_ClickablePoint:= <728;541>
- UIA_Culture:= <0>
- UIA_IsControlElement:= <True>
- UIA_IsContentElement:= <True>
- UIA_IsPassword:= <False>
- UIA_NativeWindowHandle:= <0>
- UIA_IsOffscreen:= <False>
- UIA_Orientation:= <0>
- UIA_FrameworkId:= <WPF>
- UIA_IsRequiredForForm:= <False>
- UIA_IsDockPatternAvailable:= <False>
- UIA_IsExpandCollapsePatternAvailable:= <False>
- UIA_IsGridItemPatternAvailable:= <False>
- UIA_IsGridPatternAvailable:= <False>
- UIA_IsInvokePatternAvailable:= <False>
- UIA_IsMultipleViewPatternAvailable:= <False>
- UIA_IsRangeValuePatternAvailable:= <False>
- UIA_IsScrollPatternAvailable:= <False>
- UIA_IsScrollItemPatternAvailable:= <False>
- UIA_IsSelectionItemPatternAvailable:= <False>
- UIA_IsSelectionPatternAvailable:= <False>
- UIA_IsTablePatternAvailable:= <False>
- UIA_IsTableItemPatternAvailable:= <False>
- UIA_IsTextPatternAvailable:= <False>
- UIA_IsTogglePatternAvailable:= <False>
- UIA_IsTransformPatternAvailable:= <False>
- UIA_IsValuePatternAvailable:= <False>
- UIA_IsWindowPatternAvailable:= <False>
- UIA_ValueIsReadOnly:= <True>
- UIA_RangeValueValue:= <0>
- UIA_RangeValueIsReadOnly:= <True>
- UIA_RangeValueMinimum:= <0>
- UIA_RangeValueMaximum:= <0>
- UIA_RangeValueLargeChange:= <0>
- UIA_RangeValueSmallChange:= <0>
- UIA_ScrollHorizontalScrollPercent:= <0>
- UIA_ScrollHorizontalViewSize:= <100>
- UIA_ScrollVerticalScrollPercent:= <0>
- UIA_ScrollVerticalViewSize:= <100>
- UIA_ScrollHorizontallyScrollable:= <False>
- UIA_ScrollVerticallyScrollable:= <False>
- UIA_SelectionCanSelectMultiple:= <False>
- UIA_SelectionIsSelectionRequired:= <False>
- UIA_GridRowCount:= <0>
- UIA_GridColumnCount:= <0>
- UIA_GridItemRow:= <0>
- UIA_GridItemColumn:= <0>
- UIA_GridItemRowSpan:= <1>
- UIA_GridItemColumnSpan:= <1>
- UIA_DockDockPosition:= <5>
- UIA_ExpandCollapseExpandCollapseState:= <3>
- UIA_MultipleViewCurrentView:= <0>
- UIA_WindowCanMaximize:= <False>
- UIA_WindowCanMinimize:= <False>
- UIA_WindowWindowVisualState:= <0>
- UIA_WindowWindowInteractionState:= <0>
- UIA_WindowIsModal:= <False>
- UIA_WindowIsTopmost:= <False>
- UIA_SelectionItemIsSelected:= <False>
- UIA_TableRowOrColumnMajor:= <2>
- UIA_ToggleToggleState:= <2>
- UIA_TransformCanMove:= <False>
- UIA_TransformCanResize:= <False>
- UIA_TransformCanRotate:= <False>
- UIA_IsLegacyIAccessiblePatternAvailable:= <True>
- UIA_LegacyIAccessibleChildId:= <0>
- UIA_LegacyIAccessibleName:= <[MKT, Market]>
- UIA_LegacyIAccessibleRole:= <34>
- UIA_LegacyIAccessibleState:= <1048580>
- UIA_LegacyIAccessibleDefaultAction:= <Double Click>
- UIA_IsDataValidForForm:= <False>
- UIA_ProviderDescription:= <[pid:804,providerId:0x0 Main(parent link):Unidentified Provider (managed:MS.Internal.Automation.ElementProxy, PresentationCore, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35)]>
- UIA_IsItemContainerPatternAvailable:= <False>
- UIA_IsVirtualizedItemPatternAvailable:= <False>
- UIA_IsSynchronizedInputPatternAvailable:= <True>
- UIA_OptimizeForVisualContent:= <False>
- UIA_IsObjectModelPatternAvailable:= <False>
- UIA_AnnotationAnnotationTypeId:= <60000>
- UIA_IsAnnotationPatternAvailable:= <False>
- UIA_IsTextPattern2Available:= <False>
- UIA_StylesStyleId:= <0>
- UIA_StylesFillColor:= <0>
- UIA_StylesFillPatternColor:= <0>
- UIA_IsStylesPatternAvailable:= <False>
- UIA_IsSpreadsheetPatternAvailable:= <False>
- UIA_IsSpreadsheetItemPatternAvailable:= <False>
- UIA_Transform2CanZoom:= <False>
- UIA_IsTransformPattern2Available:= <False>
- UIA_LiveSetting:= <0>
- UIA_IsTextChildPatternAvailable:= <False>
- UIA_IsDragPatternAvailable:= <False>
- UIA_DragIsGrabbed:= <False>
- UIA_IsDropTargetPatternAvailable:= <False>
- UIA_Transform2ZoomLevel:= <1>
- UIA_Transform2ZoomMinimum:= <1>
- UIA_Transform2ZoomMaximum:= <1>
- UIA_IsTextEditPatternAvailable:= <False>
- UIA_IsPeripheral:= <False>
- UIA_IsCustomNavigationPatternAvailable:= <False>
- UIA_PositionInSet:= <0>
- UIA_SizeOfSet:= <0>
- UIA_Level:= <0>
- UIA_LandmarkType:= <0>
- UIA_FillType:= <0>
- UIA_VisualEffects:= <0>
- UIA_IsSelectionPattern2Available:= <False>
- UIA_Selection2ItemCount:= <0>
- UIA_HeadingLevel:= <80050>
- UIA_IsDialog:= <False>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement