def setUp(self): self.driver = Service.get_driver('../conf/yang/base.conf') self.driver.implicitly_wait(15) self.driver.maximize_window() Service.ignor_login_decrypt(self.driver, '../conf/yang/base.conf') from lib.public_rescources import PublicRescources self.pu = PublicRescources(self.driver)
def setUp(self): driver=Service.get_driver('..\\conf\\base.conf') login_info = {'userName': '******', 'userPass': '******', 'checkcode':'0000'} Login().do_login('..\\conf\\base.conf', driver, login_info) time.sleep(3) driver.find_element_by_css_selector('div.panel:nth-child(12) > div:nth-child(1) > a:nth-child(1)').click() time.sleep(3) driver.find_element_by_css_selector( '#list-8 > div:nth-child(1) > ul:nth-child(1) > li:nth-child(1) > a:nth-child(1)').click() time.sleep(3) number = driver.find_element_by_xpath('/html/body/div[9]/div[2]/div[2]/div[2]/div[4]/div[1]/span[1]') print(number.text) eles = driver.find_elements_by_class_name('page-number') print(eles) num = 0 totalcount = len(eles) print(totalcount + 1) for i in range(0, totalcount + 1): # eles[i].find_elements_by_tag_name('a').click() # print(eles[i]) driver.find_element_by_xpath("//ul[@class='pagination']/li[%d+2]/a[contains(@href,'#')]" % i).click() time.sleep(5) newnum = len(driver.find_elements_by_xpath('//*[@id="employee-table"]/tbody/tr')) num = num + newnum print(num) driver.quit()
def setUp(self): self.driver=Service.get_driver('../conf/yang/base.conf') self.driver.implicitly_wait(15) self.driver.maximize_window() #使用管理员进行登录,进入转交责任人 Service.ignor_login_decrypt(self.driver,'../conf/yang/base_admin.conf') self.tran=TransmitRescources(self.driver)
def setUp(self): self.driver = Service.get_driver('..\\conf\\base.conf') login_info = { 'userName': '******', 'userPass': '******', 'checkcode': '0000' } Login().do_login('..\\conf\\base.conf', self.driver, login_info)
def setUp(self): self.driver = Service.get_driver('../conf/huang/base.conf') self.driver.implicitly_wait(10) self.driver.maximize_window() Service.ignor_login_decrypt(self.driver, '../conf/huang/base.conf') self.afew = ApplicationForExtraWork(self.driver)
def setUp(self): self.driver = Service.get_driver("../conf/peng/base.conf") self.driver.implicitly_wait(10) self.student = Student(self.driver)
def setUp(self): self.driver = Service.get_driver('../conf/yun/base.conf') self.driver.implicitly_wait(15) self.cla = Class_service(self.driver)
def setUp(self): self.driver = Service.get_driver('../config/base.conf') Service.open_page(self.driver, '../config/base.conf') self.finance = FinanceManage(self.driver)
def setUp(self): self.driver = Service.get_driver('../conf/yun/base.conf') self.driver.implicitly_wait(15) from lib.marketing import Marketing self.mar = Marketing(self.driver) self.old_total = self.mar.total(self.driver)
def setUp(self): self.driver = Service.get_driver('../conf/huang/base.conf') self.driver.implicitly_wait(10) self.driver.maximize_window() Service.ignor_login_decrypt(self.driver, '../conf/huang/base.conf') self.ti = TechnicalInterview(self.driver)
def setUp(self): self.driver = Service.get_driver('../conf/huang/base.conf') self.driver.implicitly_wait(10) self.driver.maximize_window() Service.ignor_login_decrypt(self.driver, '../conf/huang/base.conf') self.ca = CourseArrangement(self.driver)
def setUp(self): self.driver = Service.get_driver('../config/base.conf') Service.open_page(self.driver, '../config/base.conf') self.login = Login(self.driver)
def setUp(self): self.driver = Service.get_driver("../conf/peng/base.conf") self.driver.implicitly_wait(10) self.score = OverallScore(self.driver)
def setUp(self): self.driver=Service.get_driver('..\\conf\\base.conf')
def setUp(self): self.driver = Service.get_driver("../conf/peng/base.conf") self.driver.implicitly_wait(10) self.week = WeekMark(self.driver)
#点击提交按钮 def click_commit(self): self.driver.find_element_by_xpath('//*[@id="upRes-modal"]/div/div/div[3]/button').click() # #点击确定按钮 # def click_ok(self): # self.driver.find_element_by_xpath('/html/body/div[11]/div/div/div[3]/button') #导入组合 def do_import(self,logging__week_info): Service.open_module(self.driver, "阶段考评") self.week_week_import() self.select_class_stu_week(logging__week_info["s_sclass"]) self.select_stage_week(logging__week_info["stage"]) self.upload_fail(logging__week_info["file"]) self.click_commit() # self.click_ok() if __name__ == '__main__': driver = Service.get_driver('../conf/peng/base.conf') driver.implicitly_wait(10) logging__week_info = {"s_sclass": "WNCDC002", "stage": "第一阶段","file":"C:\\lipeng\\test\\testing\\data\\周考成绩.xls"} student_total = {"edit_name": "晒着", "edit_state": "在校学习", "edit_tel": "13111111111", "edit_source": "专属简历"} a = Sectional(driver) a.do_import(logging__week_info)
def __init__(self): self.driver = Service.get_driver()
def setUp(self): self.driver = Service.get_driver('../conf/yang/base.conf') self.driver.implicitly_wait(15) self.driver.maximize_window() from lib.login import Login self.login = Login(self.driver)
def setUp(self): self.driver = Service.get_driver('../conf/huang/base.conf') self.driver.implicitly_wait(10) self.driver.maximize_window() Service.ignor_login_decrypt(self.driver,'../conf/huang/base.conf') self.tod = TeacherOnDuty(self.driver)