How to fetch dynamic values using ATF?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-14-2025 02:50 AM
Hi All,
Let me enact the exact scenario which I am trying to perform :
Place a loaner request from Employee Center
Now, navigating to ServiceNow native view -> Asset Reservations -> Loaner Asset Request
Now, click on search icon for the model field
Now, I have to choose a model from this list and this list is dynamic. (Coming from a vendor and we don't have access to control it)
1. Now, for a workaround if I am trying to fetch the 1st element from this list everytime, then is there any way to do that using ATF?
2. If I want to search for a model with particular condition and select that then is there any way for that using ATF?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-14-2025 03:13 AM
for this you need to use Custom UI step and get the 1st element.
But that's not guaranteed that it will always find the correct HTML element.
ATF has it's own limitations and not everything can be tested using it.
If my response helped please mark it correct and close the thread so that it benefits future readers.
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-14-2025 03:47 AM
Hi @SangyM
Try Manual Page inspector on the required page,
Select any Modal that you want to populate.
Note the component value and in you ATF test use Set component.
Regards
Shaqeel
***********************************************************************************************************************
If my response proves useful, please indicate its helpfulness by selecting "Accept as Solution" and " Helpful." This action benefits both the community and me.
***********************************************************************************************************************
Regards
Shaqeel
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-14-2025 06:48 AM
@SangyM - Try using 'Set field Values' step. Select form UI as workspace in which you want to open the form and then check if you can select values