I'm working on automating a windows application. I'm using the teststack white framework. I've hit a problem. This program has a 'Window' object that I cannot see inside of. White shows no controls inside of it. The Inspect.exe shows no controls inside of it either when running in UI Automation mode. If I switch Inspect to MSAA it see the controls inside just fine. Is there anyway for me to use MSAA from C# to get a handle on these controls?
MSAA finds controls UI Automation doesn't
3.7k Views Asked by JonM At
1
There are 1 best solutions below
Related Questions in C#
- Passing arguments to main in C using Eclipse
- kernel module does not print packet info
- error C2016 (C requires that a struct or union has at least one member) and structs typedefs
- Drawing with ncurses, sockets and fork
- How to catch delay-import dll errors (missing dll or symbol) in MinGW(-w64)?
- Configured TTL for A record(s) backing CNAME records
- Allocating memory for pointers inside structures in functions
- Finding articulation point of undirected graph by DFS
- C first fgets() is being skipped while the second runs
- C std library don't appear to be linked in object file
- gcc static library compilation
- How to do a case-insensitive string comparison?
- C programming: Create and write 2D array of files as function
- How to read a file then store to array and then print?
- Function timeouts in C and thread
Related Questions in UI-AUTOMATION
- Firefox automatically choose certificate, without ui dialog
- How to automate the android phone back button using appium
- Find a windows control using partial NameProperty in windows automation
- Read a Xcode Instruments .trace file generated from Automation.tracetemplate
- Get TitleBar Caption of any application using Microsoft UI Automation?
- How To Get Window handles In Mozilla Firefox
- How to check a checkbox with microsoft uiautomation?
- How to scroll down the screen in the android espresso test? I need to validate the text present on the screen
- how to use Instrumentation under the uiautomator project?
- How would Android UiAutomator behave if it encounters "Force Close or ANR"
- How to check control visibility in WPF app using Test Studio, Ranorex or TestComplete test tool
- How to automate the Ace Editor (send keys) using WebDriver?
- Best practices for implementing Page Object model for pages with many elements
- How to make UI Automation click a button with no id?
- Automatic PL/SQL Webtool kit based application using selenium
Related Questions in MICROSOFT-UI-AUTOMATION
- Passing SafeArray from Delphi through to ms-uiautomation libraries
- Find a windows control using partial NameProperty in windows automation
- Get TitleBar Caption of any application using Microsoft UI Automation?
- How to check a checkbox with microsoft uiautomation?
- Some 3rd party controls are not always accessable in UI Automation
- Should I be using AutomationPeer or AutomationElement? Or both?
- Microsoft ui-automation not able to fetch chrome's context menu elements
- Is there a WebDriver implementation for Microsoft UI Automation (UIA)?
- CodedUI test - can't send plain text password into input field
- User Interface Automation Testing using White Framework
- Delphi popup menu not working via uiautomation
- Missing child comparing inspect.exe to UIAComWrapper.dll returned value of AE.RootElement.FindAll(TreeScope.Children, Condition.TrueCondition)
- Microsoft UI Automation Library Vs Coded UI Test
- Can we "click" on edit boxes using Microsoft UIAutomation libraries
- AutomationFocusChangedEventHandler: event dose not triggerd in powershell
Trending Questions
- UIImageView Frame Doesn't Reflect Constraints
- Is it possible to use adb commands to click on a view by finding its ID?
- How to create a new web character symbol recognizable by html/javascript?
- Why isn't my CSS3 animation smooth in Google Chrome (but very smooth on other browsers)?
- Heap Gives Page Fault
- Connect ffmpeg to Visual Studio 2008
- Both Object- and ValueAnimator jumps when Duration is set above API LvL 24
- How to avoid default initialization of objects in std::vector?
- second argument of the command line arguments in a format other than char** argv or char* argv[]
- How to improve efficiency of algorithm which generates next lexicographic permutation?
- Navigating to the another actvity app getting crash in android
- How to read the particular message format in android and store in sqlite database?
- Resetting inventory status after order is cancelled
- Efficiently compute powers of X in SSE/AVX
- Insert into an external database using ajax and php : POST 500 (Internal Server Error)
Popular Questions
- How do I undo the most recent local commits in Git?
- How can I remove a specific item from an array in JavaScript?
- How do I delete a Git branch locally and remotely?
- Find all files containing a specific text (string) on Linux?
- How do I revert a Git repository to a previous commit?
- How do I create an HTML button that acts like a link?
- How do I check out a remote Git branch?
- How do I force "git pull" to overwrite local files?
- How do I list all files of a directory?
- How to check whether a string contains a substring in JavaScript?
- How do I redirect to another webpage?
- How can I iterate over rows in a Pandas DataFrame?
- How do I convert a String to an int in Java?
- Does Python have a string 'contains' substring method?
- How do I check if a string contains a specific word?
If you can identify the MSAA functions you need, you can use P/Invoke to call them from C#. Here's an example article about doing that with MSAA:
http://www.codeproject.com/Articles/38906/UI-Automation-Using-Microsoft-Active-Accessibility
Also, pinvoke.net can be used to identify the IAccessible (MSAA) functions:
http://www.pinvoke.net/search.aspx?search=IAccessible&namespace=[All]
Here's another SO answer along those lines:
MSAA COM-based?
Finally, as an alternative to P/Invoke, you might also be able to use Tlbimp.exe to create a wrapper assembly for oleacc.dll, and access the MSAA functions through it. I'm not sure if that works with MSAA, but it's worth a try.
As an example, here's a C# hello world example I wrote that shows how to use the UI Automation COM interface from C#, using an assembly created with Tlbimp.exe:
https://github.com/billagee/test-polyglot/blob/master/printDesktopUiaElementName/ms-ui-automation-com-api/csharp/PrintDesktopUiaElementNameViaCom/PrintDesktopUiaElementNameViaComProgram.cs
As mentioned in the comments in that file, as of the Windows 7.1 SDK, generating an assembly with Tlbimp.exe looked like this:
"%PROGRAMFILES%\Microsoft SDKs\Windows\v7.1\bin\tlbimp.exe" %windir%\system32\UIAutomationCore.dll /out:interop.UIAutomationCore.dll