(self, timeout=120, noprint=False)
return False
wait until WDA back to normal

        Returns:
            bool (if wda works)
wait until WDA back to normal
wait until WDA back to normal
def wait_ready(self, timeout=120, noprint=False) -> bool:
        """
        wait until WDA back to normal

        Returns:
            bool (if wda works)
        """
        deadline = time.time() + timeout

        def _dprint(message: str):
            if noprint:
                return
            print("facebook-wda", time.ctime(), message)

        _dprint("Wait ready (timeout={:.1f})".format(timeout))
        while time.time() < deadline:
            if self.is_ready():
                _dprint("device back online")
                return True
            else:
                _dprint("{!r} wait_ready left {:.1f} seconds".format(self.__wda_url, deadline - time.time()))
                time.sleep(1.0)
        _dprint("device still offline")
        return False
def wait_ready ( self , timeout = 120 , noprint = False ) -> bool : deadline = time . time ( ) + timeout def _dprint ( message : str ) : if noprint : return print ( "facebook-wda" , time . ctime ( ) , message ) _dprint ( "Wait ready (timeout={:.1f})" . format ( timeout ) ) while time . time ( ) < deadline : if self . is_ready ( ) : _dprint ( "device back online" ) return True else : _dprint ( "{!r} wait_ready left {:.1f} seconds" . format ( self . __wda_url , deadline - time . time ( ) ) ) time . sleep ( 1.0 ) _dprint ( "device still offline" ) return False