Timeout for keywords are not working on Mobile


I’ve posted previously to the mobile forum with this issue and it seems to me it is more likely a bug.
here is my previous topic:


OS: Win 10
Katalon version: 5.4.1 (didn’t work with previous either)
Katalon log: attached

Appium version: 1.7.2
Android version: 8.1.0 (independent from Android version - tested with 6.0,7.0)
Real device: Oneplus One (also independent from the device - tested with Huawei P9, Samsung Galaxy Core, Samsung Galaxy A8, J3)
Appium log is not created in the project folder.

**## Steps to reproduce -
Create an if statement which will fail if the statement False and set the timeout to lower than the project’s default timeout setting.
i.e.: An If where you check if an element is exists or not. The timeout is set to 3 secs for the element exists keyword inside the if statement. The project’s default timeout is set to 20 secs. The scripts does X when True and Y when False.

Check my other topic linked on the top for our example.

**## Expected Behavior -
The element exists keyword returns False in 3 secs and then proceeds to the statement’s branches.

**## Actual Behavior -
The script waits at the if statement for 20 secs (project’s default timeout settings) if the statement is False despite the element exists kw timeout is set to 3 secs.
If the statement is True then there is no problem. The element exists kw returns with True almost instantly and then the if statement is continuing.

Thanks in advance.


I am also facing same issue in Mobile for so long. Say if I have to verify non-existence of an element and giving timeout of 5 secs, (global timeout is 30 secs), it waits for 30 secs while this check can be done in less than 5 secs.

This issue has been noted and will be fixed in later releases. Thanks for your reporting and your details information :slight_smile:

1 Like


I think that we have the confusion between the elapsed time and timeout. ex: Mobile.tap(findTestObject(‘android.widget.TextViewo - Accessibility’), 3)

We set timeout = 3 seconds in this situation. That means that it will try to find the element in 3s (Timeout = 3s).

Before making the tap action. The elapsed time shows on the log viewer. It includes the loading mobile lib and driver mobile time, the finding element time, the tap action time.

In those cases, the all spending time is the nearly equal with the default timeout settings. It is the reason why we confused that the timeout keywords are not working.

To be clear, we can test by setting the default timeout (in project setting: 120 seconds) and try to set the timeout for the mobile tap is 5 seconds.

The elapsed time will not exceed 120 seconds.

Thank you,