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 (四)

放假了,没人看博客了

相关推荐
Tr2e3 小时前
🐱 从 0 到 1:用 Swift 手搓一个 macOS 桌面宠物(附源码)
macos·ios·swift
Mac技巧大咖6 小时前
macOS 27 或成 Intel Mac 分水岭:老款 Mac 用户升级前要注意什么?
macos·macos 27
上天_去_做颗惺星 EVE_BLUE8 小时前
【新 Linux 服务器上手全攻略】系统巡检、存储规划与开发环境初始化
linux·运维·服务器·ubuntu·macos·centos
REDcker8 小时前
WWDC2026系统更新综述
macos·ios·开发者·apple·wwdc·ipados·wwdc2026
Sammyyyyy10 小时前
2026 Mac 本地大模型部署深度解析与混合架构指南
数据库·人工智能·macos·ai·架构·servbay
亚林瓜子10 小时前
mac自动启动位置
macos
zahuilg1010 小时前
Mac原生终端SSH一键快捷连接|无需装软件、极简安装、快速上手
macos·ssh·github·终端
IT界的老黄牛10 小时前
手机 Chrome 远程调试实战:adb + DevTools,localhost 就是你的测试服
chrome·测试工具·adb
HelloWorld工程师11 小时前
网站开启HTTPS:2步解决Chrome“不安全”提示
chrome·网络协议·https·ssl
2501_9159214312 小时前
uni-app 上架 iOS 的完整流程(无需依赖 Mac)
android·macos·ios·小程序·uni-app·iphone·webview