#!/usr/bin/python
# -*- coding: UTF-8 -*-
# author zhangchao 2015-06-20
from selenium import webdriver
from selenium.webdriver.common.keys import Keys
from Tkconstants import BROWSE
from selenium.webdriver.common.action_chains import ActionChains
import time
import sys
import selenium
import re
from selenium.selenium import selenium
reload(sys)
sys.setdefaultencoding(‘utf-8‘)
piaojuke.find_element_by_id("login_account").send_keys(loginname)
piaojuke.find_element_by_xpath("//input[@id=‘login_password‘]").send_keys(password)
xuanting=ActionChains(piaojuke)
a=piaojuke.find_element_by_xpath("//li[@class=‘uname‘]")
xuanting.move_to_element(a).perform()
time.sleep(5)
piaojuke.find_element_by_xpath("//li[@class=‘umess hidden‘]").click()
piaojuke.find_element_by_link_text("银票宝").click()
true_order=piaojuke.find_element_by_class_name("number").text
url=piaojuke.current_url
order=re.compile("RG_[0-9]{16}")
bill_order=order.search(url).group()
return bill_order