Forum Discussion

melanieKno's avatar
melanieKno
Occasional Contributor
2 years ago

Issue with NameMapping on different computers

I have an issue with NameMapping which works totally fine on my side, but when my colleague executes the test a button is not found. The log says that a window was clicked, but it doesn't click the button and we both don't understand why. The "screenshot" of the application window looks as if only a position is selected and not the button object.

 

NameMappingtestLog_picturetestLog_details

 

14 Replies

  • rraghvani's avatar
    rraghvani
    Champion Level 3

    Our colleagues in Germany also came across this issue while they were using a trail version of TestComplete. UI object highlight was pointing to a different location in their Java application. Their scaling was not set to 100%.

     

     

  • Hi abhishek1997,

     

    I see in the screenshot provided that indeed there is custom scaling applied. This is definitely the root cause of  your issue. 

     

    The good news is that you may use whichever screen resolution you like, but the 'Scale and Layout' must be 100%, this is a hard requirement of TestComplete. We do apologize for the inconvenience here.

     

    I would request to have your VM set back to 100% DPI and I feel confident this will resolve your issue.

  • Marsha_R's avatar
    Marsha_R
    Champion Level 3

    Try a couple of things on the machine where it doesn't work:

     

    Use the right click menu on the alias and see if it will show you the expected button.

    Use object spy on the button and see if the name matches what's in the mapping.

     

    That will give us some information to work with.

    • melanieKno's avatar
      melanieKno
      Occasional Contributor

      On my colleague's side the object spy doesn't allow to select the button, only the whole window can be selectected as an object.

  • Hi melanieKno!

     

    One of the most common causes of this scenario is the affected machine having the 'Scale and Layout' setting in the OS adjusted above or below 100%. This will be a requirement for TC and can/will cause these exact issues.

     

    You can verify this by right-clicking on the desktop, selecting Display Settings, and scrolling down to 'Scale and Layout'. 

     

    Let's verify this and set it to 100%. 

     

    I hope this helps!

    • abhishek1997's avatar
      abhishek1997
      Contributor

      Hello npaisley,

       

      I think it is not with the display scaling, even though the display is 100%, I am getting the same issue.

      Please see the below screenshot, on my colleague's machine, when the script is executed, the cursor pointing towards the Accept Button. But in my case, cursor is pointing and clicking somewhere else.

  • Hi abhishek1997,

     

    Thank you for verifying the display settings.

     

    Is your teammate using the same project suite as you, or are they interacting with this object in a project they created themselves?

     

    We see this at times when applications require custom MSAA, UIAuto or custom Java classes added to their project. Have you made any changes to these settings that your teammate may not have?

    • melanieKno's avatar
      melanieKno
      Occasional Contributor

      No, we are using exactly the same Project Suite checked out from a Version Control System (Git). That's why we have no idea where this issue is coming from.

      • melanieKno's avatar
        melanieKno
        Occasional Contributor

        Hello again,

        are there any other suggestions? We need to solve this issue to proceed with our project...

  • Hi melanieKno,

     

    Sorry to hear there has not been a solution yet. 

     

    Looking at the screenshots I do have one question. In the screenshot of the object spy where the accept button is not found, the font of the text in the object spy looks different than what I would normally expect to see. This goes back to my mention of the Display Settings. May you verify one more time that 'Scale and Layout' is set to 100% and that any changes to the font or font size in Windows is not altered? I suspect the issue lies with the machine at some level and/or the display settings.

     

    As a diagnostic step, may you provide 2 more screenshots? Both of the Object Spy with 'View More Members' enabled. One from the spy seeing the Accept button and one for the entire window. I would like to see what the differences are in the mapping information provided in the Spy.

  • Hello Marsha_R  and npaisley ,

     

    Thank you for addressing our issue, I have checked with below resolutions on my machine, I even tried scaling the display to 100%, but getting same error button is not clicking and it's pointing and clicking somewhere else as shown in previous images.

    1366x768

    1680x1050

    1920x1080

     

    By the way, the TestComplete is installed on separate pool we use VMWare VDI, to connect that pool, and I tried to modify the display settings, we don't have enough permissions to modify, please check the attached screenshot.

     

    And if we are working on automatic scripts, if display settings are always the same it's not usable. We couldn't tell every user to adapt the settings before doing the tests. In addition sometimes it's simply not possible to use the same settings due to technical restrictions.