{
  "id": "python/pytest-selenium-webdriver-error",
  "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 does not match the installed Chrome browser.",
  "root_cause_type": "generic",
  "root_cause_zh": "Selenium 无法找到 ChromeDriver 可执行文件。这发生在 ChromeDriver 未安装、不在 PATH 中，或版本与已安装的 Chrome 浏览器不匹配时。",
  "versions": [
    {
      "version": "4.x",
      "introduced": null,
      "deprecated": null,
      "removed": null,
      "behavior_change": null,
      "status": "active"
    }
  ],
  "os_specific": {},
  "dead_ends": [
    {
      "action": "",
      "why_fails": "This makes tests non-portable and breaks on other machines or CI environments with different paths.",
      "fail_rate": 0.8,
      "condition": "",
      "sources": []
    },
    {
      "action": "",
      "why_fails": "This works locally but is not reproducible. The driver may be outdated or incompatible with the browser version.",
      "fail_rate": 0.7,
      "condition": "",
      "sources": []
    }
  ],
  "workarounds": [
    {
      "action": "",
      "success_rate": 0.95,
      "how": "from selenium import webdriver\nfrom webdriver_manager.chrome import ChromeDriverManager\nfrom selenium.webdriver.chrome.service import Service\n\ndriver = webdriver.Chrome(service=Service(ChromeDriverManager().install()))",
      "condition": "",
      "sources": []
    },
    {
      "action": "",
      "success_rate": 0.92,
      "how": "from selenium import webdriver\n\ndriver = webdriver.Chrome()  # Auto-downloads driver",
      "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.89,
  "fix_success_rate": 0.8,
  "resolvable": "true",
  "first_seen": "2024-04-17",
  "last_confirmed": "2025-01-01",
  "last_updated": "2025-01-01",
  "evidence_count": 0,
  "tags": [],
  "locale": "en",
  "aliases": []
}