- Python+Selenium环境搭建与验证
- 1.安装Selenium
- 2.安装Chrome浏览器
- 2.1安装
- 2.2查看版本
- 3.安装Chrome driver
- 3.1下载地址
- 3.2放置位置
- 4.验证
- 4.1代码
- 4.2结果
2.安装Chrome浏览器 2.1安装pip install selenium==3.14.0
- 略
-
http://chromedriver.storage.googleapis.com/
from selenium import webdriver
dir = webdriver.Chrome()
dir.get("https:\www.baidu.com")
- 若浏览器驱动放在python的安装路径下,则需要在webdriver.Chrome(webdriver_path)中加入webdriver的路径;如果还找不到,需要将webdriver_path加入系统的Path路径



