(self, url=None, _session_id=None)
Args:
            target (string): the device url

        If target is empty, device url will set to env-var "DEVICE_URL" if defined else set to "http://localhost:8100"
Args:
            target (string): the device url
Args : target ( string ) : the device url
def __init__(self, url=None, _session_id=None):
        """
        Args:
            target (string): the device url

        If target is empty, device url will set to env-var "DEVICE_URL" if defined else set to "http://localhost:8100"
        """
        if not url:
            url = os.environ.get('DEVICE_URL', 'http://localhost:8100')
        assert re.match(r"^(http\+usbmux|https?)://", url), "Invalid URL: %r" % url

        # Session variable
        self.__wda_url = url
        self.__session_id = _session_id
        self.__is_app = bool(_session_id)  # set to freeze session_id
        self.__timeout = 30.0
        self.__callbacks = defaultdict(list)
        self.__callback_depth = 0
        self.__callback_running = False

        if not _session_id:
            self._init_callback()
def __init__ ( self , url = None , _session_id = None ) : if not url : url = os . environ . get ( 'DEVICE_URL' , 'http://localhost:8100' ) assert re . match ( r"^(http\+usbmux|https?)://" , url ) , "Invalid URL: %r" % url # Session variable self . __wda_url = url self . __session_id = _session_id self . __is_app = bool ( _session_id ) # set to freeze session_id self . __timeout = 30.0 self . __callbacks = defaultdict ( list ) self . __callback_depth = 0 self . __callback_running = False if not _session_id : self . _init_callback ( )