The ReplayHistoryCommand is used to synchronize client and server history. For example in the context of the dynamic views if several components are created and replaced.
If you combine the replacement or creation of dynamic components into a scripted test and then run it, the ScriptRecorder usually stops. If, on the other hand, the individual ApplicationActions are executed step by step, the ScriptRecorder works as expected.
The problem is caused by a fast, multiple reload of the page, which often occurs in tests of dynamic views. It may be the case that after the client-side call to start the `ReplayHistoryCommand` the page has already been reloaded. As a result, the `MainLayout is rebuilt and the "old controls" are no longer present.
This leads to the fact that when the command is executed on the server side, the command listener, usually the control, no longer exists and is therefore not found. Then the page is completely reloaded and an error message "Target Control not found" appears. Thus the ScriptRecorder loses its context and cannot continue with the rest of the script.
Implementation
The latter can be prevented by declaring the command as a system command.
Test
Start a test of the dynamic views, e.g. TestComponentEdit.script.xml and press the start button of the `ScriptRecorder`. The test should run without interruption until the end.