__author__ = 'Administrator'
from selenium import webdriver
from selenium.webdriver.common.action_chains import ActionChains
import time
from selenium.webdriver.support.select import Select
import datetime
from custom_package import zhyw_login

driver = webdriver.Ie()
zhyw_login.Login().yw_login(driver, 13030101, 1)
'''
driver.get("http://192.168.0.123:7779/ioms/")
driver.maximize_window()
driver.find_element_by_id("userName").clear()
driver.find_element_by_id("userName").send_keys("13030101")
driver.find_element_by_id("passWord").clear()
driver.find_element_by_id("passWord").send_keys("1")
driver.find_element_by_id("login_button").click()
driver.find_element_by_xpath(".//*[@id='A106']").click()
above = driver.find_element_by_xpath("//div[@id='10602']")
ActionChains(driver).move_to_element(above).perform()
driver.find_element_by_xpath("//div[@id='10602']/ul/li[5]/a").click()
above = driver.find_element_by_xpath("//*[@id='thrMenu']")
ActionChains(driver).move_to_element(above).perform()
driver.switch_to.frame("FrameRight")
ActionChains(driver).move_to_element(above).perform()
driver.find_element_by_id("addRole").click()
driver.switch_to.default_content()
driver.find_element_by_xpath("//div[@class='aui_buttons']/button[2]").click()
above = driver.find_element_by_xpath("//div[@id='10602']")
ActionChains(driver).move_to_element(above).perform()
 def setUpClass(cls):
     cls.driver = webdriver.Ie()
     cls.driver.implicitly_wait(5)
     zhyw_login.Login().yw_login(cls.driver, 13030101, 1)
     cls.driver.maximize_window()
 def setUpClass(cls):
     cls.driver = webdriver.Ie()
     cls.driver.implicitly_wait(30)
     zhyw_login.Login().yw_login(cls.driver, "slt", "1")
     cls.driver.maximize_window()