Pressing buttons with conditional wait

matuopm

Member
At the moment I use conditional waits in almost every action where I need to press a button or something.
Basically I use the conditional wait to determine if the button is even there. And if its there. Blue Prism should press it.

I got an Internetexplorer Application that I interact with and I tried all the different spy modes so far:

IE HTML Mode, UI Automation and Accessibility mode

I handstopped the time how long blue prism needs to find a certain button.
With HTML its about 13secs, with Accesibility also 13 secs and with UI Automation 6 secs.

It takes a really long time ... and now when I use the conditional wait before the press button navigate stage I have doubled the amount of "waiting" time ...

Isn't there a better way to make this ?

At the moment our robot makes about 250 cases a day and if I can shave down these times I think I can make a huge improvement there.
 

Attachments

  • example.png
    15.8 KB · Views: 20
Last edited:

gil.silva

Active Member
Hello,

The secret is to optimize the Application Modeller for your button.
There are 2 reasons for BP taking a long time to find an element in HTML:
1) the HTML is very very big
2) the attributes aren't very strict

In the case of the 1st reason, the only solution to make it fast is to tick the Path attribute. Although it isn't a best practice, since it might stop to work if the page changes even a bit, it's the best option for an extensive HTML page.

If you only ticked a few attributes, try to select more attributes which will make your element more 'rare'.

Also, the Conditional Wait can check if you're in the current page or even if some particular element is shown, rather than check if the element exists.
 

matuopm

Member
Unfortunately the HTML is quite big but I selected quite a number of attributes already. Unfortunately I can not use the path because it changes for every case. But your Idea to let the conditional wait check for something else seems like the right approach for me. Thank you for your advice.
 

yawak

New Member
There is no need to apply a conditional wait stage for each button or element. Only when the application's screen changes, use a conditional wait at the start. Use 'check if element exists' first. If an internal error emerges due to slow loading speed, you'd use 'page document loaded' in your wait stage.

If you can find a fixed pattern in the html path attribute in HTML mode, you'd also make that attribute dynamic.
 
Top