selenium webdriver 實例Opera w/python

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 ->肯定python

2.實例OperaDriver:web

from selenium import webdriver
driver = webdriver.Opera()

Done!安全

相關文章
相關標籤/搜索