Introduction
Hi there!
Sometimes you may encounter a situation where a test may fail as the web test object locator could not find WebUI objects. These broken web test objects can be fixed by restoring the application's state by opening a Time Capsule. In this blog, we shall learn how the time capsule helps maintain test scripts.
Fixing Web Test Objects
Katalon provides Self-healing to automatically prevent test failures due to broken locators. For Broken web test objects that aren't fixed by the Self-healing feature, Katalon offers Time Capsules that capture the state of your application when a test fails.
Time Capsule
Time capsules usually work only on Web UI objects. The feature is available only for Katalon versions 7.8 and above. The Time Capsule is enabled by default for versions below 7.8.2. Versions above 7.8.2 offer the ability to ON/OFF the Time capsule. Disabling it will not install the Time capsule extension or generate the time capsule. To enable or disable the Time capsule navigate to Project > Settings > Execution > WebUI. Choose to enable or disable the Default Time Capsule option and click on Apply.
Failed Test Case Execution Scenario
Consider a failed test case execution scenario where a test case fails due to a broken locator, as shown below.
Click on Click here to fix broken Test Object.
The Time Capsule displays the visual aspects of your application to easily capture objects and find broken locators. The Object Spy window shows the locator involved and the object properties. After rectifying the mistake causing the error, click on Verify and Highlight.
Click on Save to retain the changes made. After reviewing the details, click on OK in the Add Element to Object Repository window.
Run the test case again to view the final result.
This is how you can use the Time Capsule to fix broken Web objects in Katalon.