Я в замещательстве. Делаю все, как указаног в примере
# импорт библиотек
from selenium import webdriver
from bs4 import BeautifulSoup
from selenium.webdriver.common.by import By
chromedriver = r'c:\port\selenium\chrome\chromedriver.exe'
options = webdriver.ChromeOptions()
# options.add_argument('headless') # для открытия headless-браузера
options = webdriver.ChromeOptions()
options.add_argument('headless') # для открытия headless-браузера
#browser = webdriver.Chrome(executable_path=chromedriver, chrome_options=options)
browser = webdriver.Chrome(executable_path=chromedriver)
# browser = webdriver.Chrome(chromedriver)
# Переход на страницу входа
browser.get('https://www.pochta.ru/tracking#30000052425166')
# Поиск тегов по имени
browser.implicitly_wait(10)
WebElement = browser.find_element(By.CLASS_NAME, "TrackingCardMainInfo__Layout-sc-z7o53r-0 bHlmZW")
Однако выдает кучу каких-то непонятных ошибок, причем в модулях, которые подгружены
D:\_proekt\pythonProject\chromepost\venv\Scripts\python.exe D:/_proekt/pythonProject/chromepost/main.py
D:\_proekt\pythonProject\chromepost\main.py:12: DeprecationWarning: executable_path has been deprecated, please pass in a Service object
browser = webdriver.Chrome(executable_path=chromedriver)
Traceback (most recent call last):
File "D:\_proekt\pythonProject\chromepost\main.py", line 12, in <module>
browser = webdriver.Chrome(executable_path=chromedriver)
File "D:\_proekt\pythonProject\chromepost\venv\lib\site-packages\selenium\webdriver\chrome\webdriver.py", line 70, in __init__
super(WebDriver, self).__init__(DesiredCapabilities.CHROME['browserName'], "goog",
File "D:\_proekt\pythonProject\chromepost\venv\lib\site-packages\selenium\webdriver\chromium\webdriver.py", line 93, in __init__
RemoteWebDriver.__init__(
File "D:\_proekt\pythonProject\chromepost\venv\lib\site-packages\selenium\webdriver\remote\webdriver.py", line 268, in __init__
self.start_session(capabilities, browser_profile)
File "D:\_proekt\pythonProject\chromepost\venv\lib\site-packages\selenium\webdriver\remote\webdriver.py", line 359, in start_session
response = self.execute(Command.NEW_SESSION, parameters)
File "D:\_proekt\pythonProject\chromepost\venv\lib\site-packages\selenium\webdriver\remote\webdriver.py", line 424, in execute
self.error_handler.check_response(response)
File "D:\_proekt\pythonProject\chromepost\venv\lib\site-packages\selenium\webdriver\remote\errorhandler.py", line 247, in check_response
raise exception_class(message, screen, stacktrace)
selenium.common.exceptions.WebDriverException: Message: unknown error: cannot find Chrome binary
Stacktrace:
Backtrace:
Ordinal0 [0x009E6903+2517251]
Ordinal0 [0x0097F8E1+2095329]
Ordinal0 [0x00882848+1058888]
Ordinal0 [0x0089BC39+1162297]
Ordinal0 [0x0089A2CF+1155791]
Ordinal0 [0x008CAAAF+1354415]
Ordinal0 [0x008CA71A+1353498]
Ordinal0 [0x008C639B+1336219]
Ordinal0 [0x008A27A7+1189799]
Ordinal0 [0x008A3609+1193481]
GetHandleVerifier [0x00B75904+1577972]
GetHandleVerifier [0x00C20B97+2279047]
GetHandleVerifier [0x00A76D09+534521]
GetHandleVerifier [0x00A75DB9+530601]
Ordinal0 [0x00984FF9+2117625]
Ordinal0 [0x009898A8+2136232]
Ordinal0 [0x009899E2+2136546]
Ordinal0 [0x00993541+2176321]
BaseThreadInitThunk [0x756A6359+25]
RtlGetAppContainerNamedObjectPath [0x775E7B74+228]
RtlGetAppContainerNamedObjectPath [0x775E7B44+180]
Я в замешательстве... Файл драйвера размещен, путь прописан... В чем дело-то?