SessionNotCreatedException: Message: session not created from disconnected: unable to connect to renderer with ChromeDriver 2.45 Chrome v71

This error message…

selenium.common.exceptions.SessionNotCreatedException: Message: session not created
from disconnected: unable to connect to renderer

…implies that the ChromeDriver was unable to initiate/spawn a new WebBrowser i.e. Chrome Browser session.

You need to consider a fact:

  • As you are using Mac OS X the Key executable_path must be supported with a Value as :

    '/Users/qa/Documents/Python/chromedriver'
    
  • So line will be:

    driver = webdriver.Chrome(executable_path="/Users/qa/Documents/Python/chromedriver")
    

Note: The path itself is a raw path so you don’t need to add the switch r and drop it.

Additionally, ensure that /etc/hosts on your system contains the following entry :

127.0.0.1 localhost.localdomain localhost
#or
127.0.0.1 localhost loopback

Leave a Comment