I’m testing an app that has a log in and then a tutorial only on the first time its used.
After that it should be logged in and no tutorial, but every time I open the app (even if i just open it and don’t install it) it deletes the cache and I have to log in and go through the tutorial all over again.
Is there a way to quit/ enter the app with all the cache?
I should mention that manually this works as I want it to.
Further investigation shows that it clears some of the app’s data
I entered the app, logged in and moved a few windows in the tutorial, then closed the app.
After this I entered the app manually and saw that I was logged in and that the app opened in the correct place where I left off. I went to the app’s info in the settings and saw that it holds 12kb in cache and 1.03mb in app data.
I then opened the app via appium and it return to the login form, I closed the app and saw the app data amount went down from 1.03mb to 632kb.
if i understood the issue correctly, you dont want the cache to be cleared every time you launched the app. In that case you have set noReset as false, true make to clear or reset app every time.
hmm ok alternatively you can use startactivity method. first check in your app is there any activities are present for starting the app. you can get this info by using aapt (this file is part of adb software)
We have a loader type activity that shows up every time you start the app (whether its for the first time or not). I call this activity. When trying to call the activity that comes after that I get:
Encountered internal error running command: Error: Error occured while starting App. Original error: Permission to start activity denied.
Now I’ll have to make my code hold the driver between tests and not close and open it each test.
I still think that there is a bug in appium in the way that if I start a driver and just open the app it does not act the same way as it would if I was to open the app manually.