Forum Discussion

nikki85's avatar
nikki85
Contributor
5 years ago

spend so much time to load objects when run an empty keywords

Dear,

 

I am blocked by a issue day and night, I run an empty keywords , why does it spend so much time to load objects. this just happened at one computer ,other computers are ok

Attached the picture and project

Look forward to your answer

 

Thanks,

Nikki

12 Replies

  • Wamboo's avatar
    Wamboo
    Community Hero

    Hello!

     

    Hmmm Do You have something inside "General events"? maybe something is sitting inside "OnTeststart" event.

    • nikki85's avatar
      nikki85
      Contributor

      Hi Wamboo,

      Thanks for your reply, I didn't create any general events,it seems to load the  elements before running a test , this takes much time , after load the elements, it can run correctly, it only happened at one computer , other computers are ok with the same test 

      Best Regards,

      Nikki

    • nikki85's avatar
      nikki85
      Contributor

      Hello Wamboo,

      add some information , I defined the elements like below with VB scripts

      set dlg=Aliases.Mwt.dlg
      set dlgbtnOK=dlg.btnOK
      set dlgbtnYes=dlg.btnYes
      set dlgbtnNo=dlg.btnNo
      set dlgbtnSave=dlg.btnSave
      set dlgMessage=dlg.Message
      set dlgMessage1=dlg.Message1
      set dlgbtnOpen=Aliases.Mwt.dlg.btnOpen
      set dlgbtnOK=Aliases.Mwt.dlg.btnOK
      Set btnOverwrite=Aliases.Mwt.dlg.btnOverwrite
      Set dlgbtnClose=Aliases.Mwt.dlg.btnClose
      Set dlgbtncheck=Aliases.Mwt.dlg.check
      Set dlgbtnCancel=Aliases.Mwt.dlg.btnCancel
      Set dlgbtnUnzip=Aliases.Mwt.dlg.btnUnzip
      Set radioST=Aliases.Mwt.dlg.radioST
      Set radioTRUE=Aliases.Mwt.dlg.radioTRUE
      Set ComboBox=Aliases.Mwt.dlg.ComboBox 'MP pop up dlg
      Set ComboBox2=Aliases.Mwt.dlg.ComboBox2
      Set ListTemp=Aliases.Mwt.dlg.ListTemp
      'set dlgEdit=Aliases.Mwt.dlg.ComboBoxEx32.ComboBox.Edit
      set dlgEdit1=Aliases.Mwt.dlg.Edit 'MP pop up dlg
      set Failed=dlg.Message.Failed
      set The_password_has_been_changed_successfully_=dlg.Message.The_password_has_been_changed_successfully_
      set Save_succeed_=dlg.Message.Save_succeed_
      Set Download_Changes_not_possible_=dlg.Message.Download_Changes_not_possible_
      Set Are_you_sure_you_want_to_download_=dlg.Message.Are_you_sure_you_want_to_download_
      set dlgMessage1=dlg.Message1

      • tristaanogre's avatar
        tristaanogre
        Esteemed Contributor

        Right there is your problem, setting all those variables.  If they aren't in a procedure or function but "global" in a script unit, then as soon as your project starts, those variables are attempted to be set.  And then, as AlexKaras  points out, TestComplete attempts to find those objects and assign the values.  Since the application objects that those variables reference aren't present in memory at that point, then TestComplete will take up to the maximum timeout to find the objects before going to the next one.

        I would wrap those "set" commands into a Sub or Function and put them in a routine that you can call as needed rather than make them global.

  • Could you try going to tools -> current project properties -> playback -> and then turn on the checkbox for minimize testcomplete