Forum Discussion

BP79's avatar
BP79
New Contributor
14 years ago

Convert script 7.52 to 8.7

Hi,



We want to update to testcomplete 8.7 from 7.52

The first scripts didn't go to well and we would like your feedback.



A part of a script in 7.52 is:

Sub Selecteer_patient

  Sys.Process("Norma")

  Dim norma

  Dim textBoxMaskBox

  Call norma.NormaMain.PanelControl1.PatientBar.LayoutControl1.Keys("[F2]")

  Set textBoxMaskBox = norma.frmZoekPatient.LayoutControl1.txtPatNr.TextBoxMaskBox

  textBoxMaskBox.wText = "1000079"

  Call textBoxMaskBox.Keys("[Enter]")

End Sub



This sript, selecting a patient, doesn't work in 8.7. It looks like TC can't get into the application (Norma)



when recorded with TC 8.7 the sript looks like this':

Sub Selecteer_patient

  Dim wndWindowsForms10Window8app0215472d

  Dim wnd

  Set wndWindowsForms10Window8app0215472d = Aliases.Norma1.wndWindowsForms10Window8app0215472d

  Call wndWindowsForms10Window8app0215472d.WindowsForms10Window8app0215472d1.WindowsForms10Window8app0215472d.LayoutControl1.Keys("[F2]")

  Set wnd = wndWindowsForms10Window8app0215472d.LayoutControl1.WindowsForms10Windowbapp0215472d3.Item

  Call wnd.SetText("1000079")

  Call wnd.Keys("[Enter]")

End Sub



We have about 350 scripts. What do you advice?



thx


1 Reply

  • Hi Peter,



    TestComplete 8.70 doesn't recognize your tested application as Open. First of all, please make sure that the .NET Open Application Support plug-in is installed and enabled in TestComplete ("File | Install Extension..."). Also, a possible cause of the problem is that some complex actions which take long to be completed are performed in the application's GUI threads when the application is started (the application's main window may become blank or unresponsive in such cases). If so, try increasing the value of the "Method invoke timeout" option (set it to more than 30000) described in the "Project Properties - General Open Applications Options" article.



    Does this help?