Advertisement
Guest User

Untitled

a guest
Jan 5th, 2021
147
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 8.22 KB | None | 0 0
  1. https://www.autoitscript.com/forum/topic/153520-iuiautomation-ms-framework-automate-chrome-ff-ie/?do=findComment&comment=1156373
  2. At least we have an element title: [[MKT, Market]] class: [ListBoxItem]
  3.  
  4. Having the following values for all properties:
  5. Title is: <[MKT, Market]> Class := <ListBoxItem> controltype:= <UIA_ListItemControlTypeId> ,<50007> , (0000C357) 690;531;76;20
  6. *** Parent Information top down ***
  7. 3: Title is: <SHOONYA- > Class := <WindowsForms10.Window.8.app.0.38431b5_r7_ad1> controltype:= <UIA_WindowControlTypeId> ,<50032> , (0000C370) 0;0;1680;1020
  8. "Title:=SHOONYA- ;controltype:=UIA_WindowControlTypeId;class:=WindowsForms10.Window.8.app.0.38431b5_r7_ad1""
  9. 2: Title is: <Sell Order Entry - > Class := <Window> controltype:= <UIA_WindowControlTypeId> ,<50032> , (0000C370) 204;435;1050;130
  10. "Title:=Sell Order Entry - ;controltype:=UIA_WindowControlTypeId;class:=Window""
  11. 1: Title is: <> Class := <Popup> controltype:= <UIA_WindowControlTypeId> ,<50032> , (0000C370) 688;510;80;81
  12. "Title:=;controltype:=UIA_WindowControlTypeId;class:=Popup""
  13. 0: Title is: <> Class := <ScrollViewer> controltype:= <UIA_PaneControlTypeId> ,<50033> , (0000C371) 689;511;78;79
  14. "Title:=;controltype:=UIA_PaneControlTypeId;class:=ScrollViewer""
  15.  
  16.  
  17. ;~ *** Standard code maintainable ***
  18. #include "UIAWrappers.au3"
  19. AutoItSetOption("MustDeclareVars", 1)
  20.  
  21. _UIA_setVar("oP1","Title:=SHOONYA- ;controltype:=UIA_WindowControlTypeId;class:=WindowsForms10.Window.8.app.0.38431b5_r7_ad1") ;SHOONYA-
  22. _UIA_setVar("oP2","Title:=Sell Order Entry - ;controltype:=UIA_WindowControlTypeId;class:=Window") ;Sell Order Entry -
  23. _UIA_setVar("oP3","Title:=;controltype:=UIA_WindowControlTypeId;class:=Popup") ;
  24. _UIA_setVar("oP4","Title:=;controltype:=UIA_PaneControlTypeId;class:=ScrollViewer") ;
  25.  
  26. ;~ $oUIElement=_UIA_getObjectByFindAll("[MKT,Market].mainwindow", "title:=[MKT, Market];ControlType:=UIA_ListItemControlTypeId", $treescope_subtree)
  27. _UIA_setVar("oUIElement","Title:=[MKT, Market];controltype:=UIA_ListItemControlTypeId;class:=ListBoxItem") ;ControlType:=UIA_ListItemControlTypeId;classname:=ListBoxItem")
  28.  
  29. ;~ Actions split away from logical/technical definition above can come from configfiles
  30.  
  31. ;~_UIA_Action("oP1","highlight")
  32. _UIA_Action("oP1","setfocus")
  33. ;~_UIA_Action("oP2","highlight")
  34. _UIA_Action("oP2","setfocus")
  35. ;~_UIA_Action("oP3","highlight")
  36. _UIA_Action("oP3","setfocus")
  37. ;~_UIA_Action("oP4","highlight")
  38. _UIA_Action("oP4","setfocus")
  39.  
  40. _UIA_action("oUIElement","highlight")
  41. ;~_UIA_action("oUIElement","click")
  42.  
  43.  
  44. ;~ *** Standard code Flexible***
  45. #include "UIAWrappers.au3"
  46. AutoItSetOption("MustDeclareVars", 1)
  47.  
  48. Local $oP3=_UIA_getObjectByFindAll($UIA_oDesktop, "Title:=SHOONYA- ;controltype:=UIA_WindowControlTypeId;class:=WindowsForms10.Window.8.app.0.38431b5_r7_ad1", $treescope_children)
  49. _UIA_Action($oP3,"setfocus")
  50. Local $oP2=_UIA_getObjectByFindAll($oP3, "Title:=Sell Order Entry - ;controltype:=UIA_WindowControlTypeId;class:=Window", $treescope_children)
  51. _UIA_Action($oP2,"setfocus")
  52. Local $oP1=_UIA_getObjectByFindAll($oP2, "Title:=;controltype:=UIA_WindowControlTypeId;class:=Popup", $treescope_children)
  53. _UIA_Action($oP1,"setfocus")
  54. Local $oP0=_UIA_getObjectByFindAll($oP1, "Title:=;controltype:=UIA_PaneControlTypeId;class:=ScrollViewer", $treescope_children)
  55. ;~ First find the object in the parent before you can do something
  56. ;~$oUIElement=_UIA_getObjectByFindAll("[MKT,Market].mainwindow", "title:=[MKT, Market];ControlType:=UIA_ListItemControlTypeId", $treescope_subtree)
  57. Local $oUIElement=_UIA_getObjectByFindAll($oP0, "title:=[MKT, Market];ControlType:=UIA_ListItemControlTypeId", $treescope_subtree)
  58. ;~_UIA_action($oUIElement,"highlight")
  59. _UIA_action($oUIElement,"click")
  60.  
  61.  
  62. *** Detailed properties of the highlighted element ***
  63. UIA_title:= <[MKT, Market]>
  64. UIA_text:= <[MKT, Market]>
  65. UIA_regexptitle:= <[MKT, Market]>
  66. UIA_class:= <ListBoxItem>
  67. UIA_regexpclass:= <ListBoxItem>
  68. UIA_iaccessiblechildId:= <0>
  69. UIA_handle:= <0>
  70. UIA_RuntimeId:= <7;804;51353651>
  71. UIA_BoundingRectangle:= <690;531;76;20>
  72. UIA_ProcessId:= <804>
  73. UIA_ControlType:= <50007>
  74. UIA_LocalizedControlType:= <list item>
  75. UIA_Name:= <[MKT, Market]>
  76. UIA_HasKeyboardFocus:= <True>
  77. UIA_IsKeyboardFocusable:= <True>
  78. UIA_IsEnabled:= <True>
  79. UIA_ClassName:= <ListBoxItem>
  80. UIA_ClickablePoint:= <728;541>
  81. UIA_Culture:= <0>
  82. UIA_IsControlElement:= <True>
  83. UIA_IsContentElement:= <True>
  84. UIA_IsPassword:= <False>
  85. UIA_NativeWindowHandle:= <0>
  86. UIA_IsOffscreen:= <False>
  87. UIA_Orientation:= <0>
  88. UIA_FrameworkId:= <WPF>
  89. UIA_IsRequiredForForm:= <False>
  90. UIA_IsDockPatternAvailable:= <False>
  91. UIA_IsExpandCollapsePatternAvailable:= <False>
  92. UIA_IsGridItemPatternAvailable:= <False>
  93. UIA_IsGridPatternAvailable:= <False>
  94. UIA_IsInvokePatternAvailable:= <False>
  95. UIA_IsMultipleViewPatternAvailable:= <False>
  96. UIA_IsRangeValuePatternAvailable:= <False>
  97. UIA_IsScrollPatternAvailable:= <False>
  98. UIA_IsScrollItemPatternAvailable:= <False>
  99. UIA_IsSelectionItemPatternAvailable:= <False>
  100. UIA_IsSelectionPatternAvailable:= <False>
  101. UIA_IsTablePatternAvailable:= <False>
  102. UIA_IsTableItemPatternAvailable:= <False>
  103. UIA_IsTextPatternAvailable:= <False>
  104. UIA_IsTogglePatternAvailable:= <False>
  105. UIA_IsTransformPatternAvailable:= <False>
  106. UIA_IsValuePatternAvailable:= <False>
  107. UIA_IsWindowPatternAvailable:= <False>
  108. UIA_ValueIsReadOnly:= <True>
  109. UIA_RangeValueValue:= <0>
  110. UIA_RangeValueIsReadOnly:= <True>
  111. UIA_RangeValueMinimum:= <0>
  112. UIA_RangeValueMaximum:= <0>
  113. UIA_RangeValueLargeChange:= <0>
  114. UIA_RangeValueSmallChange:= <0>
  115. UIA_ScrollHorizontalScrollPercent:= <0>
  116. UIA_ScrollHorizontalViewSize:= <100>
  117. UIA_ScrollVerticalScrollPercent:= <0>
  118. UIA_ScrollVerticalViewSize:= <100>
  119. UIA_ScrollHorizontallyScrollable:= <False>
  120. UIA_ScrollVerticallyScrollable:= <False>
  121. UIA_SelectionCanSelectMultiple:= <False>
  122. UIA_SelectionIsSelectionRequired:= <False>
  123. UIA_GridRowCount:= <0>
  124. UIA_GridColumnCount:= <0>
  125. UIA_GridItemRow:= <0>
  126. UIA_GridItemColumn:= <0>
  127. UIA_GridItemRowSpan:= <1>
  128. UIA_GridItemColumnSpan:= <1>
  129. UIA_DockDockPosition:= <5>
  130. UIA_ExpandCollapseExpandCollapseState:= <3>
  131. UIA_MultipleViewCurrentView:= <0>
  132. UIA_WindowCanMaximize:= <False>
  133. UIA_WindowCanMinimize:= <False>
  134. UIA_WindowWindowVisualState:= <0>
  135. UIA_WindowWindowInteractionState:= <0>
  136. UIA_WindowIsModal:= <False>
  137. UIA_WindowIsTopmost:= <False>
  138. UIA_SelectionItemIsSelected:= <False>
  139. UIA_TableRowOrColumnMajor:= <2>
  140. UIA_ToggleToggleState:= <2>
  141. UIA_TransformCanMove:= <False>
  142. UIA_TransformCanResize:= <False>
  143. UIA_TransformCanRotate:= <False>
  144. UIA_IsLegacyIAccessiblePatternAvailable:= <True>
  145. UIA_LegacyIAccessibleChildId:= <0>
  146. UIA_LegacyIAccessibleName:= <[MKT, Market]>
  147. UIA_LegacyIAccessibleRole:= <34>
  148. UIA_LegacyIAccessibleState:= <1048580>
  149. UIA_LegacyIAccessibleDefaultAction:= <Double Click>
  150. UIA_IsDataValidForForm:= <False>
  151. 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)]>
  152. UIA_IsItemContainerPatternAvailable:= <False>
  153. UIA_IsVirtualizedItemPatternAvailable:= <False>
  154. UIA_IsSynchronizedInputPatternAvailable:= <True>
  155. UIA_OptimizeForVisualContent:= <False>
  156. UIA_IsObjectModelPatternAvailable:= <False>
  157. UIA_AnnotationAnnotationTypeId:= <60000>
  158. UIA_IsAnnotationPatternAvailable:= <False>
  159. UIA_IsTextPattern2Available:= <False>
  160. UIA_StylesStyleId:= <0>
  161. UIA_StylesFillColor:= <0>
  162. UIA_StylesFillPatternColor:= <0>
  163. UIA_IsStylesPatternAvailable:= <False>
  164. UIA_IsSpreadsheetPatternAvailable:= <False>
  165. UIA_IsSpreadsheetItemPatternAvailable:= <False>
  166. UIA_Transform2CanZoom:= <False>
  167. UIA_IsTransformPattern2Available:= <False>
  168. UIA_LiveSetting:= <0>
  169. UIA_IsTextChildPatternAvailable:= <False>
  170. UIA_IsDragPatternAvailable:= <False>
  171. UIA_DragIsGrabbed:= <False>
  172. UIA_IsDropTargetPatternAvailable:= <False>
  173. UIA_Transform2ZoomLevel:= <1>
  174. UIA_Transform2ZoomMinimum:= <1>
  175. UIA_Transform2ZoomMaximum:= <1>
  176. UIA_IsTextEditPatternAvailable:= <False>
  177. UIA_IsPeripheral:= <False>
  178. UIA_IsCustomNavigationPatternAvailable:= <False>
  179. UIA_PositionInSet:= <0>
  180. UIA_SizeOfSet:= <0>
  181. UIA_Level:= <0>
  182. UIA_LandmarkType:= <0>
  183. UIA_FillType:= <0>
  184. UIA_VisualEffects:= <0>
  185. UIA_IsSelectionPattern2Available:= <False>
  186. UIA_Selection2ItemCount:= <0>
  187. UIA_HeadingLevel:= <80050>
  188. UIA_IsDialog:= <False>
  189.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement