Application Navigator category
-
- UpdatedAug 1, 2024
- 12 minutes to read
- Xanadu
- Automated Test Framework
Verify the functionality of menus and modules in the application navigator.
Application Menu Visibility
Verifies the visibility, or lack thereof, of selected application menus in the application navigator (left navigation bar). For example, you create a test that first impersonates a user, then verifies that specified application menus (such as Self-Service and Reports) are visible, or are not visible, to that user.
Create an application menu
Application menus define the main content that users can access in the application navigator. You can configure which applications appear in the application navigator.
Before you begin
About this task
Procedure
Create a module
Modules are the children, or the second tier navigation options to the applications in the application navigator. Modules often link to other pages or records in the platform. You can configure which modules appear in the application navigator using Application Menus module.
Watch this five-minute video to learn about adding application menus and modules to the application navigator.
Before you begin
Procedure
Module link types
The Link type field on the Module form specifies what type of link the module opens.
Encoding module URIs
Clicking a module name in the navigation pane executes a URI that opens the module's page in the content pane. All the characters in module URIs must be URL-encoded or the link breaks.
When you create modules, you have the option of adding arguments and filter conditions that sort and/or reduce the number of results displayed in the content pane. When you click a module name in Link Type tab.
, you can see those conditions and arguments on theThe argument definition in Arguments and filter conditions defined in
Filter become part of the module's URI and must be URL-encoded. ServiceNow automatically URL-encodes
filter conditions and appends them to the module URI using sysparm_query. For example, adding
the filter condition, Active is true appends
sysparm_query=active%3Dtrue
to the module's URI; %3D is the URL-encoding
for the equals sign (=).
The following table shows when you must URL-encode the argument in the Arguments field and when ServiceNow URL-encodes the argument.
You can turn on (the default) and off the URL-encoding requirement for module UIs using the glide.ui.encode_module_uri property.
Examples
- There are no filter conditions and the argument definition in
Arguments starts with an ampersand, for
example,
&sysparm_fixed_query=assigned_to=javascript:gs.user_id()
.This argument breaks the module URI because the equals sign and the colon are not URL-encoded, and the ampersand prevents ServiceNow from URL-encoding the argument. URL-encode the argument:
&sysparm_fixed_query=assigned_to%3Djavascript%3Ags.user_id()
. - There are filter conditions and the argument definition in Arguments
does not start with a caret (^), for example,
sysparm_name=Barnes & Noble's
.This argument breaks the module URI because the ampersand and spaces are not URL-encoded. URL-encode the argument:
sysparm_name=Barnes%20%26%20Nobel's
Module Visibility
Verify the visibility, or lack thereof, of selected modules in the application navigator (left navigation bar). For example, create a test that first impersonates a user, then verifies that specified modules (such as Homepage and My Requests) are visible, or are not visible, to that user.
Navigate to Module
Open a module from the application navigator, as if a user had clicked it. The module must be visible to the currently executing user to navigate to it.
On this page
Related Content
- Create an application menu
Application menus define the main content that users can access in the application navigator. You can configure which applications appear in the application navigator.