How to deal with dialog box and press the OK button

chrome
studio

#1

Hi there

We have this webpage with a bunch of checkbox and then a Delete button. If you click the Delete button, the dialog box will show up saying “Delete selected posts?” with OK and Cancel button.

With combination of UIExplorer and Recording, we managed to select the checkbox and click the Delete button. However, we couldn’t do for capturing the pressing of OK button on Dialog box after pressing the Delete button.

This is the source code of the Delete button:

<input type="submit" name="del" value="Delete" class="cautionbutton" onclick="return(confirm('Delete selected posts?'));"

BTW … we are using Chrome as browser.

Any input that will be good.

Thanks


#2

What if you drop click activity after your Delete Button click activity in your recording and have your Ok button dialogue box visible on screen. Aren’t you able to capture it? Or are you referring to dynamic selector because of which Robot is not clicking OK button?


#3

We managed to capture the Delete button and then pops up the dialog box BUT can’t capture the dialog box for some reason.


#4

Actually, we managed to capture for the delete button BUT thrown an error when executing it. But it launched the Dialog box ?!?!

Capture


#5

As a last resource, try using image automation


#6

Hi @dcpartners,

Dialog box sometime cann’t be captured by uipath.
So I think you can try to use send hotkey activity instead.

Regards,
Hoang Anh.


#8

@beesheep Can you elaborate further on this? Not sure by image automation?


#9

@anhth15 : It’s a dialog box of the browser. Not sure how to send hotkey activity on this ?!?!


#10

Hi @dcpartners,

When dialog box is shown up, it normally focus on the [OK] button. So you just need to press [enter] to press [OK] button. I think it will work, at lease in my case.

Regards,
Hoang Anh.


#12

@alanbruce
This is a community forum not an advertising platform :slight_smile: . This plateform is all about to share and enhance the knowledge related with Uipath Tool.

And on two post you are posting such Topic irrelevant link.

please read and follow the community Guidelines Strictly.

Regards…!!
Aksh


#13

Tried your suggestion. When the dialog box came up (did focus to OK button), then pressed Enter but it won’t recorded the activity ?!?! Any ideas?


#14

Finally managed to capture this OK button dialog box.


#15

How did you do it…?