{
  "id": "python/pytest-selenium-webdriver-exception",
  "signature": "selenium.common.exceptions.WebDriverException: Message: 'chromedriver' executable needs to be in PATH.",
  "signature_zh": "selenium.common.exceptions.WebDriverException: 消息: 'chromedriver' 可执行文件需要在 PATH 中。",
  "regex": "selenium\\.common\\.exceptions\\.WebDriverException:\\ Message:\\ 'chromedriver'\\ executable\\ needs\\ to\\ be\\ in\\ PATH\\.",
  "domain": "python",
  "category": "system_error",
  "subcategory": null,
  "root_cause": "Selenium cannot find the ChromeDriver executable. This occurs when ChromeDriver is not installed, not in PATH, or the version is incompatible with the installed Chrome browser.",
  "root_cause_type": "generic",
  "root_cause_zh": "Selenium 找不到 ChromeDriver 可执行文件。这发生在 ChromeDriver 未安装、不在 PATH 中，或版本与已安装的 Chrome 浏览器不兼容时。",
  "versions": [
    {
      "version": "3.x",
      "introduced": null,
      "deprecated": null,
      "removed": null,
      "behavior_change": null,
      "status": "active"
    }
  ],
  "os_specific": {},
  "dead_ends": [
    {
      "action": "",
      "why_fails": "If the version is incompatible with Chrome, Selenium will still fail with a different error.",
      "fail_rate": 0.7,
      "condition": "",
      "sources": []
    },
    {
      "action": "",
      "why_fails": "This relies on PATH and may fail if chromedriver is not installed system-wide.",
      "fail_rate": 0.8,
      "condition": "",
      "sources": []
    },
    {
      "action": "",
      "why_fails": "Does not solve the missing driver issue and may introduce other incompatibilities.",
      "fail_rate": 0.9,
      "condition": "",
      "sources": []
    }
  ],
  "workarounds": [
    {
      "action": "",
      "success_rate": 0.98,
      "how": "pip install webdriver-manager\nfrom selenium import webdriver\nfrom webdriver_manager.chrome import ChromeDriverManager\n\ndriver = webdriver.Chrome(ChromeDriverManager().install())",
      "condition": "",
      "sources": []
    },
    {
      "action": "",
      "success_rate": 0.9,
      "how": "driver = webdriver.Chrome(executable_path='/path/to/chromedriver')",
      "condition": "",
      "sources": []
    },
    {
      "action": "",
      "success_rate": 0.95,
      "how": "Check Chrome version: chrome://version/\nDownload matching ChromeDriver from https://chromedriver.chromium.org/",
      "condition": "",
      "sources": []
    }
  ],
  "workarounds_zh": [],
  "transition_graph": {
    "leads_to": [],
    "preceded_by": [],
    "frequently_confused_with": []
  },
  "official_doc_url": null,
  "official_doc_section": null,
  "error_code": null,
  "verification_tier": "ai_generated",
  "confidence": 0.87,
  "fix_success_rate": 0.8,
  "resolvable": "true",
  "first_seen": "2025-05-05",
  "last_confirmed": "2025-01-01",
  "last_updated": "2025-01-01",
  "evidence_count": 0,
  "tags": [],
  "locale": "en",
  "aliases": []
}