ui-automation


UI Automation Verify v/s UISpy - The way they find UI elements


I am trying to automate UI interactions for a C++ MFC application. I tried to find elements' automation ID using UISpy and UIAVerify tools. I am on win2k3.
There is a tab control, the automation ID of which is visible to UISpy but not to UIAVerify.
The issue is - it is not visible even to the C# code that I write using Project White framework or ui automation framework of .net 3.0.
I want to get handle to this control the way UISpy gets it. Is there any way I can find out how UISpy does it?
Thanks!!!
UISpy is likely using Microsoft UI Automation under the covers. You can see how this works from this example*. There are all kinds of conditions on AutomationElement which you can use to locate them.
I've only worked with WPF tabs, but found it really, really hard to locate them by Automation Id. Instead I've been using the AutomationName property, with the title on the tab as the value. Not sure if White supports this, but I'm pretty sure you can get the original AutomationElement out and use it as per the example.
You'll also probably be looking for something supporting the SelectionItemPattern (there's a SelectionItemIsSupportedProperty), and you'll need to use the pattern to select the tab and make it active before you can see anything in it.
Please comment if you need any more info. It might help to know what the structure of your container with tabs in is.
*Declaration of interest since I wrote this.

Related Links

White/UI Automation doesn't recognize the container (pane control) in tab
How to get descendants of a panel in teststack.white
Microsoft UI Automation: Invoke Pattern Exception
System.Windows.Forms.ListView Check box is not recognized by UIA verrify
UISearchDisplayController and UIAutomation
Handle UI Automation Mouse and Keyboard events
Add CodedUI to Test Manager
UI Automation + Mechanic.js: selector issue
White Automation framework throws an exception when using “White.Core.Desktop” Class
Unable to uncheck a checkbox within a combo box
Coded UI - Add-ons
Is it possible to close app in UIAutomation in iOS
ios uiAutomation tapWithOptions not working properly
My automationelement FindFirst/FindAll seems to be very slow. How to improve the performance?
UI Automation CreatePropertyCondition 0xc0000005
NativeWindowHandle Returns 0, but Spy displays handle

Categories

HOME
artificial-intelligence
firebase
protocol-buffers
functional-programming
kendo-dropdown
d3.js
dafny
vue-resource
haxe
angular-meteor
ui-automation
sympy
jpa-criteria
bellman-ford
driver
xamarin-zebble
locationmanager
nsstring
angular4
maven-plugin
nose
tfsbuild
infrared
stackexchange.redis
batch-rename
strophe.js
echosign
python-imageio
macromedia
monitor
es6-modules
autodesk-model-derivative
caesar-cipher
nest
transform
cups
pdfminer
pdfnet
httphandler
jqgrid-asp.net
music21
directwrite
hibernate-ogm
comm
sharpdx
spring.net
watir-webdriver
dtd
alertify
ogg
multi-touch
system.net.mail
meld
rails-engines
utf-16
gdl
textpattern
featuretoggle
search-form
green-threads
alwayson
textscan
ocmockito
mojo
utf8-decode
forio-contour
pageviews
ctp
jmenubar
revmob
codahale-metrics
virtual-channel
blobstorage
flv
multiple-dispatch
jquery-dialog
idispatch
xcode4.5
workflow-manager-1.x
cakeyframeanimation
dropshadow
haiku
upshot
airprint
eaccelerator
uninstaller
ppc
fuzzy-comparison
regioninfo
synthesizer

Resources

Database Users
RDBMS discuss
Database Dev&Adm
javascript
java
csharp
php
android
javascript
java
csharp
php
python
android
jquery
ruby
ios
html
Mobile App
Mobile App
Mobile App