Пример #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
                                     '/html/body/div[1]/div[1]/ul/li[3]/h2/a')
                time.sleep(3)
                strguestnum = self.find_element_text(
                    'x',
                    '/html/body/div[1]/div[2]/div/div[1]/div[1]/div[1]/span')
                # 判断嘉宾的统计数字是否显示
                s = len(strguestnum[3:-4])
                if s == 0:
                    time.sleep(2)
                    strguestnum = self.find_element_text(
                        'x',
                        '/html/body/div[1]/div[2]/div/div[1]/div[1]/div[1]/span'
                    )
                num = strguestnum[3:-4]
                return num
            except:
                self.deprint("获取嘉宾数量失败")


if __name__ == '__main__':
    dr = brower()
    o = LoginPage(dr)
    o.login()
    o = ChoosePage(dr)
    time.sleep(3)
    o.click_menu_bt('8')
    o = Webinar_IndexPage(dr)
    time.sleep(3)
    o.index_webinar()
    guestnum = Get_Guestnum(dr)
    guestnum.get_num()