Forum Discussion
3 Replies
Sort By
- EdenWheelerOccasional Contributor
Hii!
To close all the windows opened during a failed TestComplete test case using Python, you can use the following code snippet:
def close_application(): # Close all windows desktop = TestedApps.ApplicationName desktop.CloseAllWindows() # Call the function to close windows close_application()
The CloseAllWindows() method is used to close all open windows in the application. You can customize this method based on your application's name and other requirements.
You can call this function at the end of your test case, or when a test case fails. This will ensure that all windows are closed before the next test case starts executing.
I hope this will help you.
- Prav_AkulaNew Contributor
Thank you for quick response. I will try and let you know the result.
- rraghvaniChampion Level 3
Related Content
- 4 years ago
- 3 years ago
- 6 years ago