Forum Discussion

m_essaid's avatar
m_essaid
Valued Contributor
10 years ago

another name mapping issue (alt-O shortcut)

Hi,

 

Maybe Colin could advise me, it's I bet a Delphi issue,

 

I have 2 project with shared scripts, and shared name mapping (one projects tests a beta version, the other the alpha version of the same Delphi executable).

I have about 98% of the mapped names in common, so I want to share theses files.

 

The strange thing is when TestComplete deals with a Windows OpenDialog window :

I tried to map the "Open" button ("Ouvrir")

I open the alpha exe in background and make this window appears.

 

When I double click on the alpha project, and use the spy object it gives me this as a full name:

Sys.Process('MY_EXE').Window('#32770', 'Ouvrir', 1).Window('Button', '&Ouvrir', 2)

 

When I double-click on the beta project, and use the spy with the same exe in background (I didn't changed or reload anything !) :

Sys.Process('MY_EXE).Dialog('Ouvrir').Button('Ouvrir')

 

I really don't get it.

As tested apps I have the alpha one in the alpha project and etc in the beta one.

It seems to work when all the tested apps are kept in one project (the beta). But at this moment I need to launch the alpha tested app in the beta project from the alpha project, what I don't know how to do so.

 

Some help would be really nice

 

Thank you,

 

Mehdi

  • I have shared namemapping for several projects testing Delphi applications.

    on and off encountered with same problem but found it's refering to two namemapping files.

     

    in your case it could be either mapping propertied are different in alpha and beta or two files are used. 

    also check TestedApps are correct in two projects (upper and lower cases)

     

    please go through name mappings in two projects carefully(in TC).

    and go through file structure (in windows explore) and see whether there are two mapping files.

    if you see two files, re-name which you think not the original and see.

     

  • NisHera's avatar
    NisHera
    Valued Contributor

    I have shared namemapping for several projects testing Delphi applications.

    on and off encountered with same problem but found it's refering to two namemapping files.

     

    in your case it could be either mapping propertied are different in alpha and beta or two files are used. 

    also check TestedApps are correct in two projects (upper and lower cases)

     

    please go through name mappings in two projects carefully(in TC).

    and go through file structure (in windows explore) and see whether there are two mapping files.

    if you see two files, re-name which you think not the original and see.

     

    • Colin_McCrae's avatar
      Colin_McCrae
      Community Hero

      I only have one Delphi based project so it doesn't currently share any functionality from other projects. (All my test framework is script extensions so I don't really count that)

       

      But from looking at the object spys, it looks like the Alpha one isn't seeing the control correctly? Why is it all shown as "Window" objects? That doesn't sound right. Are all the correct extensions enabled in the Alpha project?

       

      I tend to do all my launching of applications via scripting shell objects and also have a bunch of checks at the same time to find and kill any leftover/unwanted services or processes so I always get a clean start ....

    • m_essaid's avatar
      m_essaid
      Valued Contributor

      Hi guys,

       

      very very interesting !

       

      I was using a different name for the tested apps (for example, "MyAppALPHA" was pointing MyApp.exe and "MyAppBETA" was pointing another MyApp.exe). I named the two TestedApp that were in two different project the same and it works... So thank you very much :)

       

      I faced another problem in relation and I want to report it, it might interest someone :

       

      As the support team told me, the problem could also came from another thing (in addition to the tested apps naming) : the use of the MSAA Open Application. So I need to put off the wildcard "*" in the list of accepted windows.

      So the problem moved to this one : a popup menu that where accessible with this wildcard "*" in MSAA where no longer visible in playback... When I tried to use the object spy it showed a non managed windows class code : #32768.

       

      To resolve it I just had to redo the mapping without msaa wildcard checked.