desktop-application


Name Mapping dynamic objects for desktop app


How to use Name Mapping in TestComplete UI objects for desktop applications?
For dynamic objects its better to avoid Namemapping and rely on inbuild methods like Find(), FindChild(), FindAllChildren(), etc.
I don't use Namemapping because I have a similar problem to you, where the form names in the desktop application I test change constantly. What I did was create a separate script called 'Helper Funcs'. In that, I have two functions:
function findControl(module, propertyName, propertyValue) : Object;
var
m_process : Variant;
begin
m_process := Sys.Process(module);
Result := m_process.Find(propertyName, propertyValue, 1000);
end;
function findChildControl(parent : Object, propertyName, propertyValue) : Object;
var
m_result : variant;
begin
Result := parent.FindChild(propertyName, propertyValue, 1000);
end;
To use:
uses
HelperFuncs;
procedure Test1;
var
frmActionForm_1 : variant;
edNewComplex : variant;
begin
frmActionForm_1 := findControl('Payroll', 'Caption', 'Company Address Details - Edit');
Delay(4000);
edNewComplex := findChildControl(frmActionForm_1, 'ObjectIdetifier', 'edNewComplex');
Delay(4000);
edNewComplex.Click(76, 11);
end;
In the above example, frmActionForm_1 is a form, edNewComplex is a control on the form. When funning the test, I search for the caption of the form, which is 'Company Address Details - Edit'.
Once the form is found, I search the child components of the form using findChildControl.
For the child components, I just use the name of the object. That I get by either using their Object Finding tool or I record a test and convert to script. It will usually have all the names of the objects you interacted with in the recording.
Good Luck.
Seth

Related Links

Compliance testing for desktop applications
Count the number of filtered values
electron makeSingleInstance not restoring app
Electron autoUpdater: User initiated download on 'update-available'
Why i run xcompmgr,window can't be placed at the top。
While setting up Windows 10 Standard user in assigned acces mode, unable to see app for field (Choose which app this account can access)
How to package a node webkit app as a hybrid standalone desktop app
How to register a desktop application (app) for Windows Error Reporting (WER)
Kivy to create a Desktop program?
My app passed windows app certification test with warnings,will I be able to publish it on the windows store
HTML/CSS/JS desktop application runtime for RHEL6
How can I make offline maps for Windows Desktop Application using Mapbox
Connect Production server sql database from my desktop application
softphone pbx software creation [closed]
How do I correctly ship licenses with my desktop app?
TideSDK: Download mp3 files

Categories

HOME
max
kendo-ui-angular2
ssh
abc
dronekit
python-requests
highmaps
lithium
bitbucket
datetimepicker
schema
clip-path
genexus
rtc
core-data
facebook-sharer
adroitlogic
mongodb-replica-set
exchange-transport-agents
css-float
versioning
cucumberjs
alert
gpo
react-jsx
android-wifi
coccinelle
android-navigation-drawer
klipfolio
connection-pooling
concatenation
procedural-generation
adobe-captivate
gulp-jshint
emr
units-of-measurement
ipython-parallel
openoffice-impress
overflow
multilanguage
slim-lang
visual-prolog
pyenv
strategy-pattern
mapquest
const
latency
idea-plugin
server-side-swift
ui-grid
php-mongodb
taleo
spring-data-commons
history
noise
extjs3
htop
boost-regex
webmatrix
racket-student-languages
scikit-image
normalisation
recurring
vitamio
camellia
mod
factorization
code-translation
oryx
wiql
vensim
glog
system.diagnostics
radgrid
valdr-bean-validation
sony-xperia
aiff
sync
agent-based-modeling
nsmutableurlrequest
switchpreference
smartxls
azure-caching
xps
elixir-framework
internet-radio
mongoid4
node-amqp
code-complete
grunt-contrib-imagemin
grape-api
maven-webstart-plugin
kademlia
asp.net-4.0
mysql2
auctex
blotter
netbiscuits
hypertable
states
nserror
yii-cactiverecord
zend-validate
mcpd
jqtransform
iphone-maps
carbon-emacs
bootstrap-protocol
stackless

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