# -*- coding: utf-8 -*-
from selenium import webdriver
import selenium.webdriver.support.ui as ui
from selenium.webdriver.common.keys import Keys
def test1():
DEMO_PAGE = 'http://www.court.gov.cn/zgcpwsw/Html_Pages/eae8/eae8166f-1c9e-4a03-a10d-b86dde502047.html'
driver = webdriver.PhantomJS('C:/phantom/phantomjs-2.0.0-windows/bin/phantomjs.exe')
driver.get(DEMO_PAGE)
wait = ui.WebDriverWait(driver,10)
wait.until(lambda driver: driver.find_element_by_xpath("//div[@id='DivContent']/div[1]/a"))
divs = driver.find_elements_by_xpath("//div[@id='DivContent']/div")
for div in divs:
div_text = div.text
print div_text
driver.quit
test1()