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

放假了,没人看博客了

相关推荐
linweidong5 小时前
实战救火型 从 500MB 降到 50MB:高频业务场景下的 iOS 内存急救与避坑指南
macos·ios·objective-c·cocoa·ios面试·nstimer·ios面经
网络研究院6 小时前
苹果修复了iOS系统中两个被定向攻击利用的零日漏洞
macos·ios·cocoa
The Electronic Cat10 小时前
树莓派安装nginx
运维·chrome·nginx
suoyue_zhan11 小时前
GBase 8s V8.8 安装部署实践指南
前端·数据库·chrome
嘻哈baby12 小时前
Let‘s Encrypt免费证书与HTTPS配置完全指南
chrome·网络协议·https
西京刀客13 小时前
Mac下ssh终端之iTerm2 (Oh My Zsh + powerlevel10k)
运维·macos·ssh·iterm2
qq_401700411 天前
嵌入式Linux网口MAC地址修改
linux·运维·macos
搬山境KL攻城狮1 天前
记-SPA单页面应用Chrome自动翻译导致中文错别字问题
前端·chrome
天庭鸡腿哥1 天前
无须激活,安装即是Pro版!
microsoft·macos·visual studio·everything
肠胃炎1 天前
Chrome扩展截图功能实现
前端·chrome