Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Import "webdriver_manager.chrome" could not be resolved when using Selenium in VS Code

I'm trying to use Selenium to test a web app, and my tests are running smoothly using webdriver-manager. I already pip installed the webdriver_manager and selenium. I am using the chrome driver, so the first lines of my code are

from selenium import webdriver
from webdriver_manager.chrome import ChromeDriverManager

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

As I already said, the code runs and my tests are carried out. However, since I am using VS Code, the line webdriver_manager.chrome is highlighted in yellow with the warning Import "webdriver_manager.chrome" could not be resolved Pylance (reportMissingErrors).

Does anyone know how to remove this warning or how to fix it? Thanks so much in advance.

like image 528
Juan Pablo Naranjo Avatar asked Sep 07 '26 17:09

Juan Pablo Naranjo


1 Answers

Had the same problem. You should restart your VS Code, it worked for me.

like image 124
toribicks Avatar answered Sep 10 '26 06:09

toribicks



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!