{"action":"created","issue":{"url":"https://api.github.com/repos/cobrateam/splinter/issues/439","labels_url":"https://api.github.com/repos/cobrateam/splinter/issues/439/labels{/name}","comments_url":"https://api.github.com/repos/cobrateam/splinter/issues/439/comments","events_url":"https://api.github.com/repos/cobrateam/splinter/issues/439/events","html_url":"https://github.com/cobrateam/splinter/issues/439","id":110769602,"number":439,"title":"visit function can block user's action","user":{"login":"ralph-nj","id":15059255,"avatar_url":"https://avatars.githubusercontent.com/u/15059255?v=3","gravatar_id":"","url":"https://api.github.com/users/ralph-nj","html_url":"https://github.com/ralph-nj","followers_url":"https://api.github.com/users/ralph-nj/followers","following_url":"https://api.github.com/users/ralph-nj/following{/other_user}","gists_url":"https://api.github.com/users/ralph-nj/gists{/gist_id}","starred_url":"https://api.github.com/users/ralph-nj/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ralph-nj/subscriptions","organizations_url":"https://api.github.com/users/ralph-nj/orgs","repos_url":"https://api.github.com/users/ralph-nj/repos","events_url":"https://api.github.com/users/ralph-nj/events{/privacy}","received_events_url":"https://api.github.com/users/ralph-nj/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2015-10-10T05:16:45Z","updated_at":"2015-10-10T05:18:37Z","closed_at":null,"body":"At first , we could have a look at the implementation of function visit.\r\n<pre>\r\ndef visit(self, url):\r\n        self.connect(url)\r\n        self.ensure_success_response()\r\n        self.driver.get(url)\r\n</pre>\r\nThere are three steps in this function,\r\nfirst try to connect\r\nsecond ensure_success_response , this steps is used to check response code.\r\nat last , call selenium api to open url\r\n\r\nAbout checking response code , my opinion is sometimes strict check isn't necessary.\r\nexample , use IIS to do authentification , we need open the page to test logon , but splinter check the response code and find it's 401, so raised , it's not a good idea.\r\nit's the code of checking response \r\n<pre>\r\nif self.code in self.http_errors:\r\n            raise HttpResponseError(self.code, self.reason)\r\n\r\nhttp_errors = (400, 401, 402, 403, 404, 405, 406, 407, 408, 409, 410, 411,\r\n                   412, 413, 414, 415, 416, 417, 500, 501, 502, 503, 504, 505)\r\n</pre>\r\n\r\nSo , I think ,we can add an option to choose strict check or simple check .Anyway , visit function can't block user's action,"},"comment":{"url":"https://api.github.com/repos/cobrateam/splinter/issues/comments/147040505","html_url":"https://github.com/cobrateam/splinter/issues/439#issuecomment-147040505","issue_url":"https://api.github.com/repos/cobrateam/splinter/issues/439","id":147040505,"user":{"login":"ralph-nj","id":15059255,"avatar_url":"https://avatars.githubusercontent.com/u/15059255?v=3","gravatar_id":"","url":"https://api.github.com/users/ralph-nj","html_url":"https://github.com/ralph-nj","followers_url":"https://api.github.com/users/ralph-nj/followers","following_url":"https://api.github.com/users/ralph-nj/following{/other_user}","gists_url":"https://api.github.com/users/ralph-nj/gists{/gist_id}","starred_url":"https://api.github.com/users/ralph-nj/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ralph-nj/subscriptions","organizations_url":"https://api.github.com/users/ralph-nj/orgs","repos_url":"https://api.github.com/users/ralph-nj/repos","events_url":"https://api.github.com/users/ralph-nj/events{/privacy}","received_events_url":"https://api.github.com/users/ralph-nj/received_events","type":"User","site_admin":false},"created_at":"2015-10-10T05:18:37Z","updated_at":"2015-10-10T05:18:37Z","body":"it's raise output\r\n<pre>\r\nTraceback (most recent call last):\r\n  File \"xxxx.py\", line x, in <module>\r\n    browser.visit(\"http://xxxx/\")\r\n  File \"build\\bdist.win32\\egg\\splinter\\driver\\webdriver\\__init__.py\", line 181, in visit\r\n    self.ensure_success_response()\r\n  File \"build\\bdist.win32\\egg\\splinter\\request_handler\\request_handler.py\", line 39, in ensure_success_response\r\n    self.status_code.is_valid_response()\r\n  File \"build\\bdist.win32\\egg\\splinter\\request_handler\\status_code.py\", line 53, in is_valid_response\r\n    raise HttpResponseError(self.code, self.reason)\r\nHttpResponseError: 401 - Unauthorized\r\n</pre>"}}