If you want to click something in your AUT, then most of the time, just the simple “click” action will do. Sometimes, though, you might want a click that’s a bit more intelligent, one that includes a few checks and some synchronization.
This “synchronized click” module does three things – it waits for the component, checks that it is enabled, and then performs the click. The table below shows the data and component names used by the actions:
|Wait for component||TIMEOUT: 3000 DELAY: 0||nn_nn_grc|
|Check enablement||ENABLED: true||nn_nn_grc|
|Single left click||-||nn_nn_grc|
The TIMEOUT for the wait for component can be altered as necessary – you don’t necessarily have to allow 3 seconds in total for your component to be there, or you may want to allow more.
All three of the unbound modules used have the same component name (nn_nn_grc – any graphics component). They have all been propagated using the checkbox in the Component Names View.
When you reuse this module, you will not need to enter any data, but the component name nn_nn_grc will be visible (and changeable) in the component names view. You should change this name to reflect the actual component you want to click for each reuse of the module. We also recommend renaming the module at the place you use it – to make the test more understandable.
This example shows the synchronized click module being reused to click OK in a login dialog. The module has been renamed at the place where it is used so that it is more readable. The component name has been overwritten and is now an understandable symbolic name for the component being addressed.