1.添加环境变量:"SELENIUM_SERVER_JAR":
a. 下载selenium-server-standalone-2.20.0.jar(链接:http://code.google.com/p/selenium/downloads/list )到本地,此处假设路径为:d:\selenium-server-standalone-2.20.0.jar b.进入控制面板->系统和安全->系统->高级系统设置->环境变量->在"系统变量"下点击新建->变量名: SELENIUM_SERVER_JAR,变量值:d:\selenium-server-standalone-2.20.0.jar ->确定2.实例OperaDriver:
from selenium import webdriverdriver = webdriver.Opera()
Done!