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

UI Automation CreatePropertyCondition 0xc0000005
NativeWindowHandle Returns 0, but Spy displays handle
Can we “click” on edit boxes using Microsoft UIAutomation libraries
Test flex mobile application built with 4.10 sdk with testcomplete
TreeWalker cant see AutomationElement, but UIA Verify can
Accessing elements of webview within a native iPhone app using UI Automation
Ranorex not able to recognise elements uniquely?
Getting / ussing full path to find controls in UIA and White
UIA: Get ControlType from control type name (string)
how to select which button to select in alert message for IOS UIAutomation
How to run multiple .trace files in one run i.e one after the other in UI automation tool?
Using TestComplete's UIAObject with Microsoft UI Automation Control Patterns
scrollToVisible error while testing on a device, UIAutomation
How to select font node in Sahi?
count the number of rows/columns using UI Automation
How to find image on whole screen?

Categories

HOME
xcode8.1
transactions
ews
embedded-resource
openlayers-3
ui-automation
stack-overflow
swarm
fullcalendar-scheduler
pywinauto
mixpanel
maven-plugin
word2vec
clr
fluent-migrator
rxjs5
software-packaging
cellular-network
fstar
math.js
react-bootstrap-table
matlab-app-designer
winsock
vcenter
seafile-server
lxml
cucumber-junit
android-collapsingtoolbar
xmlunit
spring-rabbitmq
dreamfactory
spinner
strapi
xll
django-smart-selects
widestring
python-sounddevice
data-uri
hdiv
raytracing
notesview
sendinput
doctrine-extensions
jshint
wysihtml5
viewmodel
webalizer
uiautomatorviewer
nslayoutconstraint
apache-modules
adobe-reader
researchkit
bigdecimal
thread-exceptions
nunit-console
zynq
system.net.mail
piping
frame-grab
processor
jsr363
teensy
diawi
nette
cfwheels
asp.net-web-api-helppages
kefir.js
scala-macros
quercus
innerhtml
mathematical-expressions
fiware-bosun
microsoft-expression-web
hp-idol-ondemand
xhprof
visual-c++-2012
webmethod
two.js
spring-security-acl
node.js-stream
objective-c-runtime
ckeditor.net
daap
xcode4.5
story
thejit
acpi
kernel32
kohana-auth
printqueue
oracle-pro-c
browser-based
comment-conventions

Resources

Mobile Apps Dev
Database Users
javascript
java
csharp
php
android
MS Developer
developer works
python
ios
c
html
jquery
RDBMS discuss
Cloud Virtualization
Database Dev&Adm
javascript
java
csharp
php
python
android
jquery
ruby
ios
html
Mobile App
Mobile App
Mobile App