I have performance issue with IF statement… using with Element Exist activity…
When robot click at “Søg=Search” some data will be loaded on window from SAP.
When an ID have no Data… then it shows an information message… which i’m checking with Element Exist activity and moving different way by this if statement.
Problem comes, when this Element exist is not true… robot take longer time to figur out which way it should move… it takes almost 1 minut 20 sec
I’m not using any delay… or wait… this element exist will apear only when there is no data on ID.
@Latif
Did you try to change the timeout value of Element Exist activity , e.g. to 00:00:10 (10 seconds)?
But in that case, maybe you still need to wait 10seconds in case the message is not displayed when ID has data.
You can use the below solution to improve performance
I understood that you only want to check if there’s no DATA.
But if you use only 1 element exist activity, in case have data, you will have to wait 10 seconds to wait Element Exist return result.
Of course, you can set the timeout to be more shorter (e.g. 3 seconds) - but it maybe return error in case the loading time of search result become long.
So, to reduce the waiting time but no risk, i recommended you that solution
First, robot will wait No data message in 2 seconds, if it’s not displayed, it will check if Have Data displayed → incase have data, robot can return result immediately.
In case the loading time of website becomes too long, both NoData & HaveData return false; in that case, robot will retry the check with Retry Scope . It will retry until
. One of Nodata or HaveData is displayed
. Reached 5 times retry , but still not get the resutl (incase there’s errror on webpage, and it didn’t return both Nodata & HaveData) → robot will throw the exception, you need handle this exception by a try/catch