How To Close Confirm Dialog in a Web Page

studio

#1

Hi,

In our work flow, we receive Confirm Dialog Using Ajax Popup Extender, See Image Below.

Manual Testing:
Click Link - Confirm Dialog - Focus on OK Button - Enter Key Working - Window Closed.

Using UI Path:
Click Link - Confirm Dialog - Focus Missing - Enter Key Not Working.

We tried using Click Event but not working, that is Confirm Dialog not closing.

image

Can you please suggest some solution to Close Confirm Dialog.

Thank You.

Best,
K.Kannan.


#2

From the screenshot it seems that the ‘OK’ button element is being identified correctly. Its just the case that it is not being clicked when the process is run. Let me know if that’s not the case.

Try putting a Highlight activity right above the click activity that clicks on ‘OK’ button and see if the button actually highlights when it reaches that point. This way you can make sure that the selector is correct. If its not getting highlighted there itself that you may need to change the selector of the button. Please paste the selector here if possible.

If the selectors are proper then try changing the ‘WaitForReady’ property to ‘Complete’ for the Click button and See if it works.This way it will wait for the entire app to be loaded and then perform the click operation.

Also, please confirm your browser. I did tested with couple of ajax popup and it works fine. Like this: https://www.aspsnippets.com/demos/250/

Let me know if it helps.

Thanks,
Rammohan B.


#3

Hello,

You can also use “Set Focus or Highlight” activity. which will bring up front to UI specified element.

Cheers,
Pankaj


#4

Hello @Rammohan B,

Thank you for your detail message and please see details below.

Added Highlight and it is picking up - See image - Tested highlight with Click and Enter Key - Still popup not closing as expected.

Below are selectors used in this - IDX 1 or 2 or 3 keep changing when I repeat again in Click Selector - Do I need to use hotkey to fire button click?

I have attached all selection option in Editor Screen.

View Source From Browser - Looks like JS Confirm Dialog called in Ajax Extender - Pasting of HTML Code is not allowed in this so adding as image.

Browser Mozilla - Set Complete in the setting.

Please take a look and feedback what I am missing.

Thank You,

Best,
K.Kannan.


#5

Hello @Pankaj,

Thank you for your detail.

Tried using Set Focus - Issue same as mentioned above - Any other suggestion to troubleshoot this?

Best,
K.Kannan.


#6

Hello,

try using “Click Image” after simple Click only.
have a look at below shot,

Click%20on%20OK%20Button

Cheers,
Pankaj


#7

Hello @Pankaj,

Thanks for your quick reply - We are using Mozilla and for some reason image click not firing.

We managed to troubleshoot and fix issue by “Selecting Sendwindowmessage” in options, See below image - WIndow closing now as expected.

Issue resolved and Thank you for your help.

Best,
K.Kannan.


#8

Hello @Rammohan B,

After few troubleshooting steps we resolved issue using,
1 - Highlight Element.
2 - Enter Key Code, Unchecked Simulate Type and Checked Sendwindowmessages.

Simulate type not working in our website for some reason (Tested again with Simulate Type, not working).

Issue resolved and Thank you for your help.

Best,
K.Kannan.