microsoft-ui-automation

What's the difference of UISpy.exe and Inspect.exe? (From Microsoft Windows SDK)

只愿长相守 提交于 2019-12-21 04:07:32
问题 I really want to know, how Inspect.exe gets it's UI-Elements, because it gets by far more elements than UISpy (Both available in Microsoft Windows SDK 7). 1) I think UISpy gets it's elements with UIAutomation library, right? (Tried it with UIAutomation and got exactly the same elements, that UISpy displayed). 2) Which library does Inspect.exe use? Because it shows some UI-Elements of a Application with MacromediaFlashPlayerActiveX for example, which I need to get in my own UI-Automation

Microsoft UI Automation Library Vs Coded UI Test

主宰稳场 提交于 2019-12-20 12:21:15
问题 I'm very much new to Test Automation kind of thing. Recently I've been assigned to a project where I have to write an application (or, a script may be, I'm not sure) that will automate the UI testing of a CAD-like WPF application which misses lots of AutomationId s. After doing a little searching on MSDN and other sources I'm a bit confused about whether I should use the Microsoft UI Automation Library or the new Coded UI Test feature included in VS2010. I'm not getting the clear picture of

Reading out Edge Browser Title & Url with System.Windows.Automation

家住魔仙堡 提交于 2019-12-18 09:14:00
问题 I'm trying to read out the TITLE & URL from the Microsoft EDGE Browser. Doing this with System.Windows.Automation most preferably since the code base already uses this for other problems. Is it possible with System.Windows.Automation? How to access the URL? I'm currently this far: AutomationId "TitleBar" ClassName "ApplicationFrameWindow" Name = [string] => Reading out this element gives me the TITLE => Walking it's children, I find the item "addressEditBox": AutomationId "addressEditBox"

UIAutomation won't retrieve children of an element

别等时光非礼了梦想. 提交于 2019-12-18 04:52:59
问题 I can see that an element with specific Automation ID has children in the Inspect tool: But when I try to retrieve them like this: AutomationElement aPane = mainWindow.FindFirst(TreeScope.Subtree, new PropertyCondition(AutomationElement.AutomationIdProperty, "8264")); AutomationElementCollection theChildren = aPane.FindAll(TreeScope.Subtree, Condition.TrueCondition); The aPane element is retrieved correctly, but theChildren element is empty. Any ideas what went wrong? 回答1: On rare occasions I

UI Automation events stop being received after a while monitoring an application and then restart after some time

亡梦爱人 提交于 2019-12-17 18:59:03
问题 We are using Microsoft's UIAutomation framework to develop a client that monitors events of a specific application and responds to them in different ways. We've started with the managed version of the framework, but due to delay issues, moved to the native version wrapped in UIACOMWrapper. After more issues with performance inside our (massive) WPF application, we decided to move it to a separate terminal application (transfer the events to our WPF app through UDP) which seemed to fix all the

How to search children/descendants by regular expression title in pywinauto?

跟風遠走 提交于 2019-12-13 01:50:49
问题 I am trying to get children/descendant UI elements of another UI element by a regexp title. For example, the following code should work. from pywinauto.application import Application, WindowSpecification root_ws: WindowSpecification = ( Application(backend="uia") .connect(path="C:/program.exe") .window(title_re="^Program *") ) root_ws.descendants(title_re="^abc*", control_type="DataItem") However, as described (by Vasily Ryabov) in this comment, title_re is not possible for children

Unable to get deepest IUIAutomationElement without one of Inspect.exe, Magnify.exe, Narrator.exe running

China☆狼群 提交于 2019-12-12 19:16:58
问题 I'm able to get some IUIAutomationElements inside Windows applications ONLY when an app 'X' (Inspect.exe | Narrator.exe | Magnify.exe) is running. Without 'X' running, the application from which I'm trying the get the IUAutomationElement essentially becomes a black box. For example, inside Microsoft Excel, I can obtain the cell identifier ( A1, D6, etc., ) when 'X' is running. Without 'X' in the background, the most granular detail I get is the Excel Workbook itself. I've tried setting

Chrome .Net Ui Automation - Automatic Sign on to Browser - AutomationElement Invoke appears to invoke with no result

北战南征 提交于 2019-12-12 03:14:40
问题 I would like to automatically sign into Chrome on Windows, the Selenium part is done but now there is a Window that needs to be automated. The invocation of the Link data push button. It appears I find the right element with my code and it does attempt an invoke but to no avail. Below snippet is from WPF : using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; using System.Windows; using System.Windows.Controls; using System.Windows

AutomationElement / Context Menus

Deadly 提交于 2019-12-11 11:03:00
问题 Description I am trying to be able to interact with context menus using UI Automation. Basically, I am trying to: set focus on an AutomationElement SendKeys.SendWait to send a SHIFT+F10 see what pops up What I Am Seeing What I am seeing is that the AutomationElement.FindAll(TreeScope.Descendants, Condition.TrueCondition) does not seem to reflect when the context menu is popped, even though UISpy sees it. Any help would be greatly appreciated. Example Here is an example application that I have

Microsoft ui-automation not able to fetch chrome's context menu elements

我的未来我决定 提交于 2019-12-11 06:31:34
问题 Why UIAutomation is not able to fetch chrome's context menu elements. C# Code: The below code will subscribe to the root element. public void SubscribeToInvoke() { Automation.AddAutomationEventHandler(AutomationElement.MenuOpenedEvent, AutomationElement.RootElement, TreeScope.Descendants, UIAEventHandler); Automation.AddAutomationEventHandler(AutomationElement.MenuClosedEvent, AutomationElement.RootElement, TreeScope.Descendants, UIAEventHandler); } The bellow event is not getting fired in