Contributions
Re: Unable to handle the error using the script: "Unable to find the object"
Being a newbie, trying to do few things. Please let me know if there are better ways to do it. Ineed to log the Test case as Pass or Fail based on thewindow object being displayed or not. If object is available, then no issues, test case gets marked as Pass. But when the object/window is not available (and is not going to be displayed at all, so will not be able to use Wait), then it should log the result as "Fail" but now it throws runtime error. Is it possible to handle it?3.6KViews0likes5CommentsRe: Unable to handle the error using the script: "Unable to find the object"
Thank you AlexKaras and Shankar for your time. Unfortunately these options doesn't seem to work. 1. Stop On Error: Is not turned on 2. WaitAWTObject: didn't work 3. Exists : doesn't seem to work Looks like the script fails even before using these commands, where TestComplete tries to look for the object once its defined, once it hits the below line: var noResultsFoundAlert = eval(ReadObjectsFromXML.noResultsFoundAlert); I have also tried declaring the object directly in the script and not in xml. That doesn't seem to work as well. var noResultsFoundAlert = Aliases.jp2launcher.SwingObject("......"); The moment the object is declared, TestComplete tries to look for it and fails it straight away in runtime before moving onto the next statements/conditions. Any other solutions would be much appreciated.3.6KViews0likes7CommentsUnable to handle the error using the script: "Unable to find the object"
Hi, I am trying to automate oracle forms application. The script I have written searches for the window object. If its found, it logs "window found" else it should say "not found". Btw, i am storing the objects in XML as strings and using eval to convert to object, The script works fine when it finds the window object. In negative scenario, where the window object is not available, it abruptly terminates the execution flow with the message written to log: "Unable to find the object AWTObject("FWindow", "No Results Found", 0). See Additional Information for details." Instead I would expect the script to handle this error and get into the else part to display the message. [Note: I have not enabled Stop on Error in project properties] Can you please help me with the code to handle this object not found error which is thrown during the script execution? Please find the script below: function Window_NoResultsFound() { var noResultsFoundAlert = eval(ReadObjectsFromXML.noResultsFoundAlert); if(noResultsFoundAlert.VisibleOnScreen) { Log.Message("window displayed") } else { Log.Error("window not displayed"); } }Solved3.8KViews0likes10CommentsHow to get the test case execution status(pass/fail) after the test run?
Hi, A newbie question - I have a set of tests which are being executed in TestComplete 12.5. 1. How do we add assertion for the test case's expected result? 2. Also, can you assist me with the script to gettest execution status (such as pass or fail) at the end of every test run as I am planning to write the status against each test case in excel? Thanks.Solved2.5KViews0likes3Comments