Skip to content

[🐛 Bug]: After installing webdriver for chrome, getting exception in running Selenium with Python #1307

@surbhiahuja

Description

@surbhiahuja

What happened?

Code used:

from selenium import webdriver
from selenium.webdriver.common.by import By

def test_eight_components():
driver = webdriver.Chrome()

driver.get("https://www.selenium.dev/selenium/web/web-form.html")

title = driver.title
assert title == "Web form"

driver.implicitly_wait(0.5)

text_box = driver.find_element(by=By.NAME, value="my-text")
submit_button = driver.find_element(by=By.CSS_SELECTOR, value="button")

text_box.send_keys("Selenium")
submit_button.click()

message = driver.find_element(by=By.ID, value="message")
value = message.text
assert value == "Received!"

driver.quit()

test_eight_components()

Expected Result: Chrome driver should open
Actual Result: Getting, selenium.common.exceptions.WebDriverException: Message: unknown error: cannot find Chrome binary

Screenshot 2023-02-13 at 9 56 13 AM

What browsers and operating systems are you seeing the problem on?

environment details:
macOS Monterey, version: 12.4
Google chrome : Version 110.0.5481.77 (Official Build) (arm64)
chrome Driver: https://chromedriver.storage.googleapis.com/index.html?path=110.0.5481.77/
Selenium installed using pip3 install selenium

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions