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

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
How to login to OWIN Web Api 2 WS-Federation server from desktop app
How to inspect elements in a desktop application?
IBM Worklight - Can we create a desktop based application?
How to capture traffic of Desktop Application Using Fiddler

Categories

HOME
drupal
postgresql
kendo-ui-angular2
glsl
pandoc
datetimepicker
thermal-printer
grid
sugarcrm
pdf-generation
kairosdb
fine-uploader
tmux
webseal
tag-cloud
loader
audio-streaming
datazen-server
oracle-golden-gate
ithit-webdav-server
jira-zephyr
angular-schema-form
git-submodules
spock
ipython-parallel
folder
spring-oauth2
luhn
webspeech-api
http-proxy
powerbi-embedded
ragel
stochastic-process
server-side-swift
rbac
sknode
amazon-rds-aurora
mef
hierarchical-clustering
react.rb
g77
riemann
r-commander
typewriter
totalview
reloaddata
grib
blackberry
petapoco
nsalert
chain
spring-cloud-aws
optional-parameters
x12
mate-desktop
airwatch
nimbus
gdi
django-celery
transaction-isolation
pebble-js
sqlxml
music-player
jsondoc
jquery-draggable
angular-promise
javapackager
libgcrypt
play-json
gitk
transbase
transport
cyberduck
consul-template
sony-xperia
pnunit
isl
cvi
.net-reflector
logo-lang
ekevent
google-mirror-api
scidb
tlbimp
maven-webstart-plugin
jython-2.5
panelgrid
libx264
feincms
report-viewer2010
blackberry-eclipse-plugin
bash4
parsec
helicontech
wdm
discussion-board
qvariant
mass-emails
system-analysis
versions
carbon-emacs
moores-law
memory-consumption

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