download a file from the server using a request with retries policy
        :param url: server url to request
        :param path_file: path and file where to download
        :param timeout: threshold until the video file is downloaded
        :return boolean

def __download_file(self, url, path_file, timeout):
        """
        download a file from the server using a request with retries policy
        :param url: server url to request
        :param path_file: path and file where to download
        :param timeout: threshold until the video file is downloaded
        :return boolean
        """
        status_code = 0
        init_time = time.time()
        self.driver_wrapper.logger.info('Downloading file from Selenoid node: %s' % url)
        # retries policy
        while status_code != STATUS_OK and time.time() - init_time < float(timeout):
            body = requests.get(url)
            status_code = body.status_code
            if status_code != STATUS_OK:
                time.sleep(1)
        took = time.time() - init_time  # time used to download the file
        # create the folders and store the file downloaded
        if status_code == STATUS_OK:
            path, name = os.path.split(path_file)
            if not os.path.exists(path):
                os.makedirs(path)
            try:
                fp = open(path_file, 'wb')
                fp.write(body.content)
                fp.close()
                self.driver_wrapper.logger.info('File has been downloaded successfully to "%s" and took %d '
                                                'seconds' % (path_file, took))
                return True
            except IOError as e:
                self.driver_wrapper.logger.warn('Error writing downloaded file in "%s":\n %s' % (path_file, e))
        else:
            self.driver_wrapper.logger.warn('File "%s" does not exist in the server after %s seconds' % (url, timeout))
        return False