Excel element

Hi,

I am trying to click on an element within Excel-two different scenarios. This include includes a button embedded into an existing excel (first screenshot) as well as button on the toolbar (second screenshot). When using a click element-when I run the bot sometimes it will recognize the element and sometimes it won’t. When it does not recognize it, the bot will time out. Is there a way around this to ensure it can identify the element each time consistently?

It sees this all as one page:

Can’t identify the variable button:

Hello @MaryA, about the second scenario, does it make any differ if you add some delay before clicking the button)? The first one, haven’t had a chance to try similar action, but if all fail is it possible to use Image Click?

1 Like

Hi @whyyouandi. I tried delay before and that didn’t work but using a click image worked. Thanks! Hopefully that will continue to work and won’t change based on whether my screen resolution changes (i.e. running it on my desktop monitor vs. laptop screen)?

My other question is after the report refreshes there is a button shown below that I have to click “OK.” It sometimes times out if the report runs for longer than the time set for the delay before (Varies depending on how much data is in the report). Should I set up a do while activity? And if so, do you have any guidance on that-what the condition would be?

2018-05-25_17-56-23

Preformatted text``Preformatted text``Preformatted text indent preformatted text by 4 spaces
Hi @MaryA, sorry for the delayed reply.

About Click Image, yes it will change. Have you visited the Academy video? I remember seeing the sample of reliable clicks across resolutions with using Pick and Pick Branch Activity.

For waiting for the “Your data has been replaced” button, i think you can just simply use Find Element (and setting a high TimeoutMS). Or if you want to use Do While, you can use Element Exists inside. But this will create an endless loop if the button never showed up, so it will be nice to have some timer (Stopwatch in it), something like:

Start Stopwatch
Do
Button exists
While button doesn’t exists and stopwatch elapsed time doesn’t go up for X

1 Like