Forum Discussion

albertopasion's avatar
albertopasion
Occasional Contributor
14 years ago

NameMapping

I have a windows application named PX3000Client.  Created testscripts for it and everything works.

Decided to include debug informations within the applications and renamed the app to PX3000Client_Debug.



I changed the following in the scripts:



TestedApps.PX3000Client.Run(1, true);

PX3000Client := Aliases.PX3000Client;

panel := PX3000Client.frmLogon4.panelConnectAndMessage.panelConnection.panelInput;

panel.editPassword.wText := 'test';

panel.btnConnect.ClickButton;



to

TestedApps.PX3000Client_Debug.Run(1, true);  // added the _Debug

PX3000Client :=
Aliases.PX3000Client;

panel := PX3000Client.frmLogon4.panelConnectAndMessage.panelConnection.panelInput;

panel.editPassword.wText := 'test';

panel.btnConnect.ClickButton;



After that, the application runs but the scripts don't work anymore.

I think a have a problem with "PX3000Client :=
Aliases.PX3000Client" as far as NameMapping is concern.



Is this still correct?  How can I get the test script to work with a different application name?



Thanks in advance.

Albert

1 Reply

  • AlexKaras's avatar
    AlexKaras
    Champion Level 3
    Hi Albert,



    If the name of the executable (the name of the process) is used in your mapping criteria, then definitely the change of the name will break the name mapping recognition. (BTW, it would help if you let us know what errors occur when 'scripts do not work anymore'.)

    One possible aproach is to create a project variable, assing it the name of the executable (the name of the process) and then edit namemapping scheme so that it uses not hardcoded process name, but the value of the variable (see 'Adding Identification Properties to Mapping Criteria', 'Edit the Property Value Dialog' and 'Edit Name Mapping Item Dialog' helptopicsfor more details). I expect that it will be enough to edit only the process identification entry.