ATF to test catalog item with dynamically populated drop down list

bjonesy
Tera Contributor

I'm trying to create an ATF to validate a catalog item with a dynamically populated drop down (B) which is populated when the user selects a value from another drop down (A) on the form.  The "Set Variable Values" step does not appear to allow anything like this.

1. User selects choice list value from Drop down (A)

2. onChange (A) Client script fires and calls AJAX script include that retrieves values from a table and client script dynamically populates Drop Down (B).

Is there a way to create an ATF to test this form?  I can easily set the value for drop down (A), but since there is no fixed choice list for drop down (B) I don't have the ability to set (B).  Is there a way to add javascript to the ATF set variable field for (B) to call my script include manually in the test step (javascript: new ...)

Thanks.

6 REPLIES 6

David Schaffner
Tera Contributor

I have the same issue.  I find it a bit disconcerting that ServiceNow still does not provide a method for testing dynamic fields.   Its common place to utilize APIs to populate our form fields with content.   Why can't ATF mimic our users?

 

Michael76
Tera Contributor

For anyone that is looking for an answer to this question in the future.

 

You use ATF Parameterized testing to set dynamic variables.