Dynamic scenarios - NextensArelB/SwaggerGenerationTool GitHub Wiki
Within the fiscal applications there are a lot of tabs, and a tree like structure under some tabs. All these tabs and pages within the tree structure have an active or not active state. The tree structure has expandable and collapsable items. All these states need to be catched and worked with if we want to mimick a user. For example: we cannot click on a link that is hidden due to a collapsed parent.
These states of buttons and pages are put into the locators:

Now all we need is the logic to have the script behave in a way that whatever the configured state of buttons and pages is, the script always mimicks the user and won't click on an invisible button.
We write this logic using "if exists then" statements:
