Forum Discussion

ARANA's avatar
ARANA
Occasional Contributor
9 months ago

How to differentiate between screens with same Name Mapping

Hi 

My Desktop application is written in Delphi 4.

I'm recording Keyword tests first and then convert it into Scripts in Python. There is a common browse screen in our application which is used at multiple places so the Name mapping is same. I'm running two scenarios in which this browse screen is used but with different options. Scenario 1 runs fine but scenario 2 fails as test complete is finding browse screen of scenario 1 instead of scenario 2. Please see the attachment for reference. How can I map the 2nd browse screen with the 2nd scenario? 

Any help to resolve this will be greatly appreciated.

5 Replies

    • ARANA's avatar
      ARANA
      Occasional Contributor

      are you asking for these details?

       

  • rraghvani's avatar
    rraghvani
    Champion Level 3

    In this example,

    I have a mapped object called buttonCssButton, it's property values are ObjectType = Button, ObjectIdentifier = 1 and textContent = CSS Button. TestComplete will use these properties and property values to identify that specific control.

     

    Since you've have given wndCaption a value, TestComplete will search for that control.

     

     

     

    • ARANA's avatar
      ARANA
      Occasional Contributor

      Hi , basically before it had only 2 properties 'className' and 'objectIdentifier' and it was behaving the same way I mentioned above so I added another property 'wndcaption' to make it more specific but it didn't work. 

      So do you still suggest I can use wildcards but for which property?

  • rraghvani's avatar
    rraghvani
    Champion Level 3

    As you didn't show the property values in your first post, I suggested to use wildcard.

     

    I'm now suggesting/hinting to remove wndCaption (or use wndCaption with conditional expression). Ensure you fully understand how Name Mapping works.

     

    You need to use properties that are common in both dialogs, the criteria by which TestComplete identifies the object