macOS - 使用 chromedriver

文章目录

    • [下载对应的 chromedriver](#下载对应的 chromedriver)

下载 Chrome

https://www.google.com/chrome/


查看 版本


下载对应的 chromedriver

http://chromedriver.storage.googleapis.com/index.html
https://chromedriver.chromium.org/downloads


移动

shell 复制代码
sudo mv chromedriver /usr/local/bin/ 

shell 复制代码
$ chromedriver --version
ChromeDriver 114.0.5735.90 (386bc09e8f4f2e025eddae123f36f6263096ae49-refs/branch-heads/5735@{#1052})

$ chromedriver -h
Usage: chromedriver [OPTIONS]

Options
  --port=PORT                     port to listen on
  --adb-port=PORT                 adb server port
  --log-path=FILE                 write server log to file instead of stderr, increases log level to INFO
  --log-level=LEVEL               set log level: ALL, DEBUG, INFO, WARNING, SEVERE, OFF
  --verbose                       log verbosely (equivalent to --log-level=ALL)
  --silent                        log nothing (equivalent to --log-level=OFF)
  --append-log                    append log file instead of rewriting
  --replayable                    (experimental) log verbosely and don't truncate long strings so that the log can be replayed.
  --version                       print the version number and exit
  --url-base                      base URL path prefix for commands, e.g. wd/url
  --readable-timestamp            add readable timestamps to log
  --enable-chrome-logs            show logs from the browser (overrides other logging options)
  --bidi-mapper-path              custom bidi mapper path
  --allowed-ips=LIST              comma-separated allowlist of remote IP addresses which are allowed to connect to ChromeDriver
  --allowed-origins=LIST          comma-separated allowlist of request origins which are allowed to connect to ChromeDriver. Using `*` to allow any host origin is dangerous!

小发现

在低版本的 chromedriver ,如 90.x 上,使用 selenium,a 标签不可 click;在 99.x 就可以。


伊织 2023-09-28 (四)

放假了,没人看博客了

相关推荐
liangshanbo12156 小时前
[特殊字符] Yazi 终极指南:从安装到精通 (macOS 专属)
macos
袁庭新6 小时前
M系列芯片Mac上通过Homebrew一键安装/卸载Nginx并上线项目全指南
运维·nginx·macos·袁庭新·袁庭新ai
dys_Codemonkey6 小时前
ROS 2 环境配置与 Shell 配置文件详解(zsh/bash)ROS 2 多工作空间规范配置
开发语言·chrome·bash
北冥有鱼被烹7 小时前
【vibo经验记录】Mac 配置 Claude Code + 远程 Ollama 完全指南
macos·claude code·openclaw
无巧不成书02188 小时前
FFmpeg 保姆级安装教程!Windows/macOS/Linux全平台覆盖,
windows·macos·ffmpeg
I'm Jie9 小时前
MacOS 国内镜像一键安装 Homebrew
git·macos·homebrew
lucky_syq9 小时前
Mac电脑部署OpenClaw保姆级教程(2026最新版)
人工智能·macos·开源·电脑·openclaw
todoitbo19 小时前
用虚拟局域网打通 Win/Mac/Linux 三端:跨设备协作的实用方案
linux·运维·macos
姓王名礼1 天前
一份 Windows/macOS/Linux 完整安装 + 运行 + 对接 WebUI 的步骤
linux·windows·macos
zhensherlock1 天前
Protocol Launcher 系列:App Store 精准引流与应用推广
javascript·macos·ios·typescript·iphone·mac·ipad