Ask a Question

Checkpoint wizard

SOLVED
Leahy
Contributor

Checkpoint wizard

I recorded a script on tuesday, it worked great then and on wednesday.  Today when I ran it, I kept getting, "Cannot read property 'Check' of undefined.

Here is the code snippet:


"Success = Regions.Reversed.Check(Regions.CreateRegionInfo(Aliases.browser.BrowserWindow.Chrome_Legacy_Window, 139, 319, 1727, 181, false), false, false, 10419, 255);"

Included is the error message and a list of the files showing the PNG in the regions directory....

 

This is very frustrating, I hope some one can tell me what is going wrong....If I redo the checkpoint wizard and make a new one it works again...

 

5 REPLIES 5
tristaanogre
Esteemed Contributor

The Reversed.png file is present... but that's not what is being called.

In your project, go to the Regions node in your project.  Based upon what you have writen as code, I would expect there to be an item in the list of regions available named Reserved.  IF that's missing, that's why you're getting the error...  Reserved is undefined, therefore Check is an unkown identifier.

 

Basically... somewhere between today and yesterday, the Reversed object has been removed from the Regions collection.


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

Thanks Robert but,

 

 "Based upon what you have writen as code, I would expect there to be an item in the list of regions available named Reserved. "

 

""Success = Regions.Reversed.Check(Regions.CreateRegionInfo(Aliases.browser.BrowserWindow.Chrome_Legacy_Window, 139, 319, 1727, 181, false), false, false, 10419, 255);"

 

Where do you see "Reserved?"

 

"Basically... the Reversed object has been removed", um no it is still there....

 

Lee

tristaanogre
Esteemed Contributor

The file may be present in the hard drive, but the Regions store must contain it.  (And I meant Reversed... typo).  So check here and see if it's present.

2019-07-19 08_10_59-TestComplete - C__MySource_Sandbox_Sandbox.pjs.png


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

Ah ha  !!!  I was looking in the regions directory with file explorer...when I used project explorer in the app, it was not there.  I added it and it all seems to be ok now..

 

Thank you for your patience   🙂

 

Lee

tristaanogre
Esteemed Contributor

No problem!  Now, as to WHY it got removed from the Project Explorer...  That I cannot speak to.


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
cancel
Showing results for 
Search instead for 
Did you mean: