cancel
Showing results for 
Search instead for 
Did you mean: 

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

Highlighted
Contributor

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 12
Highlighted
Community Leader

Hello!

 

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

Highlighted
Staff

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

image.png

Best,
Justin Kim
Highlighted
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

Highlighted
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

Highlighted
Community Hero

Hi,

 

JFYI, consider this: https://community.smartbear.com/t5/TestComplete-Functional-Web/store-all-name-mapping-objects-in-a-p...

 

Regards,
  /Alex [Community Hero]
____
[Community Heroes] are not employed by SmartBear Software but
are just volunteers who have some experience with the tools by SmartBear Software
and a desire to help others. Posts made by [Community Heroes]
may differ from the official policies of SmartBear Software and should be treated
as the own private opinion of their authors and under no circumstances as an
official answer from SmartBear Software.
The [Community Hero] signature is used with permission by SmartBear Software.
https://community.smartbear.com/t5/custom/page/page-id/hall-of-fame
================================
Highlighted
Community Hero

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.


Robert Martin
[Hall of Fame]
Please consider giving a Kudo if I write good stuff
----

Why automate?  I do automated testing because there's only so much a human being can do and remain healthy.  Sleep is a requirement.  So, while people sleep, automation that I create does what I've described above in order to make sure that nothing gets past the final defense of the testing group.
I love good food, good books, good friends, and good fun.

Mysterious Gremlin Master
Vegas Thrill Rider
Extensions available
Highlighted
Contributor

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

Highlighted
Community Hero

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

 


Robert Martin
[Hall of Fame]
Please consider giving a Kudo if I write good stuff
----

Why automate?  I do automated testing because there's only so much a human being can do and remain healthy.  Sleep is a requirement.  So, while people sleep, automation that I create does what I've described above in order to make sure that nothing gets past the final defense of the testing group.
I love good food, good books, good friends, and good fun.

Mysterious Gremlin Master
Vegas Thrill Rider
Extensions available
Highlighted
Community Manager

Hi @nikki85 , was the issue solved? Please share the details with usSmiley Happy


Sonya Mihaljova
Community and Education Specialist

Learn SmartBear products in a fun and easy way and prove your knowledge!
>>Participate in the TechCorner Challenge today
New Here?
Join us and watch the welcome video:
Announcements
Join TechCorner Challenge!
Want a fun and easy way to learn TestComplete? Try solving weekly TechCorner challenges and get into the Leaderboard!


Challenge Status

Get properties of a web page element

See replies!

Compare images using the Region Checkpoint

See replies!

Compare HTML table with Excel file and correct data in Excel file

Participate!

How to execute remote test and obtain results via Test Runner REST API

Participate!
Top Kudoed Authors