How to fetch dynamic values using ATF?

SangyM
Tera Contributor

Hi All,

 

Let me enact the exact scenario which I am trying to perform :

Place a loaner request from Employee Center

SangyM_0-1752486036493.png

Now, navigating to ServiceNow native view -> Asset Reservations -> Loaner Asset Request

SangyM_1-1752486360603.png

Now, click on search icon for the model field

SangyM_2-1752486453500.png

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?

3 REPLIES 3

Ankur Bawiskar
Tera Patron
Tera Patron

@SangyM 

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.

Regards,
Ankur
Certified Technical Architect  ||  9x ServiceNow MVP  ||  ServiceNow Community Leader

Shaqeel
Mega Sage

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

Sardash
Mega Guru

@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