title: Python Selenium: How to make browser window not open
body: <p>how to make selenium window not open? i don't want see open window, but i need use selenium, because i need get info about headers, who load very slow.
  Code:</p>
  <pre><code>from selenium import webdriver
  from selenium.webdriver.common.keys import Keys
  import time 
  from selenium.webdriver.common.by import By
  from selenium.webdriver.support.ui import WebDriverWait
  from selenium.webdriver.support import expected_conditions as EC
  
  PATH =&quot;.\msedgedriver.exe&quot;
  driver = webdriver.Edge(PATH)
  
  driver.get(&quot;https://www.verivox.de/stromvergleich/vergleich/#/?plz=10555&amp;persons=on&amp;usage=3500&amp;bonus=OnlyCompliant&amp;profile=H0&amp;product=electricity&amp;source=1&amp;q=WzYsMCwxLDEsMSwxLDEsMiwyMCwwLDEsNzQxMTIyLCI3MTA4NSIsMSwyNDAsMjQwLDM1MDAsMCwwLDAsOTk5LC0xLC0xLC0xLDAsMCwiVG90YWxDb3N0cyIsIkFzY2VuZGluZyIsIk5vbmUiLDM4LCJBbm51YWxDb3N0VmlldyIsMF0%3D&amp;partnerid=1&quot;)
  
  
  allheader=WebDriverWait(driver,20).until(EC.visibility_of_all_elements_located((By.CSS_SELECTOR,&quot;li[class='result-item'] .result-name-area&gt;.result-name&quot;)))
  for header in allheader:
       print(&quot;Header: &quot; + header.text)
  </code></pre>
  <p>i was try use <code>phantonJS()</code> but hten my code not working and getting</p>
  <pre><code>UserWarning: Selenium support for PhantomJS has been deprecated, please use headless versions of Chrome or Firefox instead
    warnings.warn('Selenium support for PhantomJS has been deprecated, please use headless '
  </code></pre>
  <p>i was trying use <code>xvfbwrapper</code> too, but getting error</p>
  <pre><code>Traceback (most recent call last):
    File &quot;skriptas.py&quot;, line 8, in &lt;module&gt;
      from xvfbwrapper import Xvfb
    File &quot;C:\Users\andri\AppData\Roaming\Python\Python38\site-packages\xvfbwrapper.py&quot;, line 15, in &lt;module&gt;
      import fcntl
  ModuleNotFoundError: No module named 'fcntl'
  </code></pre>
  <p>Any idea how to do it? Thank you for help.</p>