Forum Discussion

sree2011's avatar
sree2011
Contributor
7 years ago

Issue with scripts upgrade from Test Complete 11 to Test Complete 12

Hi,

 

I have recently upgraded my test complete version from TC 11 to TC 12.31. I am facing now issue with my existing scripts which was developed in TC 11 and which was running fine in TC 11. Where ever I try to click on any object which does not exists it is getting an error in Err Object as "Object required: 'Sys.Process(...).WPFObject(...)'" and it comes out of that specific Function/Sub skipping the remaining code of the Function/Sub. In TC 11, for the same code, execution go to the next code even if the object does not exists. Please help on this.

 

Thanks in advance,

Sreekanth

8 Replies

  • tristaanogre's avatar
    tristaanogre
    Esteemed Contributor

    Can you post the code?  What code language are you using? A bit more information as to what this looks like will help out.

    • sree2011's avatar
      sree2011
      Contributor

      I am using Vb Script for scripting. Following is one of the sub which we are using

       

      Sub TestSub(engName,Ftype)
         If Sys.Process("*").WPFObject("HwndSource: DesignerHost").Exists Then
              Sys.Process("*").WPFObject("HwndSource: DesignerHost").Close
         End if
         BuiltIn.Delay(4000)

         If Sys.Process("eAudIT").WPFObject("HwndSource: eAudITMessageBox", "").Exists Then
             Set msgBox = Sys.Process("eAudIT").WPFObject("HwndSource: eAudITMessageBox", "").FindChild(Array("Name","Visible"),Array("WPFObject(""btnYes"")", True),10)
             If msgBox.Exists Then
                 Call msgBox.Click
             End If
         End If
             
         Engagement="Engagement:"+engName
         Builtin.Delay (2000)
      End Sub

       

      Here in the first If condition if the object does not exists, it will have the mentioned error in Err. Description and it will come out of the Sub without going to the remaining code. Please let me know if you require any further information.