Corey19
Tera Expert

Hi monikasilac,

This is one of the issues I find with the manner in which ATF operates. It isn't able to operate in the same manner as a user interacting with the browser in most of the OOTB tests. For the specific use case you're after, you would need to create a custom ATF Test Step Configuration which involves significant scripting experience especially to identify out of the box events for triggering interactions. If you have that experience or a team available to support that effort, you would need to provision the following within the test script:
- Inputs -
Record ID
Table name
Optional glide list input to specifiy templates for optional confirmation user has access required

- Outputs - 
none unless you decide there is some useful output data you can leverage later

- Execution Script - 
1. Identify whether the template toolbar is visible, toggle on if hidden

2. Toggle All Template Filter with event for "..." icon in toolbar

3. Confirm all templates available within DOM

3a. Evaluate if missing any or any additional based on optional input

4. Start loop (iterate through templates - return error on failure)

5. Fire event for current template in list

6. settimeout for function to confirm presence of template applied message

7. Evaluate field values based on template lookup via GR

8. Fire event for undo template

9.  settimeout for function to confirm presence of message (can't remember what the undo message looks like)

10. iterate or end loop

11. Process pass result message

 

This is a VERY complex TSC however and would take a bit of effort to build but then, it will also take significant effort to maintain as it deals heavily with DOM elements and as such is prone to breaking with each ServiceNow release. 

 

I hope that helps.

Cheers,

Corey