How can I validate, using ATF, whether a specific value exists in a dropdown field?

UTSAV KUMAR JAI
Tera Contributor

Hello everyone,

 

I would like to create a test step that verifies whether a field is populated with a specific value based on the value selected in the previous field. Is there a way to implement this type of validation?

 

Thanks in advance,
Utsav

4 REPLIES 4

Dr Atul G- LNG
Tera Patron

Hi @UTSAV KUMAR JAI 

 

If I understand your question correctly, you should be able to set the values of the dropdown and validate the values one by one on the same form to ensure that they 'show up'. Or use a parameterized data set in a parameterized test (which introduces its own limitations to the test as a whole).

 

https://www.servicenow.com/community/developer-forum/validating-dropdown-fields-on-any-forms-in-atf/...

*************************************************************************************************************
Regards
Dr. Atul G. - Learn N Grow Together
ServiceNow Techno - Functional Trainer
LinkedIn: https://www.linkedin.com/in/dratulgrover
YouTube: https://www.youtube.com/@LearnNGrowTogetherwithAtulG
Topmate: https://topmate.io/dratulgrover [ Connect for 1-1 Session]

****************************************************************************************************************

Hello @Dr Atul G- LNG 

I understand your point. However, in my case, the dropdown values of the current field are populated based on the value selected in the previous field, and that previous field is being set randomly through a server‑side script. In such a situation, how can I validate the dropdown values?


Thanks for the quick response

Hi @UTSAV KUMAR JAI 

 

https://www.servicenow.com/community/developer-forum/atf-testing-for-dependent-drop-down-values/m-p/...

*************************************************************************************************************
Regards
Dr. Atul G. - Learn N Grow Together
ServiceNow Techno - Functional Trainer
LinkedIn: https://www.linkedin.com/in/dratulgrover
YouTube: https://www.youtube.com/@LearnNGrowTogetherwithAtulG
Topmate: https://topmate.io/dratulgrover [ Connect for 1-1 Session]

****************************************************************************************************************

Tanushree Maiti
Kilo Patron

Hi @UTSAV KUMAR JAI 

 

You can try with KB0636073 In the Automated Test Framework (ATF), a Field Values Validation step with a String field ... 

 

Also refer: https://developer.servicenow.com/print_page.do?release=zurich&category=learning-module&identifier=AT...

 

Automating ATF - My Journey Building a Test Recorder

 

 

 

 

Please mark this response as Helpful & Accept it as solution if it assisted you with your question.
Regards
Tanushree Maiti
ServiceNow Technical Architect
Linkedin: