title: MaxRetryError: HTTPConnectionPool: Max retries exceeded (Caused by ProtocolError('Connection aborted.', error(111, 'Connection refused')))
body: <p>I have one question:I want to test &quot;select&quot; and &quot;input&quot;.can I write it like the code below:
  original code:</p>
  <pre><code> 12 class Sinaselecttest(unittest.TestCase):
   13 
   14     def setUp(self):
   15         binary = FirefoxBinary('/usr/local/firefox/firefox')
   16         self.driver = webdriver.Firefox(firefox_binary=binary)
   17 
   18     def test_select_in_sina(self):
   19         driver = self.driver
   20         driver.get(&quot;https://www.sina.com.cn/&quot;)
   21         try:
   22             WebDriverWait(driver,30).until(
   23                 ec.visibility_of_element_located((By.XPATH,&quot;/html/body/div[9]/div/div[1]/form/div[3]/input&quot;))
   24             )
   25         finally:
   26             driver.quit()
   # #测试select功能
   27         select=Select(driver.find_element_by_xpath(&quot;//*[@id='slt_01']&quot;)).select_by_value(&quot;微博&quot;)
   28         element=driver.find_element_by_xpath(&quot;/html/body/div[9]/div/div[1]/form/div[3]/input&quot;)
   29         element.send_keys(&quot;杨幂&quot;)
   30         driver.find_element_by_xpath(&quot;/html/body/div[9]/div/div[1]/form/input&quot;).click()
   31         driver.implicitly_wait(5)
  
   32    def tearDown(self):
   33        self.driver.close()
  </code></pre>
  <p>I want to test Selenium &quot;select&quot; function.so I choose sina website to select one option and input text in textarea.then search it .but when I run this test,it has error:</p>
  <pre><code> Traceback (most recent call last):
        File &quot;test_sina_select.py&quot;, line 32, in tearDown
          self.driver.close()
        File &quot;/usr/lib/python2.7/site-packages/selenium/webdriver/remote/webdriver.py&quot;, line 688, in close
          self.execute(Command.CLOSE)
        File &quot;/usr/lib/python2.7/site-packages/selenium/webdriver/remote/webdriver.py&quot;, line 319, in execute
          response = self.command_executor.execute(driver_command, params)
        File &quot;/usr/lib/python2.7/site-packages/selenium/webdriver/remote/remote_connection.py&quot;, line 376, in execute
          return self._request(command_info[0], url, body=data)
        File &quot;/usr/lib/python2.7/site-packages/selenium/webdriver/remote/remote_connection.py&quot;, line 399, in _request
          resp = self._conn.request(method, url, body=body, headers=headers)
        File &quot;/usr/lib/python2.7/site-packages/urllib3/request.py&quot;, line 68, in request
          **urlopen_kw)
        File &quot;/usr/lib/python2.7/site-packages/urllib3/request.py&quot;, line 81, in request_encode_url
          return self.urlopen(method, url, **urlopen_kw)
        File &quot;/usr/lib/python2.7/site-packages/urllib3/poolmanager.py&quot;, line 247, in urlopen
          response = conn.urlopen(method, u.request_uri, **kw)
        File &quot;/usr/lib/python2.7/site-packages/urllib3/connectionpool.py&quot;, line 617, in urlopen
          release_conn=release_conn, **response_kw)
        File &quot;/usr/lib/python2.7/site-packages/urllib3/connectionpool.py&quot;, line 617, in urlopen
          release_conn=release_conn, **response_kw)
        File &quot;/usr/lib/python2.7/site-packages/urllib3/connectionpool.py&quot;, line 617, in urlopen
          release_conn=release_conn, **response_kw)
        File &quot;/usr/lib/python2.7/site-packages/urllib3/connectionpool.py&quot;, line 597, in urlopen
          _stacktrace=sys.exc_info()[2])
        File &quot;/usr/lib/python2.7/site-packages/urllib3/util/retry.py&quot;, line 271, in increment
          raise MaxRetryError(_pool, url, error or ResponseError(cause))
      MaxRetryError: HTTPConnectionPool(host='127.0.0.1', port=51379): Max retries exceeded with url: /session/2e64d2a1-3c7f-4221-96fe-9d0b1c102195/window (Caused by ProtocolError('Connection aborted.', error(111, 'Connection refused')))
      
      ----------------------------------------------------------------------
      Ran 1 test in 72.106s
  </code></pre>
  <p>who can tell me why?thanks</p>