示例#1
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()
示例#2
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()
示例#3
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()
示例#4
0
        self.wait_is_visible('css','#g-right > div > div.clearfix.ng-scope > div.contact-stats-box.w715 > div.event-stats-l > div > button') #点击创建会议
        self.driver.implicitly_wait(30)
        self.deprint("点击创建会议完成")

    #点击会议列表菜单
    def click_linelist(self,list_pos):
        self.deprint("点击会议列表")
        self.driver.implicitly_wait(10)
        css_path = "/html/body/div[2]/div[1]/ul/li[" + str(list_pos) + "]/h2/a"   #点击会议列表
        self.wait_is_visible('x', css_path)
        self.driver.refresh()
        self.deprint("点击第一场会议")
        self.driver.implicitly_wait(30)
        self.wait_is_visible('x','//*[@id="g-right"]/div/div[3]/table/tbody/tr[1]/td[2]/a')  #点击第一场会议
        self.driver.implicitly_wait(30)


if __name__ == '__main__':
    dr = brower()
    o = LoginPage(dr)
    o.login()

    o = ChoosePage(dr)
    time.sleep(3)
    o.click_menu_bt('9')

    o = IndexPage(dr)
    #o.click_linelist()
    o.click_linelist('2')
    o.quit()