title: Broken pipe error selenium webdriver, when there is a gap between commands?
body: <p><code>Ubuntu 18.x + selenium webdriver(Firefox)</code></p>
  
  <p>Facing a weird problem, the following block works if I <code>run</code> all of it together </p>
  
  <pre><code>from selenium import webdriver
  url = 'https://indiamart.com'
  driver = webdriver.Firefox()
  driver.get(url)
  driver.find_element_by_xpath(xpath).click()
  </code></pre>
  
  <p>This is happening with every <code>url</code> I have tried.  </p>
  
  <p>However if I execute one line at a time, it gives</p>
  
  <pre><code>Traceback (most recent call last):
    File "&lt;input&gt;", line 1, in &lt;module&gt;
    File "/media/lib/python3.6/site-packages/selenium/webdriver/remote/webdriver.py", line 326, in get
      self.execute(Command.GET, {'url': url})
    File "/media/lib/python3.6/site-packages/selenium/webdriver/remote/webdriver.py", line 312, in execute
      response = self.command_executor.execute(driver_command, params)
    File "/media/lib/python3.6/site-packages/selenium/webdriver/remote/remote_connection.py", line 472, in execute
      return self._request(command_info[0], url, body=data)
    File "/media/lib/python3.6/site-packages/selenium/webdriver/remote/remote_connection.py", line 495, in _request
      self._conn.request(method, parsed_url.path, body, headers)
    File "/usr/lib/python3.6/http/client.py", line 1239, in request
      self._send_request(method, url, body, headers, encode_chunked)
    File "/usr/lib/python3.6/http/client.py", line 1285, in _send_request
      self.endheaders(body, encode_chunked=encode_chunked)
    File "/usr/lib/python3.6/http/client.py", line 1234, in endheaders
      self._send_output(message_body, encode_chunked=encode_chunked)
    File "/usr/lib/python3.6/http/client.py", line 1065, in _send_output
      self.send(chunk)
    File "/usr/lib/python3.6/http/client.py", line 986, in send
      self.sock.sendall(data)
  BrokenPipeError: [Errno 32] Broken pipe
  </code></pre>
  
  <p>This is the <code>error</code> on the <code>code</code></p>
  
  <p><code>driver.get(url)</code></p>
  
  <p>However if I execute the same line again after the <code>Broken Pipe error</code> it works and gets the <code>url</code>.</p>
  
  <p>I am very very confused. Can someone help me out.</p>
  
  <p>Thanks</p>