Element Exist . performance issue

Hi,

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.

Kindly help with this issue…

@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

Assign bolNoDataMessageDisplay = False
Assign boloDataDisplay = False
Retry Scope (NumberOfRetries = 5, RetryInterval = 00:00:01, COndition = IsTrue (bolNoDataMessageDisplay or boloDataDisplay )

  • Element Exist activity to check if the No Data Message display (Timeout = 00:00:02, Output = bolNoDataMessageDisplay )
  • Element Exist activity to check if the Data display - i’m not sure you can check it or not (Timeout = 00:00:02, Output = boloDataDisplay )

With this solution, you will receive result more quickly

Hi @Doanh

Thanks alot… it solved my problem by giving 10ms to element Exsit…
It works faster and exact what i needed. Thanks a lot.

But can you tell what are you trying to explain me in that paragraph.

Assign bolNoDataMessageDisplay = False
Assign boloDataDisplay = False
Retry Scope (NumberOfRetries = 5, RetryInterval = 00:00:01, COndition = IsTrue (bolNoDataMessageDisplay or boloDataDisplay )

  • Element Exist activity to check if the No Data Message display (Timeout = 00:00:02, Output = bolNoDataMessageDisplay )
  • Element Exist activity to check if the Data display - i’m not sure you can check it or not (Timeout = 00:00:02, Output = boloDataDisplay )

I an not checking as IF statement when there is Data on ID … I only check when there is no DATA…

Hi @Latif,

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

Perfect… got it…

Thanks a lot for the big help.

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.