selenium, firefox, python环境搭建指南

来源:互联网 发布:通联数据招聘 编辑:程序博客网 时间:2024/05/18 14:11

selenium-python学习文档(孔子云:熟读官方文档,则不惑矣)
http://selenium-python.readthedocs.io/

起因遇到如下错误,不知怎么解决。
geckodriverselenium.common.exceptions.WebDriverException: Message: ‘geckodriver’ executable needs to be in PATH。
环境信息:
windows:7(64位)
python: 2.7.11
selenium:3.0.2
firefox:50.1.0

解决之法:下载安装第三方驱动 geckodriver,解压得到可执行文件,放到PATH环境变量路径中。
http://docs.seleniumhq.org/download/
这里写图片描述

多去看源码,python本来就是脚本语言,所以它的源码都是可见的。比如你去看一看selenium-python的源码,对它所支持的操作什么的就有了非常清晰地了解。

0 0
原创粉丝点击