Ejemplo n.º 1
0
 def test_003_meeting_addtag(self):
     """设置嘉宾日程及会议标签"""
     t.deprint("开始执行添加嘉宾和日程及会议标签的直播会议的用例3")
     dr = brower()
     o = LoginPage(dr)
     o.login()
     o = ChoosePage(dr)
     o.click_menu_bt('9')
     time.sleep(5)
     gguestnum = Get_Guestnum(dr)
     guestnum = int(gguestnum.get_num())  # 获取嘉宾管理的嘉宾个数
     o = Webinar_IndexPage(dr)
     o.webinar_list()  # 进入直播会议列表
     wbr = Webinar_Create(dr)
     wbr.return_meeting()  # 进入直播会议回收站还原会议
     o.webinar_list()  # 进入直播会议列表
     time.sleep(3)
     o.choose_meeting()  # 选择一场直播中的会议
     wbr_seting = Webcast_Setting(dr)
     wbr_seting.into_baseinfo()  # 进入会议详情的基础设置页面
     wbr_seting.edit_baseinfo()  # 编辑会议的基本信息
     actual_result1 = wbr_seting.add_guest(guestnum)  # 添加会议嘉宾
     # self.assertEqual('嘉宾信息成功',actual_result1,msg='failed')
     # time.sleep(2)
     actual_result2 = wbr_seting.add_agenda()  # 添加会议日程
     print actual_result2
     self.assertEqual(actual_result2, u'添加会议日程成功', msg='failed')
     wbr_seting.quit()
Ejemplo n.º 2
0
    def setUp(self):
        self.driver = brower()
        object = LoginPage(self.driver)
        object.login()

        object = ChoosePage(self.driver)
        object.click_menu_bt('22')
Ejemplo n.º 3
0
    def test_004_meeting_addquesluckydraw(self):
        """设置问卷和抽奖"""
        t.deprint("开始执行添加问卷和抽奖的直播会议的用例4")
        dr = brower()
        o = LoginPage(dr)
        o.login()
        o = ChoosePage(dr)
        o.click_menu_bt('9')
        time.sleep(5)
        o = Webinar_IndexPage(dr)
        o.webinar_list()
        o.choose_meeting()
        time.sleep(3)

        interact = InteractionSetting(dr)
        current_handle = interact.interaction_setting()
        time.sleep(2)
        interact.create_questionnar()
        newquestion = NewQuestionnairePage(dr)
        newquestion.creat_new_questionnaire()
        newquestion.edit_questionnaire_subject()
        interact.click_refresh(current_handle)
        time.sleep(2)
        acture_result = interact.create_luckydraw()
        except_result = "抽奖添加成功"
        # wbr = Webinar_Create(dr)
        # wbr.cancel_meeting()
        self.assertEqual(acture_result, except_result, "fail")
        # self.assertTupleEqual(acture_result,except_result,"fail")
        t.deprint("用例4执行完成")
Ejemplo n.º 4
0
 def setUp(self):
     self.driver = brower()
     login = LoginPage(self.driver)
     login.login()
     choose = ChoosePage(self.driver)
     time.sleep(2)
     choose.click_menu_bt('17')
Ejemplo n.º 5
0
 def setUp(self):
     self.driver = brower()
     login = LoginPage(self.driver)
     login.login()
     choose = ChoosePage(self.driver)
     choose.click_menu_bt('20')
     self.conn, self.cur = DatabaseOperation().openconnect()
Ejemplo n.º 6
0
 def test_005_meeting_indexpage(self):
     """进入直播专题页"""
     t.deprint("开始执行进入直播会场的用例5")
     dr = brower()
     o = LoginPage(dr)
     o.login()
     o = ChoosePage(dr)
     o.click_menu_bt('9')
     time.sleep(5)
     o = Webinar_IndexPage(dr)
     o.webinar_list()  # 进入直播会议的列表
     vtitle = o.choose_meeting()  # 获取一场直播中会议的会议标题
     time.sleep(3)
     index = Webinar_Webcast(dr)
     actual_result1 = index.into_webcast(vtitle)  # 进入直播会议会场,并验证会议标题
     self.assertEqual(actual_result1, u'进入直播会场成功', msg='failed')
     index.quit()
Ejemplo n.º 7
0
 def test_001_webinar_create_cancel(self):
     """创建并取消会议"""
     t.deprint("开始执行线上会创建后取消的用例1")
     dr = brower()
     o = LoginPage(dr)
     o.login()
     o = ChoosePage(dr)
     o.click_menu_bt('10')
     time.sleep(5)
     o = Webinar_IndexPage(dr)
     time.sleep(3)
     o.index_webinar()  # 进入线上会首页
     o.index_create()  # 点击首页的创建会议按钮
     wbr = Webinar_Create(dr)
     wbr.create_meeting()  # 创建线上会直播会议
     actual_result = wbr.cancel_meeting()  # 取消此会议
     self.assertEqual(actual_result, u'会议取消成功', msg='failed')
     o.quit()
