How can I click a UI Action/Button in ATF?

Mmodi
Tera Contributor

Hi everyone,

 

I'm trying to automate a test in ServiceNow ATF and need to click a button (UI Action) on a form as part of the test.

I can open the form successfully, but I'm not finding a standard ATF test step that allows me to click the button directly. The button executes server-side logic that I need to validate as part of the test.

Has anyone implemented this before? What is the recommended approach to click a UI Action/button in ATF? Would this require a custom test step, client test runner, or another method?

 

Any examples or best practices would be appreciated.

 

Thanks!

7 REPLIES 7

brianlan25
Kilo Patron

ATF comes with a test step called "Click a UI Action". This will allow your to click a UI Action.

Shaqeel
Mega Sage

Hi @Mmodi 

 

It looks like risk assessment, you can try Click UI component.

 

 


***********************************************************************************************************************
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

brianlan25
Kilo Patron

If this is a risk assessment like the one that is available for change. I had to create my own test step to fill this out. Here is what I did for Change Risk assessment. You could probably adapt for your risk assessment.

[How To] ATF Service Side Script Step for Change Risk Assessment