How to validate mandatory fields on a custom UI using ATF in ServiceNow?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-12-2025 08:20 AM
Hi everyone,
I’m working on automating tests for a custom UI in ServiceNow using the Automated Test Framework (ATF). I want to validate whether certain fields are mandatory on the UI.
Any guidance, examples, sample test steps, or best practices for validating mandatory fields on a custom UI through ATF would be greatly appreciated!
Thanks in advance!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Tuesday
Hi,
unfortunately the Step config "Component State Validation (Custom UI)" is not as powerfull as the one for standard UI. For example - Text input fields can only be checked for "editable" or "read only".
I'm trying to avoid Custom UI Steps as much as possible - but sometimes they are just needed.
What I did for such a requirement:
For each field I try to set a value the field and submit the record.
Depending whether the field should be mandatory or not I'm checking for updated values or visible warnings (like "please fill out...")
Hope this helps.
best regards,
Beate