Read a text from a DIV after the text changes

In a web page, after a particular button is clicked by the robot, it shows a DIV element with a text Saving… Later after some time, the messages changes to Saved successfully or Error. So I need to read the success or error message after the div text changes. How can do this? If I go for a Delay activity I have to hardcode the delay duration which could be longer in cases where the success or error message appears. So is there anyway by which I can make the robot wait until it shows a Success or error message. Thank you.

Use a while loop:
Get Text - from Div
While (divText = “Saving…” And loopCounter < 20)
{
Delay 2s
Get Text - from Div
loopCounter++
}
Counter is there so that you don’t create an infinite loop.

Or you can loop until the text is either ‘Saved succesfully’ or ‘Error’

br,
Topi

@sachin_mt
Use retry scope activity along with element exists activity in the condition. set max retry and delay counters. If the element is found in the initial iterations, it will skip the loop. else it will complete the number of iterations specified.
Please refer below link for more details-