Many a times when working with Oracle EBS forms, automation test engineer wants to bring forms to base state and continue with next steps, this can be achieved very easily using OATS. There is an api given as part of forms object, which is getAllOpenWindows(), this method in forms returns List of AbstractWindows, you can write a for loop to navigate through all windows and check if the name attribute is not navigator and close all the forms other than navigator.
For users convenience we are giving a ready made function for the above purpose.
Code Snippet for bringing Oracle EBS Forms to Base state by closing all open windows except for Navigator Window
public void formsBaseState() throws Exception
// get all open windows in the current state of execution
//iterate through all windows and close all the windows except for the navigator window
// check if the current window is not a navigator window
if(allwindows[i].getAttribute("name")!=null && !allwindows[i].getAttribute("name").equals("NAVIGATOR"))
Note: the above code snippet works for a pure positive case when there wont be any issues in closing each window, you could add additional code to handle situations where windows like Caution Window / Alert Window / Decision Window might appear whenever each window is closed. Just make sure that the function may not get delayed.
Founder of TestingTools.co, constantly shares knowledge on different test automation tools. Has experience in building proof of concepts, solutions, frameworks, platforms & implementation of test automation projects.
In pursuit of building a platform with inbuilt framework and reusable components for Oracle Cloud applications ( Oracle HCM, CX, SCM, Financials clouds, Salesforce and other cloud applications )
Major accomplishments in his career:
Product architect and development manager for test automation platforms
Oracle Flow Builder @ Oracle
CloudTestr @ Suneratech
2 times to oracle open world
More than 20 successful POCs ( Proof of concepts )
Designed pricing models.
Trained more than 50 members.
Built more than 100 re-usable functions.
Worked with tools: