webdriverChrome括号里的参数是什么
在 webdriver.Chrome() 函数中,参数可以是以下之一:
- executable_path (str): Chrome 驱动程序的路径。
- port (int): Chrome 远程调试端口。
- options (Options): ChromeOptions 对象,用于配置 Chrome 的启动选项。
- service_args (List[str]): ChromeDriver 服务的启动参数。
- desired_capabilities (Dict[str, Any]): Chrome 的所需 capabilities。
- service_log_path (str): ChromeDriver 服务的日志文件路径。
- chrome_options (Options): 已弃用的参数,用于配置 Chrome 的启动选项。
一般来说,最常用的参数是 executable_path 和 options,其中 executable_path 是必需的,用于指定 Chrome 驱动程序的路径,而 options 则是可选的,用于配置 Chrome 的启动选项
原文地址: https://www.cveoy.top/t/topic/iDaV 著作权归作者所有。请勿转载和采集!