close

[Solved] ChromeDriverManager().install() Is Giving KeyError: ‘google-chrome’

I am trying to use ChromeDriverManager().install() But I am facing the following error: ChromeDriverManager().install() Is Giving KeyError: ‘google-chrome’ in python. In this Exerror article, We are going to learn about How to reproduce this error and we will discuss All Possible Solutions Let’s Get Started with This Article.

How ChromeDriverManager().install() Is Giving KeyError: ‘google-chrome’ Error Occurs?

I am trying to use ChromeDriverManager().install() But I am facing the following error:

KeyError: 'google-chrome'

So here I am writing all the possible solutions that I have tried to resolve this error.

How To Solve ChromeDriverManager().install() Is Giving KeyError: ‘google-chrome’ Error?

  1. How To Solve ChromeDriverManager().install() Is Giving KeyError: 'google-chrome' Error?

    To Solve ChromeDriverManager().install() Is Giving KeyError: 'google-chrome' Error You Just need to update or Install webdriver-manager and selenium By running this command. First of All Install webdriver-manager latest version. Run this command: pip install webdriver-manager Then Install Selenium latest version by running this command: pip install selenium And Now, Your error must be solved.

  2. ChromeDriverManager().install() Is Giving KeyError: 'google-chrome'

    To Solve ChromeDriverManager().install() Is Giving KeyError: 'google-chrome' Error You Just need to update or Install webdriver-manager and selenium By running this command. First of All Install webdriver-manager latest version. Run this command: pip install webdriver-manager Then Install Selenium latest version by running this command: pip install selenium And Now, Your error must be solved.

Solution 1: Install webdriver-manager and selenium

You Just need to update or Install webdriver-manager and selenium By running this command. First of All Install webdriver-manager latest version. Run this Command.

pip install webdriver-manager

Then Install Selenium latest version by running this command.

pip install selenium

And Now, Your error must be solved.

Solution 2: Use This Code

If you are Using Selenium 3 Then Use This Code.

# selenium 3
from selenium import webdriver
from webdriver_manager.chrome import ChromeDriverManager

driver = webdriver.Chrome(ChromeDriverManager().install())

And If You are using Selenium 4 Then Use This code.

# selenium 4
from selenium import webdriver
from selenium.webdriver.chrome.service import Service as ChromeService
from webdriver_manager.chrome import ChromeDriverManager

driver = webdriver.Chrome(service=ChromeService(ChromeDriverManager().install()))

Now, Your error Must be solved.

Conclusion

It’s all About this error. I hope We Have solved Your error. Comment below Your thoughts and your queries. Also, Comment below which solution worked for you?

Also, Read

Leave a Comment