Join the #BuildWithBuildAgent Challenge! Get recognized, earn exclusive swag, and inspire the ServiceNow Community with what you can build using Build Agent.  Join the Challenge.

How do I click a button in a popup window during an ATF test?

guided by books
Giga Contributor

I am working in London, creating a KB article, saving, publishing, then trying to retire.  After clicking "Retire", a popup appears to make sure the user had already used "Check Links".  I have not yet found the way to send a click to that popup window, so the test continues on to attempt to "Unretire".  This fails because the KB article is still Published, the popup prevents the retire from completing.

Any suggestions on where to find the answer?

Thanks

1 ACCEPTED SOLUTION

Jonathan,

I just searched the ID of the OK button and its ok_button (all small caps). Sorry for the wrong button name, I got it from the documentation directly but looks like the documentation page has a mistake.

Give it a shot. 

Reference: Form test step: Click Modal Button

 

Thank you,

Aman Gurram

View solution in original post

15 REPLIES 15

nikita_swain
ServiceNow Employee
ServiceNow Employee

It worked. You have to the ID of the button and select the Required UI page. It works.

it's ok_button, all lower case. Also, i hope you're button is called "OK" and has not been renamed to something else, if it has been renamed, you have to change the name in the test step as well I guess.

Hi Nitesh,

 

can you please tell me where i will get the button name or id?

 

 

Regards,

Alok Gupta

If its a custom pop up, you must have defined it in a UI Page, else its always ok_button.

Hi Nitesh,

I have this UI page being opened from Closed Incomplete UI action which is out of the box; how to add this in atf; on click of closed incomplete pop-up shows; user populates comments and clicks ok

UI Page: hr_task_closed_incomplete

find_real_file.png

Can you please help me? I think Click Modal window has to be used.

Regards

Ankur

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