Forum Discussion

larolsen's avatar
larolsen
Contributor
8 years ago

Getting warnings in log in TC12

Hi

 

I recently upgraded to TestComplete 12.

 

After a testrun I noticed warnings in the log that wasn't present when I was using TC11. The code in questions is this:

 

if Aliases.Device.pnlBack.WaitProperty("Exists", True, 1000) = true then
    call Aliases.Device.pnlBack.Touch
    delay(2000)
end if

 

In TC11 this worked as expected (if the mapped object was there, it was touched, if it was not present nothing happend)

The warning is this:

 

Failed to find the exact match for the test object:

NameMapping.Mobile.Device.processTheApp.window02.webview0.pnllBack


Hint: A similar object has been found – see the Picture tab. Consider updating the identification properties to use the similar object:

  Property Mapping Value Found Action

idStrNavigation_BackuiviewUpdate

 

Is it possible to disable these warnings in the log in TC12?

 

Best regards

Lars Lund Olsen

5 Replies

  • taisapi's avatar
    taisapi
    Occasional Contributor

    This is the exact issue that I am also seeing, since upgrading to TC12. Tests that used to pass are now a warning.

  • I was having the same issue with one of our keywordtests. I figured out the solution. We have a couple of project variables that get set and that are used as parameters for a mapped object. As it turns out we have a similar mapping that used the same property with a second property value being set using the variable for both mappings. This caused some ambiguity when we tried to refresh the mapping. I had to refresh the object at the parent level. This allowed the value to be set and in turn removed the ambiguity in the mapping.

     

    Of course the cleaner method would be to fix the mapping altogether because this is sloppy, which we will at some point, but I figured it might help with the issue your having.

     

    KeywordTest in question:

     

    Set Variable Value    "project_var1"

    Set Variable Value    "project_var2"

     

    Aliases.WinShell.Hwnd_Dialog.RefreshMappingInfo (not working)

    Aliases.WinShell.RefreshMappingInfo  (working)

     

  • wet's avatar
    wet
    New Contributor

    We have a similar problem now in TC12.

    For example something like this

    while Aliases.xxx.dlgxxx_AfxMessage.WaitProperty("Exists",true,400) = false 
    call Aliases.xxx.dlgDatabaseOverview.btnZoomIn.ClickButton
    wend

    causes warnings in log "An object recognition hint. See Additional Information for details." with the suggestion to use another open window.

    This fails now our tests. In TC11 it worked fine.

     

     

    • Bobik's avatar
      Bobik
      Frequent Contributor

      Bad Aliases use:

        while ( Aliases.xxx.dlgxxx_AfxMessage.WaitProperty("Exists",true,400) = false)

           call Aliases.xxx.dlgDatabaseOverview.btnZoomIn.ClickButton
        wend

      better way:

        while ( !Aliases.xxx.WaitAliasChild("dlgxxx_AfxMessage",400).Exists)

           call Aliases.xxx.dlgDatabaseOverview.btnZoomIn.ClickButton
        wend

       

      Same isue like here

      • wet's avatar
        wet
        New Contributor

        Thanks! That solves my problem in this case.