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.

Not able to Click Modal Button in ATF

Kaushal283
Kilo Expert

I've a Custom modal, which I'm displaying on a button click. The modal has two buttons "OK" and "Cancel". Here is the html code of these two buttons written in my UI page: 

<div class="actions">
				<button class="btn btn-default" id="no" onclick="invokeCallBack('no');">${gs.getMessage('Cancel')}</button>
				<button class="btn btn-primary" id= "yes" onclick="invokeCallBack('yes');">${gs.getMessage('OK')}</button>
			</div>

I've given id to both the button and using these ids in "Click Modal Button" ATF step. Here is my configuration of ATF step: 

find_real_file.png

When I run this test case, it fails with the error "FAILURE: Did not find GlideDialogWindow or GlideModal". What I'm missing here? I've given the same UI page reference, in which I've defined above buttons. 

 

4 REPLIES 4

Prins Kumar Gup
Giga Guru

Hi,

Can you remove the space in your second button id part please see the below highlight:-

"<button class="btn btn-primary" id= "yes" onclick="invokeCallBack('yes');">${gs.getMessage('OK')}</button>"

 

Regards

Prins Kumar Gupta

No still not working. 

Okay,

So Kaushal why you used div class="actions" ?

Why not used only <div></div> tag.

How class of division affects the visibility of Buttons?