The following code keeps raising ViewNotFound exceptions from time to time(about 40% of time). I wonder if I have missed something in my setup. Notice useuiautomatorhelper=True because my test depends on viewclient.pressBack() method.
Anyhelp of the potential cause or how to debug? Thanks!
device, serialno = ViewClient.connectToDeviceOrExit()
viewClient = ViewClient(device, serialno, useuiautomatorhelper=True)
viewClient.findViewByIdOrRaise(viewId="...")