Forum Discussion
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.
thanks tristannogre, it is strange that the scripts doesn't have the problem at other computers, at other computers ,it just spend less than one second,but at the current computer, the same scripts ,it needs take 8 mins to load all the objects,then to run the scripts.
Thanks,
Nikki
- tristaanogre5 years agoEsteemed Contributor
Something is different... and it's not TestComplete. I'm guessing:
1) They have different projects and are doing things differently.
2) They have the application in question open already when they start their automation run
- sonya_m5 years agoSmartBear Alumni (Retired)
Hi nikki85 , was the issue solved? Please share the details with us:smileyhappy:
- nikki855 years agoContributor
Dear ,
it popup error : PKIClientAgent.exe process crash when loaded the objects(Elements) before running test one time, is the testcomplete running related to the PKIClientAgent.exe.it just spent less than one second to load objects to run test before, now it spent 8 mins to load all the objects to run test, so i doubt if that company computer system updated to lead to this problem
the objects(Elements) are defined as below in 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
Thanks,
Nikki