Ejemplo n.º 8
0
 def test_002_webinar_publish_cancel(self):
     """创建发布并取消会议"""
     t.deprint("开始执行线上会创建后发布并取消的用例2")
     dr = brower()
     o = LoginPage(dr)
     o.login()
     o = ChoosePage(dr)
     o.click_menu_bt('9')
     time.sleep(5)
     o = Webinar_IndexPage(dr)
     time.sleep(3)
     o.webinar_list()  # 进入线上会直播会议列表
     o.list_create()  # 点击线上会直播列表的创建会议按钮
     wbr = Webinar_Create(dr)
     wbr.create_meeting()  # 创建直播会议
     actual_result = wbr.publish_meeting()  # 发布本会议
     self.assertEqual(actual_result, u'会议发布成功', msg='failed')
     actual_result1 = wbr.cancel_meeting()  # 取消本会议
     self.assertEqual(actual_result1, u'会议取消成功', msg='failed')
     o.quit()
Ejemplo n.º 9
0
                str2 = self.find_element_text(
                    'x',
                    '/html/body/div[1]/div[2]/main/div/div[2]/div[2]/nav/div/span[2]'
                )
                afterDeleteTotalNum = str2.split("共")[1].split("条")[0]
                if int(totalNum) == (int(afterDeleteTotalNum) + 1):
                    self.deprint('试题删除成功')
                    text = "试题删除成功"
                else:
                    self.deprint('试题删除失败')
                    text = "试题删除失败"
                return text
            except:
                self.deprint("用例执行失败")
                text = "用例执行失败"
                return text


if __name__ == '__main__':
    dr = brower()
    object = LoginPage(dr)
    object.login()
    object = ChoosePage(dr)
    object.click_menu_bt('11')
    object = QuestionnaireListPage(dr)
    object.open_questionBank()
    object = QuestionBankManagement(dr)
    object.create_question()
    object.delete_question()
    object.quit()
Ejemplo n.º 10
0
    #打开新建问卷
    def open_create_questionnaire(self):
        # self.driver.switch_to.window(self.driver.window_handles[-1]) #不要加这句话,在进入问卷的时候一句切换过句柄,再次切换回导致按钮点击不了,应该是句柄不对了
        try:
            self.deprint("开始点击新建问卷")
            time.sleep(2)
            self.wait_is_visible(
                'x',
                '/html/body/div[1]/div[2]/main/div/div[1]/div/div[2]/div/div[2]/a'
            )  #点击新建问卷的按钮
            self.deprint("点击新建问卷按钮成功")
        except:
            try:
                self.deprint("开始点击新建问卷")
                time.sleep(2)
                self.wait_is_visible(
                    'x',
                    '/html/body/div[1]/div[2]/main/div/div[1]/div/div[2]/div/div[2]/a'
                )  #点击新建问卷的按钮
                self.deprint("点击新建问卷按钮成功")
            except:
                self.deprint("点击新建问卷按钮失败")


if __name__ == '__main__':
    self.driver = brower()
    object = LoginPage(self.driver)
    object.login()
    object = ChoosePage(self.driver)
    object.click_menu_bt('11')
Ejemplo n.º 11
0
            time.sleep(20)
            tips = self.find_element_text('x', '//*[@id="spansyncfuns"]')
            if '本次共同步素材数据' in tips:
                self.deprint("同步微信素材用例执行完成")
                return u'同步素材数据成功'
        except:
            self.deprint("用例执行失败,重试一次")
            self.deprint("开始执行同步微信素材用例")
            self.wait_is_visible('x',
                                 '//*[@id="ul-nav-2"]/li[1]/a')  # 点击素材管理菜单
            time.sleep(3)
            self.scrollbar("bottom")
            self.wait_is_visible('x',
                                 '// *[ @ id = "spansyncfuns"]')  # 点击同步微信素材
            time.sleep(20)
            tips = self.find_element_text('x', '//*[@id="spansyncfuns"]')
            if '本次共同步素材数据' in tips:
                self.deprint("同步微信素材用例执行完成")
                return u'同步微信素材成功'
            else:
                self.deprint("同步微信素材失败")


if __name__ == '__main__':
    driver = brower()
    login = LoginPage(driver)
    login.login()
    chooseP = ChoosePage(driver)
    chooseP.click_menu_bt("1")
    syn = Syn_materials(driver)
    result = syn.syn_materials()
Ejemplo n.º 12
0
 def setUp(self):
     # 性能监控:测试用例执行时间
     # global cp,driver
     # cp = cProfile.Profile()
     # cp.enable()
     self.driver = brower()