How to use the splinter.request_handler.status_code.StatusCode function in splinter

To help you get started, we’ve selected a few splinter examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github cobrateam / splinter / splinter / driver / flaskclient.py View on Github external
def _post_load(self):
        self._forms = {}
        try:
            del self._html
        except AttributeError:
            pass
        self.status_code = StatusCode(self._response.status_code, "")
github cobrateam / splinter / splinter / request_handler / request_handler.py View on Github external
def connect(self, url):
        if not (url.startswith("file:") or url.startswith("about:")):
            self.request_url = url
            self._create_connection()
            status_code = self._store_response()
            self.conn.close()
        else:
            status_code = StatusCode(200, 'Ok')
        return status_code
github cobrateam / splinter / splinter / driver / djangoclient.py View on Github external
def _post_load(self):
        self._forms = {}
        try:
            del self._html
        except AttributeError:
            pass
        self.status_code = StatusCode(self._response.status_code, "")
github cobrateam / splinter / splinter / request_handler / request_handler.py View on Github external
def _store_response(self):
        self.response = self.conn.getresponse()
        return StatusCode(self.response.status, self.response.reason)