ATF - Select Box values from Client Script to Set Value Test Step
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎09-25-2024 04:44 AM
Hi, I'm new to using the ATF in ServiceNow. Is it possible to set values from a Test Step manually? Scenario is I have one Select Box in the Form and options of it is added from an onChange Client Script. Hence, in ATF Test Step "
Set Variable Values (SP)" that Select Box field options is empty. Kindly suggest if possible or not.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎09-25-2024 07:11 AM
So if I'm understanding you correctly you have to set the value of a different variable then a OnChange client script runs and Populates the dropdown. If this is correct try the following.
- Do a Set Variable Values (SP) and only set the variables that would cause the dropdown to populate.
- Do a second Set Variable Values (SP) and populate the dropdown and any other variables.
This should hopefully allow the client script to run.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Monday - last edited Monday
Hi Brian,
I attempted the two-step Set Variable Values (SP) method. The first step works as expected, but in the second step, the dropdown for the other variable does not populate. It only displays "--None --" in the ATF configuration.
Could you please advise if there’s an additional setup required for dependent variables?
Regards,
Anke
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Tuesday
How do you have the dependent field setup to get the correct values based on the parent dropdown?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Tuesday
Hi Brian,
We are using an onChange client script to dynamically populate choice values into a Select Box variable. This works as expected during normal catalog item submission. However, when executing the same steps in ATF, the dropdown values are not available in the Set Variable Values (SP) step.
Regards,
Anke
