title: selenium.common.exceptions.SessionNotCreatedException: Message: session not created: No matching capabilities error with ChromeDriver Chrome Selenium
body: <p>First, machine and package specs:
  I am running:</p>
  
  <pre><code>ChromeDriver version 75.0.3770.140
  Selenium: version '3.141.0'
  WSL (linux subsystem) of windows 10
  </code></pre>
  
  <p>I am trying to run a chromebrowser through selenium. I found: <a href="https://stackoverflow.com/questions/53073411/selenium-webdriverexceptionchrome-failed-to-start-crashed-as-google-chrome-is">these</a> commands, to use selenium through google chrome. </p>
  
  <p>I have a test directory, with only the chromedriver binary file, and the script, in it. The location of the directory is: /home/kela/test_dir/</p>
  
  <p>I ran the code:</p>
  
  <pre><code>import selenium
  from selenium import webdriver
  from bs4 import BeautifulSoup
  from selenium.webdriver.firefox.options import Options
  from selenium.webdriver.firefox.firefox_binary import FirefoxBinary
  from selenium.webdriver.common.desired_capabilities import DesiredCapabilities
  
  
  options = Options()
  options.binary_location='/home/kela/test_dir/chromedriver'
  driver = webdriver.Chrome(chrome_options = options,executable_path='/home/kela/test_dir/chromedriver')
  </code></pre>
  
  <p>The output from this code is:</p>
  
  <pre><code>selenium.common.exceptions.SessionNotCreatedException: Message: session not created: No matching capabilities found
  </code></pre>
  
  <p>Can anyone explain why I need capabilities when the same script works for others without capabilities? I did try adding:</p>
  
  <pre><code>chrome_options.add_argument('--headless')
  chrome_options.add_argument('--no-sandbox')
  </code></pre>
  
  <p>but I got the same error. So I'm not sure what capabilities I need to add (considering it works for others without it?)</p>
  
  <p>Edit 1: Addressing DebanjanB's comments below:</p>
  
  <ol>
  <li><p>Chromedriver is in the expected location. I am using windows 10. From <a href="https://stackoverflow.com/questions/40674914/google-chrome-path-in-windows-10">here</a>, the expected location is C:\Program Files (x86)\Google\Chrome\Application\chrome.exe; and this is where it is on my machine (I copied and pasted this location from the chrome Properties table).</p></li>
  <li><p>ChromeDriver is having executable permission for non-root users. </p></li>
  </ol>
  
  <p><a href="https://i.stack.imgur.com/KAhnE.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/KAhnE.png" alt=""></a></p>
  
  <ol start="3">
  <li><p>I definitely have Google Chrome v75.0 installed (I can see that the Product version 75.0.3770.100)</p></li>
  <li><p>I am running the script as a non-root user, as my bash command line ends with a $ and not  # (i.e kela:~/test_dir$ and not kela:~/test_dir#)</p></li>
  </ol>
  
  <p>Edit 2: Based on DebanjanB's answer below, I am very close to having it working, but just not quite.</p>
  
  <p>The code:</p>
  
  <pre><code>import selenium
  from selenium import webdriver
  from bs4 import BeautifulSoup
  from selenium.webdriver.firefox.options import Options
  from selenium.webdriver.firefox.firefox_binary import FirefoxBinary
  from selenium.webdriver.common.desired_capabilities import DesiredCapabilities
  from selenium.webdriver.chrome.options import Options
  
  options = Options()
  options.binary_location='/c/Program Files (x86)/Google/Chrome/Application/chrome.exe'
  driver = webdriver.Chrome(options=options)
  driver.get('http://google.com/')
  </code></pre>
  
  <p>Produces a dialog box that reads:
  <code>Google Chrome cannot read and write to it's data directory: /tmp/.com/google.Chrom.gyw63s</code></p>
  
  <p>So then I double checked my Chrome permissions and I should be able to write to Chrome:
  <a href="https://i.stack.imgur.com/htxL9.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/htxL9.png" alt=""></a></p>
  
  <p>Also, I can see that /tmp/ has a bunch of .com dirs in it:</p>
  
  <pre><code>.com.google.Chrome.4jnWme/ .com.google.Chrome.FdNyKP/ .com.google.Chrome.VAcWMQ/ .com.google.Chrome.ZbkRx0/ .com.google.Chrome.iRrceF/
  .com.google.Chrome.A2QHHB/ .com.google.Chrome.G7Y51c/ .com.google.Chrome.WD8BtK/ .com.google.Chrome.cItmhA/ .com.google.Chrome.pm28hN/
  </code></pre>
  
  <p>However, since that seemed to be more of a warning than an error, I clicked 'ok' to close the dialog box, and a new tab does open in the browser; but the URL is just 'data:,'. The same thing happens if I remove the line 'driver.get('<a href="http://google.com" rel="nofollow noreferrer">http://google.com</a>')' from the script, so I know the warning/issue is with the line:</p>
  
  <pre><code>driver = webdriver.Chrome(chrome_options = options,executable_path='/home/kela/test_dir/chromedriver')
  </code></pre>
  
  <p>For example, from <a href="https://stackoverflow.com/questions/53599079/selenium-chromedriver-unable-to-set-user-data-dir">here</a>, I tried adding:</p>
  
  <pre><code>options.add_argument('--profile-directory=Default')
  </code></pre>
  
  <p>But the same warning pops up.</p>
  
  <p>Edit 3:</p>
  
  <p>As edit 3 was starting to veer into a different question than specifically being addressed here, I started a new question <a href="https://stackoverflow.com/questions/57114969/selenium-and-chrome-manifest-file-is-missing-or-unreadable">here</a>.</p>