Esempio n. 1
0
 def setUpClass(cls):
     print('所有case执行的前置条件')
     lkc = LoginKeywordCases()
     lkc.run_keyword_excel_cases()
     cls.driver = getattr(getattr(lkc, 'lk'), 'driver')
     cls.driver.maximize_window()
     cls.Eb = ExaminationPlaceBusiness(cls.driver)
     cls.TU = TableUtil(cls.driver)
Esempio n. 2
0
 def setUpClass(cls):
     print('所有case执行的前置条件')
     lkc = LoginKeywordCases()
     lkc.run_keyword_excel_cases()
     cls.driver = getattr(getattr(lkc, 'lk'), 'driver')
     cls.driver.maximize_window()
     cls.Eb = ExaminationPlaceBusiness(cls.driver)
     Eh = getattr(cls.Eb, 'Eh')
     time.sleep(2)
     Eh.click_edit_btn()
 def setUpClass(cls):
     print('所有case执行的前置条件')
     lkc = LoginKeywordCases()
     lkc.run_keyword_excel_cases()
     cls.driver = getattr(getattr(lkc, 'lk'), 'driver')
     cls.driver.maximize_window()
     cls.ERb = ExaminationRoomBusiness(cls.driver)
     cls.ERh = getattr(cls.ERb, 'ERh')
     cls.ERp = getattr(cls.ERh, 'ERp')
     cls.EPb = ExaminationPlaceBusiness(cls.driver)
     cls.EPh = getattr(cls.EPb, 'Eh')
     time.sleep(2)
     cls.EPh.click_detailed_btn()
     time.sleep(2)
     cls.book_table_num = cls.ERh.get_book_table_empty_text()
 def setUpClass(cls):
     print('所有case执行的前置条件')
     lkc = LoginKeywordCases()
     lkc.run_keyword_excel_cases()
     cls.driver = getattr(getattr(lkc, 'lk'), 'driver')
     cls.driver.maximize_window()
     cls.EPb = ExaminationPlaceBusiness(cls.driver)
     time.sleep(2)
     cls.enable_num = cls.EPb.get_enable_num()
     cls.Tu = TableUtil(cls.driver)
     cls.ERb = ExaminationRoomBusiness(cls.driver)
     cls.EPh = getattr(cls.EPb, 'Eh')
     #cls.driver.refresh()
     time.sleep(2)
     cls.EPh.click_detailed_btn()
     time.sleep(1)
 def setUpClass(cls):
     print('所有case执行的前置条件')
     lkc = LoginKeywordCases()
     lkc.run_keyword_excel_cases()
     cls.driver = getattr(getattr(lkc, 'lk'), 'driver')
     cls.driver.maximize_window()
     cls.ERb = ExaminationRoomBusiness(cls.driver)
     cls.ERh = getattr(cls.ERb, 'ERh')
     cls.ERp = getattr(cls.ERh, 'ERp')
     cls.EPb = ExaminationPlaceBusiness(cls.driver)
     cls.EPh = getattr(cls.EPb, 'Eh')
     time.sleep(2)
     cls.EPh.click_detailed_btn()
     time.sleep(2)
     cls.book_table_num = cls.ERh.get_book_table_empty_text()
     if cls.book_table_num != '暂无数据':
         cls.Tu = TableUtil(cls.driver, 'book_table')
         cls.dataName = cls.Tu.get_data_book_edit(row=2, col=1)
         cls.position = cls.Tu.get_data_book_edit(row=2, col=3)
         cls.ERh.click_book_edit_btn()
Esempio n. 6
0
    def setUpClass(cls):
        print('所有case执行的前置条件')
        cls.log = UserLog()
        cls.logger = cls.log.get_log()
        cls.log.clear_log()


        lkc = LoginKeywordCases()
        lkc.run_keyword_excel_cases()
        cls.driver = getattr(getattr(lkc, 'lk'), 'driver')
        cls.driver.maximize_window()
        cls.EPb = ExaminationPlaceBusiness(cls.driver)
        cls.Tu = TableUtil(cls.driver)
        cls.ERb = ExaminationRoomBusiness(cls.driver)
        cls.Eeb=ExaminationEnvirBusiness(cls.driver)
        cls.EPh = getattr(cls.EPb, 'Eh')
        #cls.driver.refresh()
        time.sleep(2)
        cls.EPh.click_detailed_btn()
        cls.Eeh = ExaminationeEnvirHandle(cls.driver)
        cls.Eep=getattr(cls.Eeh, 'Eep')
        time.sleep(1)
        cls.Eeh.click_envir_btn()
        time.sleep(1)
                                       photo_add_title, photo_add_content)
        time.sleep(1)
        if assertText == '添加成功':
            time.sleep(1)
            result = self.Eeh.get_photo_add_result_text()
            if result == assertText:
                return True
        elif len(assertCode) != 0:
            if self.Eeh.get_photo_add_error_text(assertCode,
                                                 assertText) is None:
                return False
            else:
                print("用例通过")
                return True


if __name__ == "__main__":
    lkc = LoginKeywordCases()
    lkc.run_keyword_excel_cases()
    driver = getattr(getattr(lkc, 'lk'), 'driver')
    driver.maximize_window()
    EPh = ExaminationPlaceHandle(driver)
    EPh.click_detailed_btn()
    time, sleep(1)
    Eeh = ExaminationeEnvirHandle(driver)
    Eeh.click_envir_btn()
    Eeh.click_machine_edit_btn()
    time.sleep(1)
    Eeb = ExaminationEnvirBusiness(driver)
    print(Eeb.judge_machine_operating_system_select())
# coding=utf-8
 def __init__(self):
     lkc = LoginKeywordCases()
     lkc.run_keyword_excel_cases()
     driver = getattr(getattr(lkc, 'lk'), 'driver')
     driver.maximize_window()
     self.driver = driver