I have an application to put in the background for more than 30 minutes and to bring it back to the foreground : an authenfitication request should appear (not logon page but a pop up contains username and password), but It does not.
Is it something related to appium, I mean does appium handles this?
Probably, the app (server side) sent the authentification required and appium does not unable this…
What is the answer for this issue?
Appium has a timeout for applications. If the Appium server does not receive a command from a test client within the timeout, then Appium will request the app under test to be killed and stop the test. You have to periodically send commands to Appium through your test to reset the timeout (or increase your timeout to 30 minutes).
Have you tried testing this particular case for your application manually?
For the first point : I have defined a timeout like this : desiredCapabilities.setCapability(MobileCapabilityType.NEW_COMMAND_TIMEOUT, “2400000”);
is it correct?
I haven’t used adb to fire intents with flags before, but I’m guessing it’ll be something like
adb shell am start -n ... -f <integer value in decimal for the flags>
You should use a hex calculator to help you determine the decimal values you need to use for the -f argument. For example, the FLAG_ACTIVITY_LAUNCHED_FROM_HISTORY flag might look like: