cancel
Showing results for 
Search instead for 
Did you mean: 

Issue in TestComplete 10.0 which is not coming n TestComplete 8.7

Highlighted
Occasional Contributor

Issue in TestComplete 10.0 which is not coming n TestComplete 8.7

Hi,



We have recently updated our TestComplete from TestComplete 8.7 to 10.0.531.

In one of our Test Case we are getting the "object does not exist. see Additional Information" error in TestComplete 10.0



In Additional Information we have the following information as

"You are trying to call the "WinFormsObject" method or property of the "WinFormsObject("Our Application")" object that does not exist."





DurgaPrasad,

ION,

Quality Control,
5 REPLIES 5
Highlighted
Contributor

RE: Issue in TestComplete 10.0 which is not coming n TestComplete 8.7

Can you show us the code where's the problem?



First, you can check if the desktop module is installed. You can check this openning the setup of TestComplete, click in "Modify" and see if the Desktop module is checked. If yes, ignore this. If not, install this module and try to run your script and verify if the problem still happens.
Highlighted
Occasional Contributor

RE: Issue in TestComplete 10.0 which is not coming n TestComplete 8.7

Hi Leonardo,

We are working on desktop applications only and option is checked as desktop only in TestComplete installation

The following is the line of code 

Sys.WaitProcess("ApplicationName",2000,1).WaitWinFormsObject("ApplicationName",2000).WinFormsObject("MdiClient", "");





DurgaPrasad,

ION,

Quality Control,
Highlighted
Community Hero

RE: Issue in TestComplete 10.0 which is not coming n TestComplete 8.7

While, technically, it should work, the code you have posted is not exactly how I would recommend it.  You have two wait commands present and so there's the possiblity that one or the other will end up with a "Does not exist" error that will cascade.



Sys.WaitProcess("ApplicationName",2000,1).WaitWinFormsObject("ApplicationName",2000).WinFormsObject("MdiClient", "");



I would change your code to the following.  Note this is Pseudo code, not necessarily in a particular language

MyAppProcess = Sys.WaitProcess("ApplicationName", 2000, 1)

If MyAppProcess.Exists then begin

MyFormObject = MyAppProcess.WaitWinFormsObject("ApplicationName", 2000)

if MyFormObject.Exists then

MyMDIClient = MyFormObject.WinFormsObject("MdiClient","")

else

Log.Warning("My Form object does not exist")

end

else

Log.Warning("The process does not exists")




The idea is that you test for exist each time you call a "Wait" method.





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
Valued Contributor

RE: Issue in TestComplete 10.0 which is not coming n TestComplete 8.7

Robert is correct. You must check the exists property of each parent object prior to checking the exists property of the child object. The wait methods you have specified will not work as you are expecting.

''-Praise the sun and Give Kudos.''
Highlighted
Occasional Contributor

RE: Issue in TestComplete 10.0 which is not coming n TestComplete 8.7

Hi Robert,



i have updated code as the same but still the issue repeats in TC 10.0.



This isn't appear in TC 8.7



DurgaPrasad,

ION,

Quality Control,
New Here?
Join us and watch the welcome video:
Announcements
Script Wanted
Let's start July with new challenges!

Create a script to pass custom command-line arguments as a test parameter for the TechCorner tag!

Will you dare to take the challenge?


Top Kudoed Authors