In testing Console Applications, the ‘Active Tab’ concept is important because Console Applications can have multiple Tabs open. Provar will generally assume that the Test Step should be executed on whatever tab is currently active, but this behavior can be changed if the test requires navigating to a different tab. This is defined in each Test Step so that Provar can execute the Test Step on the correct tab.
The Tab might need to be changed if, for example, the user needs to move from a Case tab to the parent Account to update some information. In this case, the Console Tab Type would define this as ‘Existing Tab’ and also require a Primary Tab name (and a Secondary Tab name where applicable). Other options are included for opening a new tab, or moving back to a home tab.
Primary Tabs and Secondary Tabs
Primary Tab and Secondary tab fields need to match the names which Salesforce has allocated to the Tabs.
These names are defaulted where possible (e.g. when Console Tab Type is ‘Current Tab’), but they will need to be defined manually when, for example, the user is navigating back to an existing tab.
Provar will use this name to navigate to the correct Tab.
This is how the fields appear in Provar:
Note that, if there is no secondary tab, ‘Secondary Tab Name’ can be left blank.
It is also possible to pass a variable into the Tab Name (for example a record ID) instead of entering a static value.
These options can also be entered into Test Builder as you map fields:
They will be defaulted where possible.
Closing Console Tabs
Console applications have a cached history which means when you log in, certain tabs and objects may already be open. To allow your tests to be reliable it is important that your tests start at a known state. In order to achieve this you can close down all existing tabs using a flag in the Salesforce connection step.
Testing Custom Console Components
Salesforce’s Custom Console Components are a useful feature of the Consoles because they help to display maximum information on a single console page while saving clicks.
Custom Console Components can be created and added to the console page layout in various locations:
Mapping these console screen components in Provar is no different from the normal procedure of mapping other elements either on a Standard Salesforce page or VF Page.
The following steps show the mapping of one such Console Component as an example:
Step 1: Right click on the element that you wish to map on the console Custom Component:
Step 2: Provide the information on the Test Builder and click ‘Add & Do’.
Once mapped, you should see the following in the Test Step in Provar Desktop:
Parameters should be defined as follows:
- Page Type: This should be ‘Console Component’ followed by the Object Name to which the Component belongs, e.g. ‘Account’
- Page Mode: This should be the section on which the action should be performed, e.g. ‘Open Cases’
- Page Object: This should be the name of the Page Object created in the Test Builder which stores the fields mapped from the Custom Component
- Tab Type: This should be defined according to the rules explained in the ‘Console Tab Types’ section above
Then save the Test Case.