macOS+python3+selenium+chromedriver

macOS selenium 开发环境

  • 1,selenium安装
  • 2,chromedriver下载
  • 3,chromedriver配置

1,selenium安装

pip3 search selenium
pip3 install selenium
pip3 show selenium

2,chromedriver下载

chromedriver_mac64.zip 下载
ChromeDriver - WebDriver for Chrome

3,chromedriver配置

mv chromedriver /usr/local/bin/
chromedriver --version

测试

#! /usr/local/bin/python3
# coding:utf-8

from selenium import webdriver
from time import sleep

driver = webdriver.Chrome()
url = "http://www.baidu.com"
driver.get(url)
sleep(5)
driver.quit()

print ("测试")

macOS+python3+selenium+chromedriver_第1张图片
参考:

  1. mac os+selenium2+chrome驱动+python3
  2. 2018 Mac 安装Chromedriver及配置
  3. ChromeDriver - 适用于Chrome的WebDriver

你可能感兴趣的:(Mac,OS,python)