在 webdriver.Chrome() 函数中,参数可以是以下之一:

  1. executable_path (str): Chrome 驱动程序的路径。
  2. port (int): Chrome 远程调试端口。
  3. options (Options): ChromeOptions 对象,用于配置 Chrome 的启动选项。
  4. service_args (List[str]): ChromeDriver 服务的启动参数。
  5. desired_capabilities (Dict[str, Any]): Chrome 的所需 capabilities。
  6. service_log_path (str): ChromeDriver 服务的日志文件路径。
  7. chrome_options (Options): 已弃用的参数,用于配置 Chrome 的启动选项。

一般来说,最常用的参数是 executable_path 和 options,其中 executable_path 是必需的,用于指定 Chrome 驱动程序的路径,而 options 则是可选的,用于配置 Chrome 的启动选项

webdriverChrome括号里的参数是什么

原文地址: https://www.cveoy.top/t/topic/iDaV 著作权归作者所有。请勿转载和采集!

免费AI点我,无需注册和登录