Forum Discussion

iddebug01's avatar
iddebug01
New Contributor
3 days ago

Web ID, crashing TC

Hi,

We noticed that TC is having problems with recognising IDs on WEB (Chrome), we are currently on 15.81 version.

When testing some IDs, TC recognises and writes them, and others don’t, without any obvious reason. We establish that if ID has more than 3 numbers in sequence, it will not recognize that ID. Separating words/numbers with - and _ is not always working, or maybe it works only with one of them. Then we noticed that if a large number of numbers not in sequence are in one part of the ID, again it won't work. Also, with caps letters sometimes work, sometimes don’t work.

We are only looking for IDs in Web because we found that it is the only part that we can guarantee will always work in tests. We clear the name mapping (selectors) of other stuff. Also, we needed to limit ID to 50 characters; if ID has more than 50 TC won't recognise them.

Here are some examples of weird working:

report-category-TPotNalIzpisKriterijPotN_219_50aec - not working

report-category-tpotnalizpiskriterijpotn_219_50aec - not working

report-category-tpotnalizpiskriterijpotn_219_50ae - working ( ‘c’ at the end is removed)

eport-category-tpotnalizpiskriterijpotn_219_50aec - not working ( ‘r’ at beginning is removed)

report-category-tpotnalizpiskriterijpotn-219-50aec - working ( change from _ to -)

report-category-xyxyxyxyxyxyxyxyxyxyxyxy_219_50aec - working (same length of ID)

------------------------------------------------------

travel-order-position-costs-toggle-2670000000001-1 - not working (too many numbers)

travel-order-position-costs-toggle-267xyxyxyxyxy-1 - working

------------------------------------------------------

document-list-filters-filter_19745ddd - not working (again, too many numbers)

document-list-filters-filter_197_5ddd - working (change ‘4’ to ‘_’)

------------------------------------------------------

document-list-filters-filter_0e73246f - not working ( too many numbers)

document-list-filters-filter_0e732y6f working ( change from ‘4’ to ‘y’)

and a lot more examples of this pain process. It's impossible to give developers clear instructions on how to make IDs on the web that will work with TC. Can this please be fixed? I was more than a month on these IDs. Older versions sometimes didn't even work when I put manually simple ID like “john” or “john_1”.

And at the latest version of TC, we saw that it is crashing a lot more without any messages or reason. Or for example, when you stop the test when it is running, it will frezze and you need to kill the TC in the task manager.

 

5 Replies

  • iddebug01's avatar
    iddebug01
    New Contributor

    Yes, that is true, but it is not reliable, tests fail just because xpaht options and are not good enough, or the test is waiting a long time before it finds a match. We found that the only thing we can rely on is ID.

    What I am reporting is that recognising IDs on the web is not working properly. If I need to change ID from
    "document-list-filters-filter_0e73246f"
    to
    "document-list-filters-filter_0e732y6f"
    Just because TC can't handle more than 3 numbers in sequence. That is the issue. And other cases I mentioned in the post. Recognition of ID in the web component is buggy or needs improvements



    • rraghvani's avatar
      rraghvani
      Icon for Champion Level 3 rankChampion Level 3

      I'm assuming you are changing the ID from "document-list-filters-filter_0e73246f" to "document-list-filters-filter_0e732y6f" because TestComplete is no longer able to identify the object with that attribute, as it's dynamically changing?

      If that's the case, the you need to use wildcard i.e. "document-list-filters-filter_*".

      If you want your HTML elements to have unqiue ID's, then you have to use the HTML id attribute

       

  • iddebug01's avatar
    iddebug01
    New Contributor

    When you double-click on a step and have the option to drag the target, I can then see the dropdown list of what TC writes in the name mapping to check if there is an ID or not. TC writes ID on the web starting with #, and if you look in the namemapping editor, ID won't have xPath, but it will have CSS.

    If in the dropdown list there is no option that starts with #, then i know it didn't write ID.

    The first option has # at the start, and I know this is an ID.


    Examples are IDs in web componets like <div .... id="......" >

    I apologise if i thought here are also bug reports.

    • rraghvani's avatar
      rraghvani
      Icon for Champion Level 3 rankChampion Level 3

      So you are referring to Name Mapping. TestComplete provides the option to use XPath Expressions or the Classic Approach to locate web elements based on their attributes. If you have created a name mapping where an attribute contains a name plus a number, and that number changes dynamically. Then you can use Wildcards to handle the variation.

      The most important part of working with TestComplete is understanding how object identification works. This involves defining the search criteria that TestComplete uses to locate a specific object.

      TestComplete can locate objects, without having an ID!

  • rraghvani's avatar
    rraghvani
    Icon for Champion Level 3 rankChampion Level 3

    This is a Community Forum, not Support.

    You've provided a number of examples, but what are they exactly, Name Mappings