How to Command TC not to Report error when "Object Not Found"
I am writing this script for edit a record, for that first I am finding the record using a sub routine Find(Text) , if record found foucs will be set to that record and by passing keys ^E I am opening that record for editing. If the record not found I am sending message to the TestResults window. " Record Not found".
During this if record not found TestComplete never sends any error messages and my test pass with my message I can see.
if record exists edit operation performed correctly but TestComplete will send error to TestRusults with DBerror window not found. Since Record exists it never pops up.
Because of this whole my Test Results window fill with errors since I Use more number of times this for my tests.
Please let me know how to handle this , how can i tell TestComplete not to wait more time if that DBerror window doesn't appear and not to send any error messages to TestRusults window. if record found.
I am using the below script for my tests..
Please tell me How to command the TC to skip an Object when not required and not to report TestResults as an error when Object not Found. Is to possbile to do that..
Call Input1.keys("^f") 'Find operation in my app
Call Find(Record) ' Find() is another Sub routine which will set the Focus on the Record
If EObj.exists then
Log.Message("Record Not Found")
Call Rec1.keys("^E") 'Sends File - Edit
Test Results : ( if Record found )
Cannot obtain the window with the window class'DBerror', window caption 'xyz-....." and Index 1.
RE: How to Command TC not to Report error when "Object Not Found"
Have a look at the Wait... version of the corresponding function (i.e. WaitProcess(), WaitWindow(), WaitChild(), WaitVCLObject(), etc.). Read relevant TestComplete help topic for more function details.
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 ================================