1.检查chrome浏览器版本 帮助->关于
2.登陆https://sites.google.com/a/chromium.org/chromedriver/downloads 网页下载对应的chromedriver包
3.解压到python安装目录下的Scripts中
4.完毕
试运行:
from selenium import webdriver
import time
def main():
web=webdriver.Chrome()
web.get('http://www.baidu.com')
time.sleep(5)
web.quit()
if __name__ == '__main__':
main()
chrome浏览器自动打开百度页面