Is there some way to store dumps in a dictionary and use these dumps at a later time so that the dump does not have to be recalculated every time? This is a more a proof of concept question as I'm looking for a way to speed up androidviewclient's slow dump process and make my script quicker in any manner. For instance, AVC returns to the home-screen between my script's steps but needs to dump again before refinding the (u'''Applications''') button a few times.
This is problematic as it creates unnecessary wait times as my script is trying to configure the device's settings as quickly as possible and launch apps. I would like to create the home-screen dump once, store it, and refer back to that dump that I stored to click the (u'''Applications''') button between steps, or have some alternative method of creating a faster script. If this isn't possible, I would like to know what other script writing software works more quickly than AVC without sacrificing effectiveness as I do like the consistency with find views/buttons, and rewriting my functional yet slow script is no problem.
So far I have searched, found nothing, and tried the following after looking through viewclient.py:
dictDump = {}
home() #helper method that goes to the home screen
dictDump['homeScreen'] = vc.dump()
vc.findViewWithContentDescription(u'''Applications''').touch()
dictDump['appScreen'] = vc.dump()
home()
vc.views = dictDump['homeScreen']
vc.findViewWithContentDescription(u'''Applications''').touch()
And I get: AttributeError: 'NoneType' object has no attribute 'touch'