0

I have this android appium driver capability:

androidCapabilities.setCapability("appWaitActivity", ".install.TermsOfUseActivity");

but it appears after a while

How can I set in the capabilities the wait time out to be longer?

What's the default?

I have googled and so no timeout capability for that.

I'm not looking for other sleep/wait methods.

Give I'm using capability "appWaitActivity" how can I set the timeout to be X?

JimHawkins
  • 4,843
  • 8
  • 35
  • 55
Elad Benda2
  • 13,852
  • 29
  • 82
  • 157
  • 1
    Possible duplicate of [How to "wait to activity" using Appium, on begin and during test itself?](http://stackoverflow.com/questions/28799420/how-to-wait-to-activity-using-appium-on-begin-and-during-test-itself) – Lasse Jul 26 '16 at 10:28
  • That's not my question. Im not looking for other sleep\wait operation. I asked if there is a way to set a wait time for capability "appWaitActivity" – Elad Benda2 Jul 27 '16 at 09:41
  • You're right, the question is directly about being able to set the timeout. The linked question asks how to use the appWaitActivity and alternatives for it as well. – Lasse Jul 27 '16 at 10:48

1 Answers1

0

After checking all existing timeout values of the Appium server I found out where this timeout is actually set: https://github.com/appium/appium-adb/blob/master/lib/tools/apk-utils.js#L112

It looks like the wait timeout has been hardcoded to waitMs = 20000 so 20000 milliseconds.

The appWaitActivity at least currently doesn't support any custom value for the timeout and will always expect the appWaitActivity to succeed within 20 seconds.

This means that the appWaitActivity hasn't been designed to be used for the purpose of automatically waiting a longer period of time for a specific activity to automatically launch.

Lasse
  • 880
  • 5
  • 11