--- title: Forms in Service Portal category description: Validate the functionality of fields and UI actions in Service Portal form widgets.Opens a form in a portal.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.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.Validates field states on a form in Service Portal.Test the functionality of attaching a file to a Service Portal form widget.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.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.Submits the current form in a Service Portal page and outputs the table and sys\_id of the submitted record. locale: en-US canonical_url: https://www.servicenow.com/docs/r/australia/application-development/automated-test-framework-atf/test-steps-forms-portal-category.html release: australia product: Automated Test Framework \(ATF\) classification: automated-test-framework-atf topic_type: reference last_updated: "2026-03-12" reading_time_minutes: 11 breadcrumb: [Automated Test Framework \(ATF\) test step categories, Automated Test Framework \(ATF\), Testing and debugging applications, Building applications] --- # 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](https://raw.githubusercontent.com/ServiceNow/ServiceNowDocs/australia/markdown/australia/application-development/automated-test-framework-atf/test-steps-custom-ui-category.md) step from the Custom UI category.
| Field | Description |
|---|---|
| Execution order | Integer specifying the order in which the test executes this step.As you create steps, the system automatically assigns each step an incremental value. This value causes the test to execute steps in the order that you created them in. You can change this default order by editing the **Execution order** values. |
| Active | Option to activate this test step for use. |
| Timeout | Number of seconds allowed before the step fails. If the validation fails, the system repeats the step until it reaches the duration of the timeout. If the validation fails after the timeout duration has passed, the step fails. |
| Application | Application scope in which the system runs this step. |
| Test | Read-only name of the test that you're adding the step to. |
| Step config | Read-only name of the step. |
| Description | Description of the test step. This field value is automatically set based on the field values of the test step. This field appears after the test step is submitted. |
| Notes | Notes about the test step. |
| Portal | Portal in which the defined form opens. Service Portal is the default. |
| Page | Page to open in the defined portal. The form page is the default. |
| Table | Table containing the form to open. |
| sys\_id | Sys\_id of the record to open. Default is `-1`, which opens a new record. |
| View | The form view to open. If blank, the system uses the default view. |
| Query parameters | Additional URL query parameters and values for the form. |
| Field | Description |
|---|---|
| Execution order | Integer specifying the order in which the test executes this step.As you create steps, the system automatically assigns each step an incremental value. This value causes the test to execute steps in the order that you created them in. You can change this default order by editing the **Execution order** values. |
| Active | Option to activate this test step for use. |
| Application | Application scope in which the system runs this step. |
| Test | Read-only name of the test that you're adding the step to. |
| Step config | Read-only name of the step. |
| Description | Description of the test step. This field value is automatically set based on the field values of the test step. This field appears after the test step is submitted. |
| Notes | Notes about the test step.**Note:** Use the condition builder to set the field value. The condition builder displays an appropriate control for the field data type. For example, a reference field displays a **Lookup record** control. |
| Table | The table for the form on which to set field values. The value should be the table in the **Open a Form \(SP\)** step. |
| Field values | Fields for which to set values and the values to be set for those fields. |
| Field | Description |
|---|---|
| Execution order | Integer specifying the order in which the test executes this step.As you create steps, the system automatically assigns each step an incremental value. This value causes the test to execute steps in the order that you created them in. You can change this default order by editing the **Execution order** values. |
| Active | Option to activate this test step for use. |
| Application | Application scope in which the system runs this step. |
| Test | Read-only name of the test that you're adding the step to. |
| Step config | Read-only name of the step. |
| Description | Description of the test step. This field value is automatically set based on the field values of the test step. This field appears after the test step is submitted. |
| Notes | Notes about the test step.**Note:** Use the condition builder to set the field value. The condition builder displays an appropriate control for the field data type. For example, a reference field displays a **Lookup record** control. |
| Table | The table that contains the form on which to validate fields. The value should be the table in the **Open a Form \(SP\)** step. |
| Conditions | Conditions used to validate one or more fields on the form. If the condition evaluates to true, the step passes. |
| Field | Description |
|---|---|
| Execution order | Integer specifying the order in which the test executes this step.As you create steps, the system automatically assigns each step an incremental value. This value causes the test to execute steps in the order that you created them in. You can change this default order by editing the **Execution order** values. |
| Active | Option to activate this test step for use. |
| Application | Application scope in which the system runs this step. |
| Test | Read-only name of the test that you're adding the step to. |
| Step config | Read-only name of the step. |
| Description | Description of the test step. This field value is automatically set based on the field values of the test step. This field appears after the test step is submitted. |
| Notes | Notes about the test step. |
| Table | The table for the form on which to validate field states. The value should be the table in the **Open a Form \(SP\)** step. |
| Visible | Validates whether the fields on this form are visible. The test fails if the fields are not visible. |
| Not visible | Validates whether the fields on this form are visible. The test fails if the fields are visible. |
| Read only | Validates whether the fields on this form are read only. The test fails if the fields are not read only. |
| Not read only | Validates whether the fields on this form are read only. The test fails if the fields are read only. |
| Mandatory | Validates whether the fields on this form are mandatory. The test fails if the fields are not mandatory. |
| Not Mandatory | Validates whether the fields on this form are mandatory. The test fails if the fields are mandatory. |
| Field | Description |
|---|---|
| Execution order | Integer specifying the order in which the test executes this step.As you create steps, the system automatically assigns each step an incremental value. This value causes the test to execute steps in the order that you created them in. You can change this default order by editing the **Execution order** values. |
| Active | Option to activate this test step for use. |
| Application | Application scope in which the system runs this step. |
| Test | Read-only name of the test that you're adding the step to. |
| Step config | Read-only name of the step. |
| Notes | Notes about the test step. |
| Upload Attachments | Button to attach one or more files to the form. |
| Field | Description |
|---|---|
| Execution order | Integer specifying the order in which the test executes this step.As you create steps, the system automatically assigns each step an incremental value. This value causes the test to execute steps in the order that you created them in. You can change this default order by editing the **Execution order** values. |
| Active | Option to activate this test step for use. |
| Application | Application scope in which the system runs this step. |
| Test | Read-only name of the test that you're adding the step to. |
| Step config | Read-only name of the step. |
| Description | Description of the test step. This field value is automatically set based on the field values of the test step. This field appears after the test step is submitted. |
| Notes | Notes about the test step. |
| Table | The table for the form on which to check UI action visibility. The value should be the table in the **Open a Form \(SP\)** step. |
| Visible | Fields from the UI Actions table to be checked for visibility. Includes only form-based UI actions. The test fails if the UI action is not visible on the form for the currently logged in user.**Note:** If the list contains UI actions with the same name, check the form to determine the sys\_id of the element. Then filter by sys\_id in the UI Action table to select the correct element in the step. |
| Not visible | Fields from the UI Actions table to be checked for visibility. Includes only form-based UI actions. The test fails if the UI action is visible on the form for the currently logged in user.**Note:** If the list contains UI actions with the same name, check the form to determine the sys\_id of the element. Then filter by sys\_id in the UI Action table to select the correct element in the step. |
| Field | Description |
|---|---|
| Execution order | Integer specifying the order in which the test executes this step.As you create steps, the system automatically assigns each step an incremental value. This value causes the test to execute steps in the order that you created them in. You can change this default order by editing the **Execution order** values. |
| Active | Option to activate this test step for use. |
| Timeout | Number of seconds allowed before the step fails. If the validation fails, the system repeats the step until it reaches the duration of the timeout. If the validation fails after the timeout duration has passed, the step fails. |
| Application | Application scope in which the system runs this step. |
| Test | Read-only name of the test that you're adding the step to. |
| Step config | Read-only name of the step. |
| Description | Description of the test step. This field value is automatically set based on the field values of the test step. This field appears after the test step is submitted. |
| Notes | Notes about the test step. |
| Table | The table for the form on which to click a UI action. The value should be the table in the **Open a Form \(SP\)** step. |
| UI action | The UI action to click, selected from the UI Actions table. Includes only form-based UI actions. |
| Assert type | Specifies where to check for form submission after clicking the UI action:- **--None--**: Selects the UI action without validating mandatory or other fields. - **Form submission canceled in browser**: Checks whether the form was canceled in the browser and did not reach the server due to validation or other issues. - **Form submitted to server**: Checks whether the form was submitted to the server. |
| Field | Description |
|---|---|
| Execution order | Integer specifying the order in which the test executes this step.As you create steps, the system automatically assigns each step an incremental value. This value causes the test to execute steps in the order that you created them in. You can change this default order by editing the **Execution order** values. |
| Active | Option to activate this test step for use. |
| Timeout | Number of seconds allowed before the step fails. If the validation fails, the system repeats the step until it reaches the duration of the timeout. If the validation fails after the timeout duration has passed, the step fails. |
| Application | Application scope in which the system runs this step. |
| Test | Read-only name of the test that you're adding the step to. |
| Step config | Read-only name of the step. |
| Description | Description of the test step. This field value is automatically set based on the field values of the test step. This field appears after the test step is submitted. |
| Notes | Notes about the test step. |
| Assert type | Specifies where to check for form submission:- **--None--**: Submits the form without validating mandatory or other fields. - **Form submitted to server**: Checks if the form was submitted to the server. - **Form submission canceled in browser**: Checks whether the form was canceled in the browser and did not reach the server due to validation or other issues. |