selenium指定驱动路径

 

from selenium import webdriver
a = webdriver.Firefox(executable_path="/usr/local/bin/geckodriver") # 路径根据自己的修改
a.get('http://www.baidu.com')
print(a.title)
a.quit()

 

posted @ 2017-11-30 16:48  Nathaniel-J  阅读(2222)  评论(0编辑  收藏  举报