这个是python+selenium之获取当前url和title
#coding=utf-8
from selenium import webdriver
import time
driver = webdriver.Firefox()
driver.get('http://www.baidu.com')
print('Srate test=================')
title = driver.title
print(title)
#获取当前页面标题
now_url = driver.current_url
print(now_url)
#获取当前页面URL
print('End test=================')
time.sleep(2)
#等等4秒
driver.quit()
#关闭浏览器