How to click "Yes button" present in a Popup box?

Hi

I am trying to click on the Yes button which is in the popup box, but I am unable to click it. I am not getting how to automate it.

I have tried with the desktop recording option, hotkey:Enter, hotket:Tab, Click Image but unable to click the button.

Below is the image of the popup. Only after clicking the Yes button, I can see the data of Spreadsheet.

Need help!!

Hi @p.kshama28

Try using click Image activity for the same.

Mark as solution and like it if this helps you :slight_smile:

Happy Automation :raised_hands:

Best Regards
Er Pratik Wavhal :robot::man_technologist:t4: :computer:

1 Like

Hi @Pratik_Wavhal

Yes, I tried with Click Image Activity but the button is not getting clicked. After selecting the Yes button I am getting below output. The image is not clear or maybe it is not getting captured properly.

image

Please let me know, what else I can try.

Thank you!!

Try opening UI Explorer and selecting the yes button to see the selector that is automatically being generated by uipath and try and build a reliable one from that. Sometimes buttons from pop up windows need a dynamic selector or need certain elements to not be included in the selector.

2 Likes

@p.kshama28

There is no better way, utilise UiExplorer.
You have to create selectors based on it.

You can also try using element Exists, it will wait for element to appear and perform action on it, more like a element appear however more reliable in use.

1 Like

Hi @JosephNehl, @Lakshay_Verma

I have changed the selector but nothing is working.

image

Below is the Screenshot of UI Explorer.

I changed the selector by adding the Test and Role checkbox from Selected Items. Below is the new selector

I have also tried with the below code but that is also not working:

I hope I did it right :slight_smile:

Please let me know where and what I need to change in the above code.

The first thing I would try is replacing the ctrlid=‘6’ to ctrlid=‘*’

If that doesn’t fix it try the same technique by replacing cls=‘#*’ as well.

The * acts as a wildcard that accepts any number of characters, so if the ids of the application window changes then the selector will still be able to find it.

Sorry!! the changed code didn’t get pasted:slight_smile:

Below is the New code which I have used but didn’t work
image

image

1 Like

Okay, I will try this and let you know.

Thank you!!

Hi

I replace ctrlid=‘6’ with ctrlid=’’ and cls=‘#32770’ with cls='#’ but it is not working.

@p.kshama28

Let’s debug this to root.

Copy your current selector in notepad, one you are using.
Debug your code, it will break at this particular point when unable to click on yes.
Stop bot at this point, recreate your selector and compare it with the one you have in notepad… share both of your selectors.

1 Like

@p.kshama28
Use this

 <wnd app='excel.exe' cls='#32770' title='*' />
<wnd aaname='Yes' role='*button' />
1 Like

Hi @Lakshay_Verma

Sure, I will try to debug the code.

Hi @Lakshay_Verma

Below is the code:

image

The changed code is also not working and at the time of debugging the popup is not coming up. So, I think that’s why the new code is not working

Hi @Lakshay_Verma

I deleted the excel sheet and downloaded it again and now I am getting the popup. And I found that after entering into the Excel Application Scope the Do Sequence is not getting executed. The Do Sequence is not getting executed that’s why it is not giving the message or clicking the button.

Only after closing the popup box (manually) I am getting the Message on the screen.

image

Try to run it in without debugging, Just before the click acitivity, Use a message box and stop bot and see selectors that been generated

1 Like

Hi,

I had a similar issue with a Excel Popup.
Try the solution depicted in this post and see if works for you.

2 Likes

Hi @stefano_negro

Start process Activity worked for me. Thank you for the solution. Below is the screenshot of that.

image

I am trying to understand why the same code didn’t work with Excel Application Scope activity and worked for Start-Process activity

Thank You, Everyone @stefano_negro @Pratik_Wavhal @Lakshay_Verma @JosephNehl :smiley: I am happy to be a part of the UIPath Forum. Happy learning!! Thanks a lot :slight_smile:

4 Likes

I’m glad it worked :slight_smile:

I think that the Excel Application Scope opens the Excel instance and goes to the activities inside the scope only when the Excel Window is available, since it passes also the session as output.
In case there’s a popup the Excel Window is not active, so the scope is “stuck” into the opening.

1 Like

Hi @stefano_negro

Thank you for explaining it :slight_smile:

Now, I am able to open the excel sheet but not able to write data in the cell. If I am trying to select the cell then a complete excel sheet is getting selected. Write Range and Write Cell only works with Excel Application Scope Activity. And if I am using the Excel Application Scope Activity, then I cannot access the excel sheet.

By using the Start Process Activity the excel sheet is getting open and the POPUP box issue got resolved but Is there any way to write in a particular cell or I have to use Excel Application Scope Activity?

Please let me know, thank you!!

1 Like