I am creating an application that shall interact with websites, the important code is listed below. So when it comes to importing 'ChromeDriverManager' from 'webdriver_manager.chrome' I get the Error "unresolved reference 'webdriver_manager'" and "unresolved reference'ChromeDriverManager'". The problem is that I want to autoupdate the chromedriver and this was the solution I came up with but it won't work when running it in pycharm but when I run it from the console it would work...does anyone have a solution on this because I prefer to test out my code in pycharm than starting it from the console every time.
from selenium import webdriver
from webdriver_manager.chrome import ChromeDriverManager # important for chromedriver-autoinstall
import time
p= ChromeDriverManager()
chrome_options = webdriver.ChromeOptions()
chrome_options.add_experimental_option("useAutomationExtension", False)
chrome_options.add_experimental_option("excludeSwitches", ["enable-logging", "enable-automation"])
# disables 'Browser is managed by test software' and surpresses error with USB device
driver = webdriver.Chrome(executable_path=p.install(), options=chrome_options)
# see above + install right version of chromedriver
t = 2 # time to wait for input of number
i = 1 # current round
duration = 1
question from:
https://stackoverflow.com/questions/65940622/unresolved-reference-error-from-webdriver-manager-chrome-import-chromedriverm 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…