Forms in Service Portal category
-
- UpdatedJan 30, 2025
- 9 minutes to read
- Yokohama
- Automated Test Framework
Forms in Service Portal category
Validate the functionality of fields and UI actions in Service Portal form widgets.
Service Portal dependency
Creating automated Service Portal steps requires knowledge of the ServiceNow data model and Service Portal form and data structures.
Open a Form (SP)
Opens a form in a portal.
Use this step for the base system Form page. For custom form pages, use the Open Service Portal Page step from the Custom UI category.
Set Field Values (SP)
Sets the values of fields in a form. To use this step, you must have already opened a form using the Open a Form (SP) test step.
Field Values Validation (SP)
Validates field values on the current form based on defined conditions. To use this step, you must have already opened a form using the Open a Form (SP) test step.
Field State Validation (SP)
Validates field states on a form in Service Portal.
Add Attachments to Form (SP)
Test the functionality of attaching a file to a Service Portal form widget.
To use this step, you must have already opened a form using the Open a Form (SP) test step or Open Service Portal Page steps. This step can't be used after a Submit Form step or Click a UI Action step has been used.
UI Action Visibility Validation (SP)
Determines whether a UI action on the current Service Portal form is visible. To use this step, you must have already opened a form using the Open a Form (SP) test step.
Service Portal only supports server UI actions. The setRedirectURL() method and client UI actions are not supported. UI action visibility can vary depending on the currently logged in or impersonated user.
Click UI Action (SP)
Selects a UI action on the current Service Portal form and outputs the table and sys_id of the record on which the action was selected.
To use this step, you must have already opened a form using the Open a Form (SP) test step. After using this step, you cannot use any other form steps.
Field | Description |
---|---|
record_id | Sys_id of the record on which the action was clicked. |
table | Table with the clicked UI action. |
Submit a Form (SP)
Submits the current form in a Service Portal page and outputs the table and sys_id of the submitted record.
To use this step, you must have already opened a form using the Open a Form (SP) test step. After using this step, the page closes. You can't use any other steps on the current page.
Field | Description |
---|---|
record_id | Sys_id of the submitted record. |
table | Table for the submitted record. |