macOS+python3+selenium+chromedriver
阿新 • • 發佈:2018-11-11
macOS selenium 開發環境
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 ("測試")
參考: