maniootek Posted March 13, 2017 Posted March 13, 2017 I am trying automate some app with UI Automation but I am struggling with one problem. Element number 1 (highlighted on red in picture above) I can access without any problem. I can click on it using UI Automation feature Here is some output from Inspect.exe: Quote How found: Mouse move (769,146) hwnd=0x000709DE 32bit class="ins_combohyperlink" style=0x50010012 ex=0x4 RuntimeId: "[42.461278]" BoundingRectangle: {l:729 t:138 r:792 b:154} ProcessId: 4216 ControlType: UIA_PaneControlTypeId (0xC371) LocalizedControlType: "okienko" Name: "(dowolne) " IsKeyboardFocusable: true IsEnabled: true AutomationId: "153" ClassName: "ins_combohyperlink" NativeWindowHandle: 0x709DE FrameworkId: "Win32" ProviderDescription: "[pid:7672,hwnd:0x709DE Annotation:Microsoft: Annotation Proxy (unmanaged:uiautomationcore.dll); Main:Microsoft: MSAA Proxy (unmanaged:uiautomationcore.dll); Hwnd(parent link):Microsoft: HWND Proxy (unmanaged:uiautomationcore.dll)]" FirstChild: [null] LastChild: [null] Next: ", z cechą:" tekst Previous: ", za pobraniem:" tekst Other Props: Object has no additional properties Children: Container has no children Ancestors: "Filtr: Transakcje utworzone:(nieokreślony), o sposobie przekazania:(dowolny), za pobraniem:(dowolne), o sposobie zapłaty:, z ce (null) okienko (null) okienko "This is my app" okno "Pulpit" okienko [ No Parent ] Expand As you can see this element "is part" of "This is my app" window Element number 2 appear when I click on element number 1 and here is Inspect.exe output: Quote How found: Mouse move (800,182) hwnd=0x000709E2 32bit class="ListBox" style=0x54000160 ex=0x0 RuntimeId: "[42.461282.2.-2147483647.461282.-4.2]" BoundingRectangle: {l:732 t:177 r:843 b:197} ProcessId: 4216 ControlType: UIA_ListItemControlTypeId (0xC357) LocalizedControlType: "element listy" Name: "za pobraniem" IsKeyboardFocusable: true IsEnabled: true ProviderDescription: "[pid:7672,hwnd:0x0 Annotation:Microsoft: Annotation Proxy (unmanaged:uiautomationcore.dll); Main(parent link):Microsoft: MSAA Proxy (unmanaged:uiautomationcore.dll)]" SelectionItem.IsSelected: true SelectionItem.SelectionContainer: (null) lista IsScrollItemPatternAvailable: true IsSelectionItemPatternAvailable: true FirstChild: [null] LastChild: [null] Next: "płatne z góry" element listy Previous: "(dowolne)" element listy Other Props: Object has no additional properties Children: Container has no children Ancestors: (null) lista (null) okienko "Pulpit" okienko [ No Parent ] Expand The problem is that I can't find this element number 2 across "This is my app" window. Element number 2 belongs to the "Desktop" (Pulpit means Desktop in my language) and I can't understand why. Accesing this element from Destkop element takes too long time. Any idea why this element does not belong the "This is my app" window? How can I access it faster?
junkew Posted March 13, 2017 Posted March 13, 2017 its probably a popup. What is simplespy giving for information about the classes of the parent? most likely you can search from desktop to immediate children for class #32769 #32768 The class for a menu. #32769 The class for the desktop window. #32770 The class for a dialog box. #32771 The class for the task switch window. #32772 The class for icon titles. FAQ 31 How to click some elements, FAQ 40 Test automation with AutoIt, Multithreading CLR .NET Powershell CMDLets
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now