Can we use GlideAjax in ATF server script step for interacting with client side from server side script?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎05-04-2022 11:13 PM
Question1: I need to set values for fields in a record producer and want to achieve it via server side script as i am trying to iterate through multiple categories. Can I use GlideAjax for setting the value in client side using server side script in ATF? Please let me know the steps or provide some sample for help.
Question 2: Also can we run the ATF steps in loop? like from step 1-7 again it should be repeated? Can we achieve it using server script or any other way?
Note: I don't want to use Step configurations which has set variable steps for record producer.
- Labels:
-
Automated Test Framework

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎05-04-2022 11:47 PM
1 - As far as I know, I dont think you can do glideajax in ATF.
2 - I dont think you can do loops in ATF. If I am not wrong, they state this specifically in ATF training on NowLearning.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎05-05-2022 12:00 AM
How can we interact with client side using server side script ? any other way?

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎05-05-2022 12:58 AM
Hi
We cannot use glideAjax to pass parameter to script include in ATF Run Server side script.
But you can try this way by splitting your script include into two functions as below.
Example existing ajax function in script include :
Ajax_function_name: function() {
var parameter = this.getParameter('sysparm_parameter');
/*
Use that parameter and do something to get output....
....
*/
return output;
},
Now split that function into two functions in same script include as below :
//First existing function
Ajax_function_name: function() {
var parameter = this.getParameter('sysparm_parameter');
return this.non_Ajax_Function_name(parameter); //calling second function
},
//new second function in same script include
non_Ajax_Function_name: function(parameter){
/*
Use that parameter and get output here same as in first...
...
*/
return output;
},
Now in ATF Run server side script step you can call the new second function instead of first function as below :
(function(outputs, steps, stepResult, assertEqual) {
var ga = new ScriptIncludename().non_Ajax_Function_name(pass parameter here);
//ga contains the value returned from script include
})(outputs, steps, stepResult, assertEqual);
Mark as correct or helpful as applicable.
Regards,
Sumanth
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎05-05-2022 01:23 AM
So where will u be creating using this Ajax function? Is it separately creating using any ATF step configuration or like normal script include?