win7安装chromedriver
一.安装指定版本的Chrome
如下要求
chromedriver与chrome的对应关系表
chromedriver版本 支持的Chrome版本
v2.29 v56-58
v2.28 v55-57
v2.27 v54-56
v2.26 v53-55
v2.25 v53-55
详细见网址:http://blog.csdn/huilan_same/article/details/51896672
二.安装chromedriver
下载地址:http://npm.taobao/mirrors/chromedriver/
解压到指定目录:
例如:C:\Python\Python35\Scripts
三.测试代码
from selenium import webdriver
from selenium.webdrivermon.by import By
from selenium.webdrivermon.keys import Keys
from selenium.webdriver.support import expected_conditions as EC
from selenium.webdriver.support.wait import WebDriverWait
brower = webdriver.Chrome()
try:
brower.get('http://www.iqiyi')
widget_playcount = brower.find_element_by_id("widget-playcount")
print(widget_playcount.text)
print(brower.current_url)
finally:
brower.close()
OK完成
win7安装chromedriver
一.安装指定版本的Chrome
如下要求
chromedriver与chrome的对应关系表
chromedriver版本 支持的Chrome版本
v2.29 v56-58
v2.28 v55-57
v2.27 v54-56
v2.26 v53-55
v2.25 v53-55
详细见网址:http://blog.csdn/huilan_same/article/details/51896672
二.安装chromedriver
下载地址:http://npm.taobao/mirrors/chromedriver/
解压到指定目录:
例如:C:\Python\Python35\Scripts
三.测试代码
from selenium import webdriver
from selenium.webdrivermon.by import By
from selenium.webdrivermon.keys import Keys
from selenium.webdriver.support import expected_conditions as EC
from selenium.webdriver.support.wait import WebDriverWait
brower = webdriver.Chrome()
try:
brower.get('http://www.iqiyi')
widget_playcount = brower.find_element_by_id("widget-playcount")
print(widget_playcount.text)
print(brower.current_url)
finally:
brower.close()
OK完成