<h2>UI Action Visibility</h2><br/><div style="overflow-x:auto"> <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"><head><meta content="text/html; charset=UTF-8" /><meta name="copyright" content="(C) Copyright 2025" /><meta name="DC.rights.owner" content="(C) Copyright 2025" /><meta name="generator" content="DITA-OT" /><meta name="DC.type" content="reference" /><meta name="DC.title" content="Form category" /><meta name="abstract" content="Validate the functionality of fields and UI actions on a form." /><meta name="description" content="Validate the functionality of fields and UI actions on a form." /><meta name="DC.subject" content=", Automated Test Framework, open new form, open existing form, set value, assert value, field validation, UI visibility, click modal, click UI action, close form" /><meta name="keywords" content=", Automated Test Framework, open new form, open existing form, set value, assert value, field validation, UI visibility, click modal, click UI action, close form" /><meta name="DC.creator" content="ServiceNow" /><meta name="DC.date.created" content="2023-08-03" /><meta name="DC.date.modified" content="2023-08-03" /><meta name="page-type" content="platform" /><meta name="DC.format" content="XHTML" /><meta name="DC.identifier" content="test-steps-form-category" /><link rel="stylesheet" type="text/css" href="../../../CSS/commonltr.css" /><title>Form category</title></head><body> <div class="nested0" id="test-steps-form-category"> <h1 class="title topictitle1" id="ariaid-title1">Form category</h1> <div class="body refbody"><p class="shortdesc"><span class="ph">Validate the functionality of fields and UI actions on a form.</span></p> <div class="section" id="test-steps-form-category__section_s5b_gvs_cjb"> <div class="note"><span class="notetitle">Note:</span> Test steps that include the <span class="ph uicontrol">Form UI</span> field give you the option to select an available UI. For any available workspace, navigation between tabs is not supported. Use the <span class="ph uicontrol">Open a New Form</span> or <span class="ph uicontrol">Open an Existing Record</span> step to reopen a form.</div> </div> </div> <div class="topic reference nested1" id="atf-open-form"> <h2 class="title topictitle2" id="ariaid-title2">Open a New Form</h2> <div class="body refbody"><p class="shortdesc"><span class="ph" id="kk4_zgz_rw">Open a form to a new record in the specified table and <span class="ph uicontrol">Form UI</span>.</span></p> <div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" class="table" frame="border" border="1" rules="all"><caption><span class="tablecap"><span class="table--title-label">Table 1. </span>Inputs</span></caption><colgroup><col /><col /></colgroup><thead class="thead" style="text-align:left;"><tr class="row"><th class="entry cellrowborder" style="vertical-align:top;" id="d489590e121">Field</th><th class="entry cellrowborder" style="vertical-align:top;" id="d489590e124">Description</th></tr></thead><tbody class="tbody"><tr class="row"><td class="entry cellrowborder" style="vertical-align:top;" headers="d489590e121 ">Execution order</td><td class="entry cellrowborder" id="atf-open-form__atf-exec-order" style="vertical-align:top;" headers="d489590e124 ">Integer specifying the order in which the test executes this step.<p class="p">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 <span class="ph uicontrol">Execution order</span> values.</p> </td></tr><tr class="row"><td class="entry cellrowborder" style="vertical-align:top;" headers="d489590e121 ">Active</td><td class="entry cellrowborder" id="atf-open-form__atf-active" style="vertical-align:top;" headers="d489590e124 ">Option to activate this test step for use.</td></tr><tr class="row"><td class="entry cellrowborder" style="vertical-align:top;" headers="d489590e121 ">Application</td><td class="entry cellrowborder" id="atf-open-form__atf-application-scope" style="vertical-align:top;" headers="d489590e124 ">Application scope in which the system runs this step.</td></tr><tr class="row"><td class="entry cellrowborder" style="vertical-align:top;" headers="d489590e121 ">Test</td><td class="entry cellrowborder" id="atf-open-form__atf-test" style="vertical-align:top;" headers="d489590e124 ">Read-only name of the test that you're adding the step to.</td></tr><tr class="row"><td class="entry cellrowborder" style="vertical-align:top;" headers="d489590e121 ">Step config</td><td class="entry cellrowborder" id="atf-open-form__atf-step-config" style="vertical-align:top;" headers="d489590e124 ">Read-only name of the step.</td></tr><tr class="row"><td class="entry cellrowborder" style="vertical-align:top;" headers="d489590e121 ">Description</td><td class="entry cellrowborder" id="atf-open-form__atf-description" style="vertical-align:top;" headers="d489590e124 ">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.</td></tr><tr class="row"><td class="entry cellrowborder" style="vertical-align:top;" headers="d489590e121 ">Notes</td><td class="entry cellrowborder" id="atf-open-form__atf-notes" style="vertical-align:top;" headers="d489590e124 ">Notes about the test step.</td></tr><tr class="row"><td class="entry cellrowborder" style="vertical-align:top;" headers="d489590e121 ">Form UI</td><td class="entry cellrowborder" id="atf-open-form__atf-form-ui" style="vertical-align:top;" headers="d489590e124 ">Option to select an available UI.<div class="note"><span class="notetitle">Note:</span> Workspaces are not supported in Internet Explorer (IE). See <a class="xref" href="https://support.servicenow.com/kb_view.do?sysparm_article=KB0683275" target="_blank" rel="noopener noreferrer">KB0683275</a> for more details.</div> </td></tr><tr class="row"><td class="entry cellrowborder" style="vertical-align:top;" headers="d489590e121 ">Table</td><td class="entry cellrowborder" id="atf-open-form__atf-table" style="vertical-align:top;" headers="d489590e124 ">Name of the table for the new form.</td></tr><tr class="row"><td class="entry cellrowborder" style="vertical-align:top;" headers="d489590e121 ">View</td><td class="entry cellrowborder" id="atf-open-form__atf-view-form-ui" style="vertical-align:top;" headers="d489590e124 ">Name of the view in which you want this form to open. The testing user must have access to that view. If the name is not a valid form view, the form opens in its default view.<div class="note"><span class="notetitle">Note:</span> This field appears when <span class="ph uicontrol">Standard UI</span> is chosen from <span class="ph uicontrol">Form UI</span>.</div> </td></tr></tbody></table> </div> </div> </div> <div class="topic reference nested1" id="atf-open-existing-record"> <h2 class="title topictitle2" id="ariaid-title3">Open an Existing Record</h2> <div class="body refbody"><p class="shortdesc"><span class="ph" id="j4k_jhz_rw">Open a form to an existing record in the specified table and <span class="ph uicontrol">Form UI</span>.</span></p> <div class="section" id="atf-open-existing-record__section_ksm_l4t_mjb"> <div class="note"><span class="notetitle">Note:</span> Using an existing record may cause unexpected behavior for this test. See <a class="xref" href="../concept/automated-test-framework-design-considerations.html" title="Create reliable, scalable, and efficient tests by following these design considerations.">Automated Test Framework design considerations</a> for more information.</div> </div> <div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" class="table" frame="border" border="1" rules="all"><caption><span class="tablecap"><span class="table--title-label">Table 2. </span>Inputs</span></caption><colgroup><col /><col /></colgroup><thead class="thead" style="text-align:left;"><tr class="row"><th class="entry cellrowborder" style="vertical-align:top;" id="d489590e320">Field</th><th class="entry cellrowborder" style="vertical-align:top;" id="d489590e323">Description</th></tr></thead><tbody class="tbody"><tr class="row"><td class="entry cellrowborder" style="vertical-align:top;" headers="d489590e320 ">Execution order</td><td class="entry cellrowborder" id="atf-open-existing-record__atf-exec-order" style="vertical-align:top;" headers="d489590e323 ">Integer specifying the order in which the test executes this step.<p class="p">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 <span class="ph uicontrol">Execution order</span> values.</p> </td></tr><tr class="row"><td class="entry cellrowborder" style="vertical-align:top;" headers="d489590e320 ">Active</td><td class="entry cellrowborder" id="atf-open-existing-record__atf-active" style="vertical-align:top;" headers="d489590e323 ">Option to activate this test step for use.</td></tr><tr class="row"><td class="entry cellrowborder" style="vertical-align:top;" headers="d489590e320 ">Application</td><td class="entry cellrowborder" id="atf-open-existing-record__atf-application-scope" style="vertical-align:top;" headers="d489590e323 ">Application scope in which the system runs this step.</td></tr><tr class="row"><td class="entry cellrowborder" style="vertical-align:top;" headers="d489590e320 ">Test</td><td class="entry cellrowborder" id="atf-open-existing-record__atf-test" style="vertical-align:top;" headers="d489590e323 ">Read-only name of the test that you're adding the step to.</td></tr><tr class="row"><td class="entry cellrowborder" style="vertical-align:top;" headers="d489590e320 ">Step config</td><td class="entry cellrowborder" id="atf-open-existing-record__atf-step-config" style="vertical-align:top;" headers="d489590e323 ">Read-only name of the step.</td></tr><tr class="row"><td class="entry cellrowborder" style="vertical-align:top;" headers="d489590e320 ">Description</td><td class="entry cellrowborder" id="atf-open-existing-record__atf-description" style="vertical-align:top;" headers="d489590e323 ">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.</td></tr><tr class="row"><td class="entry cellrowborder" style="vertical-align:top;" headers="d489590e320 ">Notes</td><td class="entry cellrowborder" id="atf-open-existing-record__atf-notes" style="vertical-align:top;" headers="d489590e323 ">Notes about the test step.</td></tr><tr class="row"><td class="entry cellrowborder" style="vertical-align:top;" headers="d489590e320 ">Form UI</td><td class="entry cellrowborder" id="atf-open-existing-record__atf-form-ui" style="vertical-align:top;" headers="d489590e323 ">Option to select an available UI.<div class="note"><span class="notetitle">Note:</span> Workspaces are not supported in Internet Explorer (IE). See <a class="xref" href="https://support.servicenow.com/kb_view.do?sysparm_article=KB0683275" target="_blank" rel="noopener noreferrer">KB0683275</a> for more details.</div> </td></tr><tr class="row"><td class="entry cellrowborder" style="vertical-align:top;" headers="d489590e320 ">Table</td><td class="entry cellrowborder" id="atf-open-existing-record__atf-open-record-table" style="vertical-align:top;" headers="d489590e323 ">Name of the table for the record you want to open.</td></tr><tr class="row"><td class="entry cellrowborder" style="vertical-align:top;" headers="d489590e320 ">Record</td><td class="entry cellrowborder" id="atf-open-existing-record__atf-record" style="vertical-align:top;" headers="d489590e323 ">Record ID of the record that you want to open and name of the document that you want to open.</td></tr><tr class="row"><td class="entry cellrowborder" style="vertical-align:top;" headers="d489590e320 ">View</td><td class="entry cellrowborder" id="atf-open-existing-record__atf-view-form-ui" style="vertical-align:top;" headers="d489590e323 ">Name of the view in which you want this form to open. The testing user must have access to that view. If the name is not a valid form view, the form opens in its default view.<div class="note"><span class="notetitle">Note:</span> This field appears when <span class="ph uicontrol">Standard UI</span> is chosen from <span class="ph uicontrol">Form UI</span>.</div> </td></tr></tbody></table> </div> </div> </div> <div class="topic reference nested1" id="atf-set-value"> <h2 class="title topictitle2" id="ariaid-title4">Set Field Values</h2> <div class="body refbody"><p class="shortdesc"><span class="ph" id="jqf_zhz_rw">Set the fields on the current form to the specified values.</span></p> <div class="section"> <span class="ph" id="atf-set-value__xgt_kf2_sw">To run this step, your test must have already opened a form using either the <span class="ph uicontrol">Open a New Form</span> or <span class="ph uicontrol">Open an Existing Record</span> step. It is recommended to not run this step directly after a <span class="ph uicontrol">Submit a Form</span> or <span class="ph uicontrol">Click a UI Action</span> step. This is because they can redirect your test to a different page based on the navigation stack configuration on your instance or the script defined in the clicked UI action. Unless you are certain that the UI action will take you to a specific page, you should explicitly use an <span class="ph uicontrol">Open a New Form</span> step after <span class="ph uicontrol">Submit a Form</span> or <span class="ph uicontrol">Click a UI Action</span> to ensure that the test is on the form as expected. Ensure that the test keeps passing consistently when added to a suite.</span> <p class="p"><span class="ph" id="atf-set-value__cs5_qd3_tw">The <span class="ph uicontrol">Field Values Validation</span>, <span class="ph uicontrol">Set Field Values</span>, <span class="ph uicontrol">Field State Validation</span>, and <span class="ph uicontrol">UI Action Visibility</span> steps can appear in any order.</span></p> <div class="p"><div class="note"><span class="notetitle">Note:</span> This step waits for the form to load before setting field values.</div> <div class="note"><span class="notetitle">Note:</span> This step doesn't support reference qualifiers, neither at test design time nor at test runtime.</div> <div class="note"><span class="notetitle">Note:</span> A modal form appears either on top of another form or a list. To submit a modal form after setting the field values, your test must have already opened it on top of a form or a list.<img class="image" id="atf-set-value__image_cc3_m21_wmb" src="../image/atf-modal-form.png" alt="Image showing modal form" /></div> </div> <div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" id="atf-set-value__ay3_43z_rw" class="table" frame="border" border="1" rules="all"><caption><span class="tablecap"><span class="table--title-label">Table 3. </span>Inputs</span></caption><colgroup><col /><col /></colgroup><thead class="thead" style="text-align:left;"><tr class="row"><th class="entry cellrowborder" style="vertical-align:top;" id="d489590e570">Field</th><th class="entry cellrowborder" style="vertical-align:top;" id="d489590e573">Description</th></tr></thead><tbody class="tbody"><tr class="row"><td class="entry cellrowborder" style="vertical-align:top;" headers="d489590e570 ">Execution order</td><td class="entry cellrowborder" id="atf-set-value__atf-exec-order" style="vertical-align:top;" headers="d489590e573 ">Integer specifying the order in which the test executes this step.<p class="p">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 <span class="ph uicontrol">Execution order</span> values.</p> </td></tr><tr class="row"><td class="entry cellrowborder" style="vertical-align:top;" headers="d489590e570 ">Active</td><td class="entry cellrowborder" id="atf-set-value__atf-active" style="vertical-align:top;" headers="d489590e573 ">Option to activate this test step for use.</td></tr><tr class="row"><td class="entry cellrowborder" style="vertical-align:top;" headers="d489590e570 ">Application</td><td class="entry cellrowborder" id="atf-set-value__application-scope-suite" style="vertical-align:top;" headers="d489590e573 ">The application scope in which the system runs this test or test suite.</td></tr><tr class="row"><td class="entry cellrowborder" style="vertical-align:top;" headers="d489590e570 ">Test</td><td class="entry cellrowborder" id="atf-set-value__atf-test" style="vertical-align:top;" headers="d489590e573 ">Read-only name of the test that you're adding the step to.</td></tr><tr class="row"><td class="entry cellrowborder" style="vertical-align:top;" headers="d489590e570 ">Step config</td><td class="entry cellrowborder" id="atf-set-value__atf-step-config" style="vertical-align:top;" headers="d489590e573 ">Read-only name of the step.</td></tr><tr class="row"><td class="entry cellrowborder" style="vertical-align:top;" headers="d489590e570 ">Description</td><td class="entry cellrowborder" id="atf-set-value__atf-description" style="vertical-align:top;" headers="d489590e573 ">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.</td></tr><tr class="row"><td class="entry cellrowborder" style="vertical-align:top;" headers="d489590e570 ">Notes</td><td class="entry cellrowborder" id="atf-set-value__atf-notes-condition-builder" style="vertical-align:top;" headers="d489590e573 ">Notes about the test step.<div class="note"><span class="notetitle">Note:</span> 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 <span class="ph uicontrol">Lookup record</span> control.</div> </td></tr><tr class="row"><td class="entry cellrowborder" style="vertical-align:top;" headers="d489590e570 ">Form UI</td><td class="entry cellrowborder" id="atf-set-value__atf-form-ui" style="vertical-align:top;" headers="d489590e573 ">Option to select an available UI.<div class="note"><span class="notetitle">Note:</span> Workspaces are not supported in Internet Explorer (IE). See <a class="xref" href="https://support.servicenow.com/kb_view.do?sysparm_article=KB0683275" target="_blank" rel="noopener noreferrer">KB0683275</a> for more details.</div> </td></tr><tr class="row"><td class="entry cellrowborder" style="vertical-align:top;" headers="d489590e570 ">Table</td><td class="entry cellrowborder" id="atf-set-value__atf-field-values-table" style="vertical-align:top;" headers="d489590e573 ">Table that contains the field whose value you want to set.</td></tr><tr class="row"><td class="entry cellrowborder" style="vertical-align:top;" headers="d489590e570 ">Set field value</td><td class="entry cellrowborder" id="atf-set-value__atf-set-field-value" style="vertical-align:top;" headers="d489590e573 ">Assigns a value to a field on an open form.</td></tr></tbody></table> </div> </div> </div> </div> <div class="topic reference nested1" id="atf-assert-value"> <h2 class="title topictitle2" id="ariaid-title5">Field Values Validation</h2> <div class="body refbody"><p class="shortdesc"><span class="ph" id="h2l_tjz_rw">Validate field values on the current form.</span></p> <div class="section"> <span class="ph" id="atf-assert-value__t41_tf2_sw">To run this step, your test must have already opened a form using either the <span class="ph uicontrol">Open a New Form</span> or <span class="ph uicontrol">Open an Existing Record</span> step. It is recommended to not run this step directly after a <span class="ph uicontrol">Submit a Form</span> or <span class="ph uicontrol">Click a UI Action</span> step. This is because they can redirect your test to a different page based on the navigation stack configuration on your instance or the script defined in the clicked UI action. Unless you are certain that the UI action will take you to a specific page, you should explicitly use an <span class="ph uicontrol">Open a New Form</span> step after <span class="ph uicontrol">Submit a Form</span> or <span class="ph uicontrol">Click a UI Action</span> to ensure that the test is on the form as expected. Ensure that the test keeps passing consistently when added to a suite.</span> <p class="p"><span class="ph" id="atf-assert-value__bjb_tn3_tw">The <span class="ph uicontrol">Field Values Validation</span>, <span class="ph uicontrol">Set Field Values</span>, <span class="ph uicontrol">Field State Validation</span>, and <span class="ph uicontrol">UI Action Visibility</span> steps can appear in any order.</span></p> <div class="p"><span class="ph" id="atf-assert-value__blz_ckz_rw">For the <span class="ph uicontrol">Field Values Validation</span> step, specify the values that you want to test using the standard conditions builder. You can test several conditions against the same field. This step passes if the overall condition is satisfied and fails if the condition is not satisfied. The <span class="ph uicontrol">Conditions</span> field is case-sensitive and requires to have the exact value as on the form. To test the values of individual fields independently of each other, include a separate <span class="ph uicontrol">Field Values Validation</span> step for each value that you test.</span> <div class="note"><span class="notetitle">Note:</span> The <span class="ph uicontrol">Field Values Validation</span> step works only with fields that belong to the record for the open form. For example, with the incident table, this step is not able to validate the <span class="ph uicontrol">Additional comments</span>, <span class="ph uicontrol">Approval history</span>, <span class="ph uicontrol">Comments</span>, or <span class="ph uicontrol">Work notes</span> fields because these UI controls are not actual fields on the incident record. These UI controls make it convenient to work with related tables. To validate these cases, use the Server test step, <span class="ph uicontrol">Record Validation</span>, instead.</div> </div> <div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" id="atf-assert-value__dt4_kjz_rw" class="table" frame="border" border="1" rules="all"><caption><span class="tablecap"><span class="table--title-label">Table 4. </span>Inputs</span></caption><colgroup><col /><col /></colgroup><thead class="thead" style="text-align:left;"><tr class="row"><th class="entry cellrowborder" style="vertical-align:top;" id="d489590e828">Field</th><th class="entry cellrowborder" style="vertical-align:top;" id="d489590e831">Description</th></tr></thead><tbody class="tbody"><tr class="row"><td class="entry cellrowborder" style="vertical-align:top;" headers="d489590e828 ">Execution order</td><td class="entry cellrowborder" id="atf-assert-value__atf-exec-order" style="vertical-align:top;" headers="d489590e831 ">Integer specifying the order in which the test executes this step.<p class="p">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 <span class="ph uicontrol">Execution order</span> values.</p> </td></tr><tr class="row"><td class="entry cellrowborder" style="vertical-align:top;" headers="d489590e828 ">Active</td><td class="entry cellrowborder" id="atf-assert-value__atf-active" style="vertical-align:top;" headers="d489590e831 ">Option to activate this test step for use.</td></tr><tr class="row"><td class="entry cellrowborder" style="vertical-align:top;" headers="d489590e828 ">Timeout</td><td class="entry cellrowborder" id="atf-assert-value__atf-timeout" style="vertical-align:top;" headers="d489590e831 ">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.</td></tr><tr class="row"><td class="entry cellrowborder" style="vertical-align:top;" headers="d489590e828 ">Application</td><td class="entry cellrowborder" id="atf-assert-value__atf-application-scope" style="vertical-align:top;" headers="d489590e831 ">Application scope in which the system runs this step.</td></tr><tr class="row"><td class="entry cellrowborder" style="vertical-align:top;" headers="d489590e828 ">Test</td><td class="entry cellrowborder" id="atf-assert-value__atf-test" style="vertical-align:top;" headers="d489590e831 ">Read-only name of the test that you're adding the step to.</td></tr><tr class="row"><td class="entry cellrowborder" style="vertical-align:top;" headers="d489590e828 ">Step config</td><td class="entry cellrowborder" id="atf-assert-value__atf-step-config" style="vertical-align:top;" headers="d489590e831 ">Read-only name of the step.</td></tr><tr class="row"><td class="entry cellrowborder" style="vertical-align:top;" headers="d489590e828 ">Description</td><td class="entry cellrowborder" id="atf-assert-value__atf-description" style="vertical-align:top;" headers="d489590e831 ">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.</td></tr><tr class="row"><td class="entry cellrowborder" style="vertical-align:top;" headers="d489590e828 ">Notes</td><td class="entry cellrowborder" id="atf-assert-value__atf-notes-condition-builder" style="vertical-align:top;" headers="d489590e831 ">Notes about the test step.<div class="note"><span class="notetitle">Note:</span> 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 <span class="ph uicontrol">Lookup record</span> control.</div> </td></tr><tr class="row"><td class="entry cellrowborder" style="vertical-align:top;" headers="d489590e828 ">Form UI</td><td class="entry cellrowborder" id="atf-assert-value__atf-form-ui" style="vertical-align:top;" headers="d489590e831 ">Option to select an available UI.<div class="note"><span class="notetitle">Note:</span> Workspaces are not supported in Internet Explorer (IE). See <a class="xref" href="https://support.servicenow.com/kb_view.do?sysparm_article=KB0683275" target="_blank" rel="noopener noreferrer">KB0683275</a> for more details.</div> </td></tr><tr class="row"><td class="entry cellrowborder" style="vertical-align:top;" headers="d489590e828 ">Table</td><td class="entry cellrowborder" id="atf-assert-value__atf-field-validation-table" style="vertical-align:top;" headers="d489590e831 ">Table that contains the fields whose values you want to validate.</td></tr><tr class="row"><td class="entry cellrowborder" style="vertical-align:top;" headers="d489590e828 ">Conditions</td><td class="entry cellrowborder" id="atf-assert-value__atf-conditions" style="vertical-align:top;" headers="d489590e831 ">Fields and values to be validated. Includes only fields that are visible on the open form. This field is case-sensitive.</td></tr></tbody></table> </div> </div> </div> </div> <div class="topic reference nested1" id="atf-field-validation"> <h2 class="title topictitle2" id="ariaid-title6">Field State Validation</h2> <div class="body refbody"><p class="shortdesc"><span class="ph" id="n35_4mz_rw">Validate the state of specified fields. States validated can include mandatory, non-mandatory, read-only, non-read-only, visible, and non-visible.</span></p> <div class="section"> <span class="ph" id="atf-field-validation__ytt_nmz_rw">You can specify a maximum time to wait for the states of the fields to match the conditions in this step.</span> <div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" id="atf-field-validation__ls3_2lz_rw" class="table" frame="border" border="1" rules="all"><caption><span class="tablecap"><span class="table--title-label">Table 5. </span>Inputs</span></caption><colgroup><col /><col /></colgroup><thead class="thead" style="text-align:left;"><tr class="row"><th class="entry cellrowborder" style="vertical-align:top;" id="d489590e1023">Field</th><th class="entry cellrowborder" style="vertical-align:top;" id="d489590e1026">Description</th></tr></thead><tbody class="tbody"><tr class="row"><td class="entry cellrowborder" style="vertical-align:top;" headers="d489590e1023 ">Execution order</td><td class="entry cellrowborder" id="atf-field-validation__atf-exec-order" style="vertical-align:top;" headers="d489590e1026 ">Integer specifying the order in which the test executes this step.<p class="p">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 <span class="ph uicontrol">Execution order</span> values.</p> </td></tr><tr class="row"><td class="entry cellrowborder" style="vertical-align:top;" headers="d489590e1023 ">Active</td><td class="entry cellrowborder" id="atf-field-validation__atf-active" style="vertical-align:top;" headers="d489590e1026 ">Option to activate this test step for use.</td></tr><tr class="row"><td class="entry cellrowborder" style="vertical-align:top;" headers="d489590e1023 ">Timeout</td><td class="entry cellrowborder" id="atf-field-validation__atf-timeout" style="vertical-align:top;" headers="d489590e1026 ">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.</td></tr><tr class="row"><td class="entry cellrowborder" style="vertical-align:top;" headers="d489590e1023 ">Application</td><td class="entry cellrowborder" id="atf-field-validation__atf-application-scope" style="vertical-align:top;" headers="d489590e1026 ">Application scope in which the system runs this step.</td></tr><tr class="row"><td class="entry cellrowborder" style="vertical-align:top;" headers="d489590e1023 ">Test</td><td class="entry cellrowborder" id="atf-field-validation__atf-test" style="vertical-align:top;" headers="d489590e1026 ">Read-only name of the test that you're adding the step to.</td></tr><tr class="row"><td class="entry cellrowborder" style="vertical-align:top;" headers="d489590e1023 ">Step config</td><td class="entry cellrowborder" id="atf-field-validation__atf-step-config" style="vertical-align:top;" headers="d489590e1026 ">Read-only name of the step.</td></tr><tr class="row"><td class="entry cellrowborder" style="vertical-align:top;" headers="d489590e1023 ">Description</td><td class="entry cellrowborder" id="atf-field-validation__atf-description" style="vertical-align:top;" headers="d489590e1026 ">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.</td></tr><tr class="row"><td class="entry cellrowborder" style="vertical-align:top;" headers="d489590e1023 ">Notes</td><td class="entry cellrowborder" id="atf-field-validation__atf-notes" style="vertical-align:top;" headers="d489590e1026 ">Notes about the test step.</td></tr><tr class="row"><td class="entry cellrowborder" style="vertical-align:top;" headers="d489590e1023 ">Form UI</td><td class="entry cellrowborder" id="atf-field-validation__atf-form-ui" style="vertical-align:top;" headers="d489590e1026 ">Option to select an available UI.<div class="note"><span class="notetitle">Note:</span> Workspaces are not supported in Internet Explorer (IE). See <a class="xref" href="https://support.servicenow.com/kb_view.do?sysparm_article=KB0683275" target="_blank" rel="noopener noreferrer">KB0683275</a> for more details.</div> </td></tr><tr class="row"><td class="entry cellrowborder" style="vertical-align:top;" headers="d489590e1023 ">Table</td><td class="entry cellrowborder" id="atf-field-validation__atf-table-field-state-validation" style="vertical-align:top;" headers="d489590e1026 ">Table that contains the fields whose states you want to validate.</td></tr><tr class="row"><td class="entry cellrowborder" style="vertical-align:top;" headers="d489590e1023 ">Visible</td><td class="entry cellrowborder" id="atf-field-validation__atf-table-field-state-validation-visible" style="vertical-align:top;" headers="d489590e1026 ">Validates whether the fields on this form are visible. The test fails if the fields are not visible.</td></tr><tr class="row"><td class="entry cellrowborder" style="vertical-align:top;" headers="d489590e1023 ">Not visible</td><td class="entry cellrowborder" id="atf-field-validation__atf-table-field-state-validation-not-visible" style="vertical-align:top;" headers="d489590e1026 ">Validates whether the fields on this form are visible. The test fails if the fields are visible.</td></tr><tr class="row"><td class="entry cellrowborder" style="vertical-align:top;" headers="d489590e1023 ">Read only</td><td class="entry cellrowborder" id="atf-field-validation__atf-table-field-state-validation-read-only" style="vertical-align:top;" headers="d489590e1026 ">Validates whether the fields on this form are read only. The test fails if the fields are not read only.</td></tr><tr class="row"><td class="entry cellrowborder" style="vertical-align:top;" headers="d489590e1023 ">Not read only</td><td class="entry cellrowborder" id="atf-field-validation__atf-table-field-state-validation-not-read-only" style="vertical-align:top;" headers="d489590e1026 ">Validates whether the fields on this form are read only. The test fails if the fields are read only.</td></tr><tr class="row"><td class="entry cellrowborder" style="vertical-align:top;" headers="d489590e1023 ">Mandatory</td><td class="entry cellrowborder" id="atf-field-validation__atf-table-field-state-validation-mandatory" style="vertical-align:top;" headers="d489590e1026 ">Validates whether the fields on this form are mandatory. The test fails if the fields are not mandatory.</td></tr><tr class="row"><td class="entry cellrowborder" style="vertical-align:top;" headers="d489590e1023 ">Not Mandatory</td><td class="entry cellrowborder" id="atf-field-validation__atf-table-field-state-validation-not-mandatory" style="vertical-align:top;" headers="d489590e1026 ">Validates whether the fields on this form are mandatory. The test fails if the fields are mandatory.</td></tr></tbody></table> </div> </div> </div> </div> <div class="topic reference nested1" id="atf-ui-visible"> <h2 class="title topictitle2" id="ariaid-title7">UI Action Visibility</h2> <div class="body refbody"><p class="shortdesc"><span class="ph" id="cr2_1pz_rw">Verify if a UI action is visible on the current form. To run this step, your test must have already opened a form using either the <span class="ph uicontrol">Open a New Form</span> or <span class="ph uicontrol">Open an Existing Record</span> step</span>.</p> <div class="section"> The default visible UI actions vary depending on the user that you're currently impersonating. <div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" id="atf-ui-visible__ay3_43z_rw" class="table" frame="border" border="1" rules="all"><caption><span class="tablecap"><span class="table--title-label">Table 6. </span>Inputs</span></caption><colgroup><col /><col /></colgroup><thead class="thead" style="text-align:left;"><tr class="row"><th class="entry cellrowborder" style="vertical-align:top;" id="d489590e1262">Field</th><th class="entry cellrowborder" style="vertical-align:top;" id="d489590e1265">Description</th></tr></thead><tbody class="tbody"><tr class="row"><td class="entry cellrowborder" style="vertical-align:top;" headers="d489590e1262 ">Execution order</td><td class="entry cellrowborder" id="atf-ui-visible__atf-exec-order" style="vertical-align:top;" headers="d489590e1265 ">Integer specifying the order in which the test executes this step.<p class="p">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 <span class="ph uicontrol">Execution order</span> values.</p> </td></tr><tr class="row"><td class="entry cellrowborder" style="vertical-align:top;" headers="d489590e1262 ">Active</td><td class="entry cellrowborder" id="atf-ui-visible__atf-active" style="vertical-align:top;" headers="d489590e1265 ">Option to activate this test step for use.</td></tr><tr class="row"><td class="entry cellrowborder" style="vertical-align:top;" headers="d489590e1262 ">Timeout</td><td class="entry cellrowborder" id="atf-ui-visible__atf-timeout" style="vertical-align:top;" headers="d489590e1265 ">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.</td></tr><tr class="row"><td class="entry cellrowborder" style="vertical-align:top;" headers="d489590e1262 ">Application</td><td class="entry cellrowborder" id="atf-ui-visible__atf-application-scope" style="vertical-align:top;" headers="d489590e1265 ">Application scope in which the system runs this step.</td></tr><tr class="row"><td class="entry cellrowborder" style="vertical-align:top;" headers="d489590e1262 ">Test</td><td class="entry cellrowborder" id="atf-ui-visible__atf-test" style="vertical-align:top;" headers="d489590e1265 ">Read-only name of the test that you're adding the step to.</td></tr><tr class="row"><td class="entry cellrowborder" style="vertical-align:top;" headers="d489590e1262 ">Step config</td><td class="entry cellrowborder" id="atf-ui-visible__atf-step-config" style="vertical-align:top;" headers="d489590e1265 ">Read-only name of the step.</td></tr><tr class="row"><td class="entry cellrowborder" style="vertical-align:top;" headers="d489590e1262 ">Description</td><td class="entry cellrowborder" id="atf-ui-visible__atf-description" style="vertical-align:top;" headers="d489590e1265 ">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.</td></tr><tr class="row"><td class="entry cellrowborder" style="vertical-align:top;" headers="d489590e1262 ">Notes</td><td class="entry cellrowborder" id="atf-ui-visible__atf-notes" style="vertical-align:top;" headers="d489590e1265 ">Notes about the test step.</td></tr><tr class="row"><td class="entry cellrowborder" style="vertical-align:top;" headers="d489590e1262 ">Form UI</td><td class="entry cellrowborder" id="atf-ui-visible__atf-form-ui" style="vertical-align:top;" headers="d489590e1265 ">Option to select an available UI.<div class="note"><span class="notetitle">Note:</span> Workspaces are not supported in Internet Explorer (IE). See <a class="xref" href="https://support.servicenow.com/kb_view.do?sysparm_article=KB0683275" target="_blank" rel="noopener noreferrer">KB0683275</a> for more details.</div> </td></tr><tr class="row"><td class="entry cellrowborder" style="vertical-align:top;" headers="d489590e1262 ">Table</td><td class="entry cellrowborder" id="atf-ui-visible__atf-table-ui" style="vertical-align:top;" headers="d489590e1265 ">The table with the UI actions to be tested.</td></tr><tr class="row"><td class="entry cellrowborder" style="vertical-align:top;" headers="d489590e1262 ">Visible</td><td class="entry cellrowborder" id="atf-ui-visible__atf-visible-ui" style="vertical-align:top;" headers="d489590e1265 ">Validates whether UI actions on this form are visible. The test fails if the UI actions are not visible.</td></tr><tr class="row"><td class="entry cellrowborder" style="vertical-align:top;" headers="d489590e1262 ">Not Visible</td><td class="entry cellrowborder" id="atf-ui-visible__atf-not-visible-ui" style="vertical-align:top;" headers="d489590e1265 ">Validates whether UI actions on this form are visible. The test fails if the UI actions are visible.</td></tr></tbody></table> </div> </div> </div> </div> <div class="topic reference nested1" id="atf-add-attachments-form"> <h2 class="title topictitle2" id="ariaid-title8">Add Attachments to Form</h2> <div class="body refbody"><p class="shortdesc">Add one or more mandatory attachments to the current form. Select the attachments that the test step adds to the form from the Upload Attachments list.</p> <div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" id="atf-add-attachments-form__table_vgk_zs4_nhb" class="table" frame="border" border="1" rules="all"><caption><span class="tablecap"><span class="table--title-label">Table 7. </span>Inputs</span></caption><colgroup><col /><col /></colgroup><thead class="thead" style="text-align:left;"><tr class="row"><th class="entry cellrowborder" style="vertical-align:top;" id="d489590e1449">Field</th><th class="entry cellrowborder" style="vertical-align:top;" id="d489590e1454">Description</th></tr></thead><tbody class="tbody"><tr class="row"><td class="entry cellrowborder" style="vertical-align:top;" headers="d489590e1449 ">Execution order</td><td class="entry cellrowborder" style="vertical-align:top;" headers="d489590e1454 ">Integer specifying the order in which the test executes this step.<p class="p">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. You can change this default order by editing the <span class="ph uicontrol">Execution order</span> values.</p> </td></tr><tr class="row"><td class="entry cellrowborder" style="vertical-align:top;" headers="d489590e1449 ">Application</td><td class="entry cellrowborder" style="vertical-align:top;" headers="d489590e1454 ">Application scope in which the system runs this step.</td></tr><tr class="row"><td class="entry cellrowborder" style="vertical-align:top;" headers="d489590e1449 ">Active</td><td class="entry cellrowborder" style="vertical-align:top;" headers="d489590e1454 ">Option to activate this test step for use.</td></tr><tr class="row"><td class="entry cellrowborder" style="vertical-align:top;" headers="d489590e1449 ">Test</td><td class="entry cellrowborder" style="vertical-align:top;" headers="d489590e1454 ">Name of the test that you're adding the step to.</td></tr><tr class="row"><td class="entry cellrowborder" style="vertical-align:top;" headers="d489590e1449 ">Step config</td><td class="entry cellrowborder" style="vertical-align:top;" headers="d489590e1454 ">Name of the step.</td></tr><tr class="row"><td class="entry cellrowborder" style="vertical-align:top;" headers="d489590e1449 ">Notes</td><td class="entry cellrowborder" style="vertical-align:top;" headers="d489590e1454 ">Notes about the test step.</td></tr><tr class="row"><td class="entry cellrowborder" style="vertical-align:top;" headers="d489590e1449 ">Upload Attachments</td><td class="entry cellrowborder" style="vertical-align:top;" headers="d489590e1454 ">Button to add one or more mandatory attachments to the form.</td></tr></tbody></table> </div> </div> </div> <div class="topic reference nested1" id="atf-click-modal"> <h2 class="title topictitle2" id="ariaid-title9">Click Modal Button</h2> <div class="body refbody"><p class="shortdesc"><span class="ph" id="h2b_tl3_tw">Click a button within a modal in the specified <span class="ph uicontrol">Form UI</span>.</span></p> <div class="section" id="atf-click-modal__pqn_cn3_tw">Specify your testing by selecting either the standard platform UI or workspace UI from the <span class="ph uicontrol">Form UI</span> field. If you select the standard platform UI, this test step selects the button by ID on the specified modal and validates the following conditions:<ul class="ul" id="atf-click-modal__ul_qmf_wxj_2jb"><li class="li">UI page was opened in a modal.</li><li class="li">Button is visible and enabled.</li></ul> <p class="p">If you select an available workspace UI, this test step selects either the Confirm or Cancel action and optionally sets the field values within the modal. This step succeeds only if a modal dialog is open on the form, and if the specified button exists on that modal dialog.</p> <div class="p">Only modals opened with the following g_modal functions are supported: <ul class="ul" id="atf-click-modal__ul_xzs_vgk_2jb"><li class="li">alert</li><li class="li">confirm</li><li class="li">confirmDestroy</li><li class="li">showFields</li></ul> </div> <div class="note"><span class="notetitle">Note:</span> Click Modal Button now supports global and scoped application modals.</div> </div> <div class="section"> <div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" id="atf-click-modal__ay3_43z_rw" class="table" frame="border" border="1" rules="all"><caption><span class="tablecap"><span class="table--title-label">Table 8. </span>Inputs</span></caption><colgroup><col /><col /></colgroup><thead class="thead" style="text-align:left;"><tr class="row"><th class="entry cellrowborder" style="vertical-align:top;" id="d489590e1636">Field</th><th class="entry cellrowborder" style="vertical-align:top;" id="d489590e1639">Description</th></tr></thead><tbody class="tbody"><tr class="row"><td class="entry cellrowborder" style="vertical-align:top;" headers="d489590e1636 ">Execution order</td><td class="entry cellrowborder" id="atf-click-modal__atf-exec-order" style="vertical-align:top;" headers="d489590e1639 ">Integer specifying the order in which the test executes this step.<p class="p">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 <span class="ph uicontrol">Execution order</span> values.</p> </td></tr><tr class="row"><td class="entry cellrowborder" style="vertical-align:top;" headers="d489590e1636 ">Active</td><td class="entry cellrowborder" id="atf-click-modal__atf-active" style="vertical-align:top;" headers="d489590e1639 ">Option to activate this test step for use.</td></tr><tr class="row"><td class="entry cellrowborder" style="vertical-align:top;" headers="d489590e1636 ">Timeout</td><td class="entry cellrowborder" id="atf-click-modal__atf-timeout-click-modal-form-ui" style="vertical-align:top;" headers="d489590e1639 ">Number of seconds for the modal and the button to appear.</td></tr><tr class="row"><td class="entry cellrowborder" style="vertical-align:top;" headers="d489590e1636 ">Application</td><td class="entry cellrowborder" id="atf-click-modal__atf-application-scope" style="vertical-align:top;" headers="d489590e1639 ">Application scope in which the system runs this step.</td></tr><tr class="row"><td class="entry cellrowborder" style="vertical-align:top;" headers="d489590e1636 ">Test</td><td class="entry cellrowborder" id="atf-click-modal__atf-test" style="vertical-align:top;" headers="d489590e1639 ">Read-only name of the test that you're adding the step to.</td></tr><tr class="row"><td class="entry cellrowborder" style="vertical-align:top;" headers="d489590e1636 ">Step config</td><td class="entry cellrowborder" id="atf-click-modal__atf-step-config" style="vertical-align:top;" headers="d489590e1639 ">Read-only name of the step.</td></tr><tr class="row"><td class="entry cellrowborder" style="vertical-align:top;" headers="d489590e1636 ">Description</td><td class="entry cellrowborder" id="atf-click-modal__atf-description" style="vertical-align:top;" headers="d489590e1639 ">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.</td></tr><tr class="row"><td class="entry cellrowborder" style="vertical-align:top;" headers="d489590e1636 ">Notes</td><td class="entry cellrowborder" id="atf-click-modal__atf-notes" style="vertical-align:top;" headers="d489590e1639 ">Notes about the test step.</td></tr><tr class="row"><td class="entry cellrowborder" style="vertical-align:top;" headers="d489590e1636 ">Form UI</td><td class="entry cellrowborder" id="atf-click-modal__atf-form-ui" style="vertical-align:top;" headers="d489590e1639 ">Option to select an available UI.<div class="note"><span class="notetitle">Note:</span> Workspaces are not supported in Internet Explorer (IE). See <a class="xref" href="https://support.servicenow.com/kb_view.do?sysparm_article=KB0683275" target="_blank" rel="noopener noreferrer">KB0683275</a> for more details.</div> </td></tr><tr class="row"><td class="entry cellrowborder" style="vertical-align:top;" headers="d489590e1636 ">UI page</td><td class="entry cellrowborder" id="atf-click-modal__atf-ui-page-form-ui" style="vertical-align:top;" headers="d489590e1639 ">The UI modal dialog to be tested.<div class="note"><span class="notetitle">Note:</span> This field appears only if <span class="ph uicontrol">Standard UI</span> is selected from <span class="ph uicontrol">Form UI</span>.</div> </td></tr><tr class="row"><td class="entry cellrowborder" style="vertical-align:top;" headers="d489590e1636 ">Button</td><td class="entry cellrowborder" id="atf-click-modal__atf-ui-page-button-form-ui" style="vertical-align:top;" headers="d489590e1639 ">The ID attribute of the button element. For example, the <span class="ph uicontrol">OK</span>button has an ID of <samp class="ph systemoutput">OK_button</samp> in the UI modal dialog.<div class="note"><span class="notetitle">Note:</span> This field appears only if <span class="ph uicontrol">Standard UI</span> is selected from <span class="ph uicontrol">Form UI</span>.</div> </td></tr><tr class="row"><td class="entry cellrowborder" style="vertical-align:top;" headers="d489590e1636 ">Modal values</td><td class="entry cellrowborder" id="atf-click-modal__atf-modal-values-form-ui" style="vertical-align:top;" headers="d489590e1639 ">The field values to be set in the modal.<div class="note"><span class="notetitle">Note:</span> This field appears only if a workspace is chosen as <span class="ph uicontrol">Form UI</span>.</div> </td></tr><tr class="row"><td class="entry cellrowborder" style="vertical-align:top;" headers="d489590e1636 ">Modal action</td><td class="entry cellrowborder" id="atf-click-modal__atf-modal-action-form-ui" style="vertical-align:top;" headers="d489590e1639 ">The action to be selected in the modal.<div class="note"><span class="notetitle">Note:</span> This field appears only if a workspace is chosen as <span class="ph uicontrol">Form UI</span>.</div> </td></tr><tr class="row"><td class="entry cellrowborder" style="vertical-align:top;" headers="d489590e1636 ">Assert type</td><td class="entry cellrowborder" id="atf-click-modal__atf-ui-page-assert-type" style="vertical-align:top;" headers="d489590e1639 ">The effect on the tests on clicking the modal button.<ul class="ul"><li class="li"><span class="ph uicontrol">Modal closed and page is reloaded or redirected</span>: The test passes only if the modal was closed and the page was reloaded or redirected to another page.</li><li class="li"><span class="ph uicontrol">Modal closed and page is not reloaded or redirected</span>: The test passes only if the modal was closed and the page was not reloaded or redirected to another page.</li><li class="li"><span class="ph uicontrol">Modal not closed</span>: The test passes only if the modal still exists and was not closed.</li></ul> </td></tr><tr class="row"><td class="entry cellrowborder" style="vertical-align:top;" headers="d489590e1636 ">Assertion timeout</td><td class="entry cellrowborder" id="atf-click-modal__atf-ui-page-assert-timeout" style="vertical-align:top;" headers="d489590e1639 ">Number of seconds allowed before the assert fails. If the assert fails, the system repeats the assert until the duration of the Timeout is reached. If the validation fails after the Timeout duration has passed, the step fails.</td></tr></tbody></table> </div> </div> </div> </div> <div class="topic reference nested1" id="atf-click-ui-action"> <h2 class="title topictitle2" id="ariaid-title10">Click a UI Action</h2> <div class="body refbody"><p class="shortdesc"><span class="ph" id="skg_5qz_rw">Click a UI action on the current form.</span></p> <div class="section"> <span class="ph" id="atf-click-ui-action__djp_lb2_sw">When this step runs, the system performs the action normally activated by that control. The test step also validates that the current form contains the control and that the control is visible and enabled.</span> <span class="ph" id="atf-click-ui-action__yzc_lg2_sw">To run this step, your test must have already opened a form using either the <span class="ph uicontrol">Open a New Form</span> or <span class="ph uicontrol">Open an Existing Record</span> step. It is recommended to not run this step directly after a <span class="ph uicontrol">Submit a Form</span> or <span class="ph uicontrol">Click a UI Action</span> step. This is because they can redirect your test to a different page based on the navigation stack configuration on your instance or the script defined in the clicked UI action. Unless you are certain that the UI action will take you to a specific page, you should explicitly use an <span class="ph uicontrol">Open a New Form</span> step after <span class="ph uicontrol">Submit a Form</span> or <span class="ph uicontrol">Click a UI Action</span> to ensure that the test is on the form as expected. Ensure that the test keeps passing consistently when added to a suite.</span> <div class="p">In the <span class="ph" id="atf-click-ui-action__mc2_3ns_gx">Vancouver</span> release, this step supports UI actions of type Form context menu.<div class="note"><span class="notetitle">Note:</span> <span class="ph" id="atf-click-ui-action__s4y_wb5_gx">Don't write tests that depend on the system displaying a specific page after executing a <span class="ph uicontrol">Submit a Form</span> or <span class="ph uicontrol">Click a UI Action</span> step. After these test steps, the system returns to the page that was open before the form was opened. The test cannot determine what that page was, so writing a test that expects a particular page can lead to unpredictable results.</span></div> </div> <div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" id="atf-click-ui-action__ay3_43z_rw" class="table" frame="border" border="1" rules="all"><caption><span class="tablecap"><span class="table--title-label">Table 9. </span>Inputs</span></caption><colgroup><col /><col /></colgroup><thead class="thead" style="text-align:left;"><tr class="row"><th class="entry cellrowborder" style="vertical-align:top;" id="d489590e1955">Field</th><th class="entry cellrowborder" style="vertical-align:top;" id="d489590e1958">Description</th></tr></thead><tbody class="tbody"><tr class="row"><td class="entry cellrowborder" style="vertical-align:top;" headers="d489590e1955 ">Execution order</td><td class="entry cellrowborder" id="atf-click-ui-action__atf-exec-order" style="vertical-align:top;" headers="d489590e1958 ">Integer specifying the order in which the test executes this step.<p class="p">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 <span class="ph uicontrol">Execution order</span> values.</p> </td></tr><tr class="row"><td class="entry cellrowborder" style="vertical-align:top;" headers="d489590e1955 ">Active</td><td class="entry cellrowborder" id="atf-click-ui-action__atf-active" style="vertical-align:top;" headers="d489590e1958 ">Option to activate this test step for use.</td></tr><tr class="row"><td class="entry cellrowborder" style="vertical-align:top;" headers="d489590e1955 ">Application</td><td class="entry cellrowborder" id="atf-click-ui-action__atf-application-scope" style="vertical-align:top;" headers="d489590e1958 ">Application scope in which the system runs this step.</td></tr><tr class="row"><td class="entry cellrowborder" style="vertical-align:top;" headers="d489590e1955 ">Test</td><td class="entry cellrowborder" id="atf-click-ui-action__atf-test" style="vertical-align:top;" headers="d489590e1958 ">Read-only name of the test that you're adding the step to.</td></tr><tr class="row"><td class="entry cellrowborder" style="vertical-align:top;" headers="d489590e1955 ">Step config</td><td class="entry cellrowborder" id="atf-click-ui-action__atf-step-config" style="vertical-align:top;" headers="d489590e1958 ">Read-only name of the step.</td></tr><tr class="row"><td class="entry cellrowborder" style="vertical-align:top;" headers="d489590e1955 ">Description</td><td class="entry cellrowborder" id="atf-click-ui-action__atf-description" style="vertical-align:top;" headers="d489590e1958 ">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.</td></tr><tr class="row"><td class="entry cellrowborder" style="vertical-align:top;" headers="d489590e1955 ">Notes</td><td class="entry cellrowborder" id="atf-click-ui-action__atf-notes" style="vertical-align:top;" headers="d489590e1958 ">Notes about the test step.</td></tr><tr class="row"><td class="entry cellrowborder" style="vertical-align:top;" headers="d489590e1955 ">Form UI</td><td class="entry cellrowborder" id="atf-click-ui-action__atf-form-ui" style="vertical-align:top;" headers="d489590e1958 ">Option to select an available UI.<div class="note"><span class="notetitle">Note:</span> Workspaces are not supported in Internet Explorer (IE). See <a class="xref" href="https://support.servicenow.com/kb_view.do?sysparm_article=KB0683275" target="_blank" rel="noopener noreferrer">KB0683275</a> for more details.</div> </td></tr><tr class="row"><td class="entry cellrowborder" style="vertical-align:top;" headers="d489590e1955 ">Table</td><td class="entry cellrowborder" id="atf-click-ui-action__atf-table-ui-action" style="vertical-align:top;" headers="d489590e1958 ">The table containing the UI action to click.</td></tr><tr class="row"><td class="entry cellrowborder" style="vertical-align:top;" headers="d489590e1955 ">UI action</td><td class="entry cellrowborder" id="atf-click-ui-action__atf-ui-action" style="vertical-align:top;" headers="d489590e1958 ">The UI action to click.</td></tr><tr class="row"><td class="entry cellrowborder" style="vertical-align:top;" headers="d489590e1955 ">Assert type</td><td class="entry cellrowborder" id="atf-click-ui-action__atf-ui-action-assert-type" style="vertical-align:top;" headers="d489590e1958 ">The effect on the tests with clicking of a UI action.<ul class="ul"><li class="li"><span class="ph uicontrol">Form submission canceled in browser</span>: The step passes only if form submission is canceled.</li><li class="li"><span class="ph uicontrol">Form submitted to server</span>: The step passes only if the form is submitted.</li></ul> </td></tr></tbody></table> </div> <div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" id="atf-click-ui-action__d5b_d2p_tw" class="table" frame="border" border="1" rules="all"><caption><span class="tablecap"><span class="table--title-label">Table 10. </span>Outputs</span></caption><colgroup><col /><col /></colgroup><thead class="thead" style="text-align:left;"><tr class="row"><th class="entry cellrowborder" style="vertical-align:top;" id="d489590e2106">Field</th><th class="entry cellrowborder" style="vertical-align:top;" id="d489590e2109">Description</th></tr></thead><tbody class="tbody"><tr class="row"><td class="entry cellrowborder" style="vertical-align:top;" headers="d489590e2106 ">table</td><td class="entry cellrowborder" style="vertical-align:top;" headers="d489590e2109 ">The table for the form that contains this UI action.</td></tr><tr class="row"><td class="entry cellrowborder" style="vertical-align:top;" headers="d489590e2106 ">record</td><td class="entry cellrowborder" style="vertical-align:top;" headers="d489590e2109 ">The sys_id of the record on which the action was clicked.</td></tr></tbody></table> </div> </div> </div> </div> <div class="topic reference nested1" id="atf-close-form"> <h2 class="title topictitle2" id="ariaid-title11">Submit a Form</h2> <div class="body refbody"><p class="shortdesc"><span class="ph" id="pmf_gnz_rw">Submit the current form.</span></p> <div class="section"> <span class="ph" id="atf-close-form__uzr_zf2_sw">To run this step, your test must have already opened a form using either the <span class="ph uicontrol">Open a New Form</span> or <span class="ph uicontrol">Open an Existing Record</span> step. It is recommended to not run this step directly after a <span class="ph uicontrol">Submit a Form</span> or <span class="ph uicontrol">Click a UI Action</span> step. This is because they can redirect your test to a different page based on the navigation stack configuration on your instance or the script defined in the clicked UI action. Unless you are certain that the UI action will take you to a specific page, you should explicitly use an <span class="ph uicontrol">Open a New Form</span> step after <span class="ph uicontrol">Submit a Form</span> or <span class="ph uicontrol">Click a UI Action</span> to ensure that the test is on the form as expected. Ensure that the test keeps passing consistently when added to a suite.</span> <div class="note"><span class="notetitle">Note:</span> <span class="ph" id="atf-close-form__s4y_wb5_gx">Don't write tests that depend on the system displaying a specific page after executing a <span class="ph uicontrol">Submit a Form</span> or <span class="ph uicontrol">Click a UI Action</span> step. After these test steps, the system returns to the page that was open before the form was opened. The test cannot determine what that page was, so writing a test that expects a particular page can lead to unpredictable results.</span></div> <div class="note"><span class="notetitle">Note:</span> A modal form appears either on top of another form or a list. To submit a modal form, your test must have already opened it on top of a form or a list.<img class="image" id="atf-close-form__image_cc3_m21_wmb" src="../image/atf-modal-form.png" alt="Image showing modal form" /></div> <div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" id="atf-close-form__uhf_zf2_sw" class="table" frame="border" border="1" rules="all"><caption><span class="tablecap"><span class="table--title-label">Table 11. </span>Inputs</span></caption><colgroup><col /><col /></colgroup><thead class="thead" style="text-align:left;"><tr class="row"><th class="entry cellrowborder" style="vertical-align:top;" id="d489590e2242">Field</th><th class="entry cellrowborder" style="vertical-align:top;" id="d489590e2245">Description</th></tr></thead><tbody class="tbody"><tr class="row"><td class="entry cellrowborder" style="vertical-align:top;" headers="d489590e2242 ">Execution order</td><td class="entry cellrowborder" id="atf-close-form__atf-exec-order" style="vertical-align:top;" headers="d489590e2245 ">Integer specifying the order in which the test executes this step.<p class="p">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 <span class="ph uicontrol">Execution order</span> values.</p> </td></tr><tr class="row"><td class="entry cellrowborder" style="vertical-align:top;" headers="d489590e2242 ">Active</td><td class="entry cellrowborder" id="atf-close-form__atf-active" style="vertical-align:top;" headers="d489590e2245 ">Option to activate this test step for use.</td></tr><tr class="row"><td class="entry cellrowborder" style="vertical-align:top;" headers="d489590e2242 ">Application</td><td class="entry cellrowborder" id="atf-close-form__atf-application-scope" style="vertical-align:top;" headers="d489590e2245 ">Application scope in which the system runs this step.</td></tr><tr class="row"><td class="entry cellrowborder" style="vertical-align:top;" headers="d489590e2242 ">Test</td><td class="entry cellrowborder" id="atf-close-form__atf-test" style="vertical-align:top;" headers="d489590e2245 ">Read-only name of the test that you're adding the step to.</td></tr><tr class="row"><td class="entry cellrowborder" style="vertical-align:top;" headers="d489590e2242 ">Timeout</td><td class="entry cellrowborder" id="atf-close-form__atf-timeout-form-ui" style="vertical-align:top;" headers="d489590e2245 ">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.<div class="note"><span class="notetitle">Note:</span> This field appears when an available workspace is chosen from <span class="ph uicontrol">Form UI</span>.</div> </td></tr><tr class="row"><td class="entry cellrowborder" style="vertical-align:top;" headers="d489590e2242 ">Step config</td><td class="entry cellrowborder" id="atf-close-form__atf-step-config" style="vertical-align:top;" headers="d489590e2245 ">Read-only name of the step.</td></tr><tr class="row"><td class="entry cellrowborder" style="vertical-align:top;" headers="d489590e2242 ">Description</td><td class="entry cellrowborder" id="atf-close-form__atf-description" style="vertical-align:top;" headers="d489590e2245 ">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.</td></tr><tr class="row"><td class="entry cellrowborder" style="vertical-align:top;" headers="d489590e2242 ">Notes</td><td class="entry cellrowborder" id="atf-close-form__atf-notes" style="vertical-align:top;" headers="d489590e2245 ">Notes about the test step.</td></tr><tr class="row"><td class="entry cellrowborder" style="vertical-align:top;" headers="d489590e2242 ">Form UI</td><td class="entry cellrowborder" id="atf-close-form__atf-form-ui" style="vertical-align:top;" headers="d489590e2245 ">Option to select an available UI.<div class="note"><span class="notetitle">Note:</span> Workspaces are not supported in Internet Explorer (IE). See <a class="xref" href="https://support.servicenow.com/kb_view.do?sysparm_article=KB0683275" target="_blank" rel="noopener noreferrer">KB0683275</a> for more details.</div> </td></tr><tr class="row"><td class="entry cellrowborder" style="vertical-align:top;" headers="d489590e2242 ">Assert type</td><td class="entry cellrowborder" id="atf-close-form__atf-submit-form-assert-type" style="vertical-align:top;" headers="d489590e2245 ">The effect on the tests on submitting a form.<ul class="ul"><li class="li"><span class="ph uicontrol">Form submitted to server</span>: The step passes only if form is submitted.</li><li class="li"><span class="ph uicontrol">Form submission canceled in browser</span>: The step passes only if form submission is canceled.</li><li class="li"><span class="ph uicontrol">None</span>: Make no assertion on submitting the form. The step always passes when using this assert type regardless of the result of submitting the form.</li></ul> </td></tr></tbody></table> </div> <div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" id="atf-close-form__d5b_d2p_tw" class="table" frame="border" border="1" rules="all"><caption><span class="tablecap"><span class="table--title-label">Table 12. </span>Outputs</span></caption><colgroup><col /><col /></colgroup><thead class="thead" style="text-align:left;"><tr class="row"><th class="entry cellrowborder" style="vertical-align:top;" id="d489590e2394">Field</th><th class="entry cellrowborder" style="vertical-align:top;" id="d489590e2397">Description</th></tr></thead><tbody class="tbody"><tr class="row"><td class="entry cellrowborder" style="vertical-align:top;" headers="d489590e2394 ">table</td><td class="entry cellrowborder" style="vertical-align:top;" headers="d489590e2397 ">The table for the submitted record.</td></tr><tr class="row"><td class="entry cellrowborder" style="vertical-align:top;" headers="d489590e2394 ">record</td><td class="entry cellrowborder" style="vertical-align:top;" headers="d489590e2397 ">The sys_id of the submitted record.</td></tr></tbody></table> </div> </div> </div> </div> </div> </body></html></div>