Forum Discussion

SJ1's avatar
Occasional Contributor
6 years ago

Unable 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 st...
  • shankar_r's avatar
    6 years ago

    Below approach is not recommended by many users but based on the flow this will work.


    function Window_NoResultsFound() {
        var noResultsFoundAlert = null;
            noResultsFoundAlert = eval(ReadObjectsFromXML.noResultsFoundAlert);
            //if you want you can Log.erro here too
        if (noResultsFoundAlert == null) {
            Log.Checkpoint("Window is not displayed as expected.")    
        } else {
            if (noResultsFoundAlert.Exists) {
                Log.Error("Windows is displayed");
            } else {
                Log.Checkpoint("Window is not displayed as expected.");