import time
from selenium import webdriver
# browser = webdriver.Chrome()
# browser.get('http://www.baidu.com/')
driver = webdriver.Chrome()
driver.get('http://gs.swjtu.edu.cn/ws/gsedu')
input_id = driver.find_element_by_name('userid')
input_id.send_keys('2016210586')
input_pwd = driver.find_element_by_name('userpwd')
input_pwd.send_keys('********') #填入密碼
login_btn = driver.find_element_by_id("content_login").find_elements_by_tag_name("div")[2].find_element_by_tag_name("input")
login_btn.click()
time.sleep(5)#頁(yè)面如果還沒(méi)加載出來(lái)缰雇,就會(huì)報(bào)錯(cuò)
search_window = driver.current_window_handle#頁(yè)面跳轉(zhuǎn)
element = driver.find_element_by_xpath('//*[@id="ucenter_member_home_index_skin_content_content"]/div[3]/div[1]/div[1]/div[1]/label')
day = element.text
driver.close()
print(day)