Sadly I think there is no way to know that the app is already fully rendered. Also instead of nextpaint you may want to use getScreenshot(1,1) instead. That will guarantee that the app is fully repainted (versus a part of the app is repainted only). I hope we will have a better API at some point.