Forum Discussion

nchris's avatar
nchris
New Contributor
2 years ago
Solved

Using NameMapped button click() is intermittently clicking in wrong location.

We have some script that cycles through different test cases and the same button is clicked which is always in the same location. In subsequent iterations of the test, TestComplete's name mapping sees the buttons as being in location that they don't exist, then tries clicking in that location. This causes the script to hang on the next step as the correct button was not clicked. For about 80% of our cases, it works correctly but sometimes this issue occurs as soon as the 2nd iteration. 

 

The piece in the script we are using is to click on a case management button by simply, Aliases.Button_CaseManagement.Click();. We aren't using any coordinates to click in a specific location.  In the Name Mapping, it has ObjectType: Button and ObjectLabel: Case Management. But, as seen in the image from the logs, when it handles the click() it is instead clicking on the "Home" button. If the script is stopped, and I use the "highlight" option in Name Mapping, the location highlights as if the button were in a different location than it actually is, same as the log. 

 

 

I have tried using a NameMapping.Sys.Page.Keys("[F5]"); to simulate a refresh, but the issue still persists after refreshing the page. The website we are using/testing against is not owned by our company, so I am not sure if there are possibly hidden elements on the page that Name Mapping doesn't register and would cause the button to be seen in a different location.

  • After typing my last response, I searched for Edge related issues as the browser option is locked by our company IT department. It looks like we are using :

     

    Version 103.0.1264.49 (Official build) (64-bit)

    Microsoft Edge updates are managed by your organization.
     
    While we do have the SmartBear Test Extension for Edge, per Supported-browsers-and-technologies.html , the supported versions for Edge are "Microsoft Edge 83 - 99 (Chromium-based, both 32-bit and 64-bit versions)".
     
    So I will close as it may be due to a non-supported browser version.

3 Replies

    • nchris's avatar
      nchris
      New Contributor

      Thank you. I can confirm that the issue in the other post is the same as what we are experiencing. I can also confirm that the tests are being run at 100% scale.

      We have an option to start the our tests at a specific line in a list of cases.  So, I can start again from where the script last broke. Doing no changes between, when I restart at the previously broken spot, the script proceeds through but will then break again at on a new case at the same place in the script where it sees the button in a different place. We can only get through 3-7 cases before the script needs to be started again manually.

       

      As for the Mapping. I verified that the NameMapping is the same as when using object spy. Could this be a browser issue?

       

      • nchris's avatar
        nchris
        New Contributor

        After typing my last response, I searched for Edge related issues as the browser option is locked by our company IT department. It looks like we are using :

         

        Version 103.0.1264.49 (Official build) (64-bit)

        Microsoft Edge updates are managed by your organization.
         
        While we do have the SmartBear Test Extension for Edge, per Supported-browsers-and-technologies.html , the supported versions for Edge are "Microsoft Edge 83 - 99 (Chromium-based, both 32-bit and 64-bit versions)".
         
        So I will close as it may be due to a non-supported browser version.