I have found this answer however I'm not testing angularjs app but angular 2. Testing AngularJS with Selenium
looking for a similar piece of js code to execute to wait until angular finishes.
I came up with an idea of a decorator that I'll use to wait before touching the app but I don' know what the script would like, I took a look into clientsidescripts.js but I am not an Angular developer and it seems that it gets ng1hooks and testability... so maybe I could extra some bits and pieces and put them into a js file and execute it e.g. like this guy https://github.com/kpodl/pytractor/blob/master/src/pytractor/protractor/extracted/waitForAngular.js but again this is from 2015.
def angular_wait_required(f):
def wrapped_f(self, *args, **kwargs):
self.driver.set_script_timeout(30)
self.driver.execute_async_script(WAIT_FOR_SCRIPT)
f(self, *args, **kwargs)
return wrapped_f