Refresh page while screen is locked



Hi guys,

I have a question about how best to implement a while loop in UiPath. Here is the situation:

I am submitting a record on a web page to enter into an enterprise system. When the record is submitted, it lands on a page which shows a “Locked” message while the data is entered into a backend server. In order to confirm that the data has been entered successfully, human users click the browser refresh button or type Ctrl+R as many times as needed until they see the “Locked” image is not shown.

I need to replicate this process in UiPath. I have been trying both While loops and Do While loops that check to see if the “Locked” image exists and type Ctrl+R until the Locked image is not shown. I am having difficulty getting this to work though.

Can someone suggest how they would best code this process in UiPath? Happy to explain further if this is unclear.



while (lockedImageFound) { RefreshBrowser; // there's an activity for it Delay(someTime); ImageExists(lockedImageFound); // possibly ElementExists instead, both return true/false }

You might also want to look into RetryScope activity, as it should fill your needs and also takes care of how many times it

Sidenote: That’s a very convoluted way of checking if something’s done. I guess design practices will never stop to amaze me :slight_smile:


Thanks andrzej, this worked.

And I agree, it is a very convoluted way of checking the backend for success!