How to insert value into Prompt box in ATF (Automated Testing Framework) ( is it possible OR Not )

chanikya
Kilo Sage

Hi,

when i click on UI action it will displays one Prompt box for user input, Now how can i pass value into Prompt box  In ATF.

Any suggestions recommended .

find_real_file.png

 

find_real_file.png

1 ACCEPTED SOLUTION

Ankur Bawiskar
Tera Patron
Tera Patron

@chanikya 

Javascript prompt boxes, alert and confirm box cannot be tested via ATF

Regards
Ankur

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

View solution in original post

20 REPLIES 20

Hi,

Nope. It seems this cannot be tested since the javascript popups are browser specific an ServiceNow client test runner won't be able to detect this

Mark Correct if this solves your issue and also mark 👍 Helpful if you find my response worthy based on the impact.
Thanks
Ankur

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

Neha Deshpande1
Tera Contributor

Hi,

I am also facing the same issue. Any update on this in Orlando version?

If yes, please share the details.

Thanks and regards,

Neha Deshpande

Chris Bui
Giga Expert

The only way I have been able to work around this is to build in atf into the design of the catalog item or code. This way you can use a test step to set a hidden value and bypass the thing that is blocking you.

For example we have a variable set called "ATF Bypass" that we add to our catalog items when we want atf to bypass prompts. We then update any client scripts to check for the atf_bypass variable. Finally make sure atf has a step to set the atf_bypass flag.

@Chris Bui 

it would be nice if you share the steps so that it benefits members

Regards
Ankur

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

Ankur Bawiskar
Tera Patron
Tera Patron

@chanikya 

Javascript prompt boxes, alert and confirm box cannot be tested via ATF

Regards
Ankur

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