Mobile.verifyElementExist(testobject, 10) waited for 90 seconds — far longer than the specified timeout of 10secs. Why?

Why does katalon waits over and above the given timeout limit before failing the Test cases ? I have one test steps which i want to fail if the given element is not present within 10 second but katalon waits for around 90 sec to check the element before failing it . these behavior adding up my total execution time.

Mobile.verifyElementExist(findTestObject(‘Application/android.widget.TextView - App’), 10) my default failure handling is STOP_ON_FAILURE.

@Katalon_team @kazurayam do you have any idea on this ?

1 Like

You reported 90secs wait after a failture at Mobile.verifyElementExist(x, 10), but I am not convinced that you are reporting a fact. There could be some other cause of failure and probably you missed it. Please check the execution log again.

Or follow the guideline:


other than these which logs will you need ? do you need execution0.log file ?

You are complaining about Mobile.verifyElementExist but in the screenshot you show a failure of tap.
Something does not match.
On the otherside, what is in the screenshot is the time taken for the test step to execute, not for the keyword to validate/execute whatever is needed.
Is is known that, using Log Viewer adds some unwanted delays to execution, see:

Aside of that, apparently you are doing some Mobile testing.
You should know that, whatever verification / action you do it is sent first to Appium server and further to the device via the API, which adds more time to the execution.
This is how Appium works, see:
https://appium.io/docs/en/about-appium/intro/?lang=en#appium-concepts

1 Like

hmm. I am facing this issue for both tap and verifyElementExist. but thanks for the additional info. will check the time duration after disabling the logs once.

that should improve it a bit, but you cannot avoid the extra time for the client/server action.
the client (in this case katalon) send whatever action to appium, which execute it on the device, wait for an answer and reports back to the client.
on this part, there is nothing you can do, i am affraid, other than check the network latency and see if there are any issues.

you can also google a bit on this, perhaps using better locators and so on … here i cannot help much, i never did mobile testing

e.g: How To Improve Appium Test Speed and Reliability

@sumiranraut96

You used Mobiel.tap() keyword.

The Mobile.tap keyword is naughty recently. There is another discussion, which reported tap is too slow:

Just for your interest.

Thanks @kazurayam @anon46315158 . Thanks for all the information. I went through few past execution reports and looks like it is more to do with the screenshot logging that happened after the failure. just now i disabled the screenshot logging and it took 11 sec only.

@sumiranraut96

Do you mean, taking a single screenshot after a failure in Mobile UI testing took nearly 90 seconds?

if that’s the case, somehow make sense for me, due to the above i already explained.

yeah it seems so. Even if i explicitly put the Mobile.takescreenshot() command , that also takes almost more than 1 minute to log the screenshot in the report.

just my two cents, but i suppose the screenshot is taken on the device, but has to be sent back to the client (katalon) in order to be reported.

yeah correct. this client server interaction only making it slow. in WEB it dosent take this time .

well … at least, now you know :smiley:
in “WEB”, ofcourse is faster because the interraction between the testing framework (no matter if it is katalon, pure selenium coding in whatever language or whatever else) happens on the same physical machine (except if you use remote runs like in selenium grid etc where networking matters)

so the delays are introduced by the framework himself, the browser himself and by the AUT (with a small contribution from the hardware where this is running, regarding IO and compute power needed) mainly

when testing on mobile (even if you are using an emulated device which runs on the same machine) there is an additional delay caused by the client/server stuff, top of the framework lacks, the device hardware capabilities and whatever other factors.

60 seconds to perform a Mobile.takescreenshot() is too slow. It’s unacceptable. There must be something to be investigated.

@vu.tran

Hi,

We have acknowledged this feedback and raise this to our internal team. We appreciate it and try to improve it soon.

Thank you!

1 Like

@sumiranraut96

Is it OK if I change the title of this post:

Katalon Execution Strategy

to

Mobile.verifyElementExist(testobject, 10) waited for 90 seconds — far longer than the specified timeout of 10secs. Why?

for search convenience?

Sure @kazurayam . No problem at all.

Good luck for Katalon team to improve this.
Perhaps Appium 2 bay bring some benefits (or not) on this.
Some people are confused, with regard to ‘WEB’ vs mobile testing.

To take the screenshot, may be fast.
To send it back to Katalon Studio … ok, plenty factors involved.