RCPTT supports two recording modes: the Recording mode and the Assertion mode.
You can select any of them by clicking on the corresponding button of the
the Control Panel toolbar.
You can also use hotkeys to switch between them, which is useful for some cases when a mouse click affects the
current state of any AUT elements. The hotkey hint is shown in the bottom
of the Control Panel window.
In assertion mode you can verify any property of any widget (tree, button, text, canvas, etc.).
During a test recording switch to assertion mode:
Select any AUT widget you want to assert (you will see red frames).
Let's say we need to assert that Finish button is disabled in New Java Class Dialog:
Once you select a button the assertion window appears containing widget properties with their values.
Select the required one and press Add button:
The assertion code is added to your test script immidiately:
Sometimes we need to verify the absence of some UI element, like when we've deleted an item from a tree we
need to verify that there is no such an item anymore.
We can do it with the help of verify-error command.
Let's say we need to verify that there is no New/Java Project menu when we are in a Plug-in Development Perspective.
So we add a negative assertion manually: