Example #1
0
 def Mc_detail(self):
     fo = HomePage(self.driver)
     fo.MemberCenter()
     print('点击查看详细信息')
     self.find_element(*self.detail).click()
     time.sleep(2)
     print('查看成功!')
Example #2
0
 def hot_play_download_single(self):
     '''随机点击下载'''
     ho = HomePage(self.driver)
     ho.leaderboard()
     List = self.find_elements(*self.downloads)
     x = random.randint(0, len(List) - 1)
     List[x].click()
Example #3
0
 def hot_play_download_select_all(self):
     '''全选--勾选全部--下载'''
     ho = HomePage(self.driver)
     ho.leaderboard()
     self.find_element(*self.go_select_all).click()
     do = DownloadPage(self.driver)
     do.download_select_all()
Example #4
0
 def hot_play_random(self):
     '''随机点击播放'''
     ho = HomePage(self.driver)
     ho.leaderboard()
     List = self.find_elements(*self.names)
     x = random.randint(0, len(List) - 1)
     List[x].click()
Example #5
0
    def test_ALogin(self):
        '''首页--小知识--随机播放'''
        try:
            ho = HomePage(self.driver)
            ho.login_or_not()

        except:
            po = Operation(self.driver)
            po.screenShot()
            raise LocateError('定位失败,请核查原因!')
    def test_Bvip_play_all(self):
        '''首页--小知识--vip榜--播放全部'''
        try:
            ho = HomePage(self.driver)
            ho.leaderboard()
            lo = LeaderPage(self.driver)
            lo.vip_play_all()

        except:
            po = Operation(self.driver)
            po.screenShot()
Example #7
0
 def test_EKnowledge_list_sort(self):
     '''首页--小知识--排序'''
     try:
         ho = HomePage(self.driver)
         ho.small_knowlege()
         so = SmallPage(self.driver)
         so.Knowledge_list_sort()
     except:
         po = Operation(self.driver)
         po.screenShot()
         raise LocateError()
Example #8
0
 def test_DSubscribe_cancel(self):
     '''首页--小知识--取消订阅'''
     try:
         ho = HomePage(self.driver)
         ho.small_knowlege()
         so = SmallPage(self.driver)
         so.Subscribe_cancel()
     except:
         po = Operation(self.driver)
         po.screenShot()
         raise LocateError()
Example #9
0
 def test_Arangdom_play(self):
     '''首页--小知识--随机播放'''
     try:
         ho = HomePage(self.driver)
         ho.small_knowlege()
         so = SmallPage(self.driver)
         so.random_play()
     except:
         po = Operation(self.driver)
         po.screenShot()
         raise LocateError()
Example #10
0
 def test_Arecent_login(self):
     '''我的页面-test001验证最近登录'''
     try:
         po = HomePage(self.driver)
         po.clickbottom(3)
         po = MinePage(self.driver)
         po.recentlogin()
         print('操作成功!')
     except:
         po = Operation(self.driver)
         po.screenShot()
         raise LocateError('定位失败,请核查原因!')
    def test_Ahot_play_download_select_all(self):
        '''首页--热播榜--随机下载'''
        try:
            ho = HomePage(self.driver)
            ho.leaderboard()
            lo = LeaderPage(self.driver)
            lo.hot_play_download_random_select()
            print('操作成功')

        except:
            po = Operation(self.driver)
            po.screenShot()
Example #12
0
 def test_Mmy_like_story_download(self):
     '''我的页面--我喜欢的--故事-随机下载一个'''
     try:
         po = HomePage(self.driver)
         po.clickbottom(3)
         po = MinePage(self.driver)
         po.my_like_story_download()
         print('操作成功!')
     except:
         po = Operation(self.driver)
         po.screenShot()
         raise LocateError('定位失败,请核查原因!')
Example #13
0
 def test_Bmine_head_name(self):
     '''我的页面test002-更换姓名'''
     try:
         po = HomePage(self.driver)
         po.clickbottom(3)
         po = MinePage(self.driver)
         po.headname_test()
         print('操作成功!')
     except:
         po = Operation(self.driver)
         po.screenShot()
         raise LocateError('定位失败,请核查原因!')
Example #14
0
 def test_Gchange_portrait_sure(self):
     '''我的页面test007-点击头像-更换头像-确定'''
     try:
         ho = HomePage(self.driver)
         ho.clickbottom(3)
         mo = MinePage(self.driver)
         mo.change_portrait_sure()
         print('操作成功!')
     except:
         po = Operation(self.driver)
         po.screenShot()
         raise LocateError('定位失败,请核查原因!')
Example #15
0
    def test_Home_login_thirtyday(self):
        '''test017:验证首页查看宝贝成就最近30天'''
        try:
            print('进入app首页')
            ho = HomePage(self.driver)
            ho.Person_archivement()
            mo = MinePage(self.driver)
            mo.login_days_thirtyday()

        except:
            po = Operation(self.driver)
            po.screenShot()
Example #16
0
 def Cl_random_listen(self):
     fo = HomePage(self.driver)
     fo.Classification()
     i = 1
     while i<5:
         Icon_List = self.find_elements(*self.icons)
         x = random.randint(0,len(Icon_List)-1)
         x.lick()
         '''随机选择故事/专辑'''
         album_list = self.find_elements(*self.albums)
         y = random.randint(0,len(album_list)-1)
         y.click()
         i = i + 1
Example #17
0
    def test_Qmy_like_album(self):
        '''我的页面--我喜欢的--专辑'''

        try:
            po = HomePage(self.driver)
            po.clickbottom(3)
            po = MinePage(self.driver)
            po.my_like_album()
            print('操作成功!')
        except:
            po = Operation(self.driver)
            po.screenShot()
            raise LocateError('定位失败,请核查原因!')
Example #18
0
 def test_Fbuyed_update(self):
     '''我的页面test006-已购买的--更新提醒页面'''
     try:
         ho = HomePage(self.driver)
         ho.clickbottom(3)
         mo = MinePage(self.driver)
         mo.go_buyed()
         mo.go_buyed_updatenotice()
         print('操作成功!')
     except:
         po = Operation(self.driver)
         po.screenShot()
         raise LocateError('定位失败,请核查原因!')
Example #19
0
    def test_Rrecent_play_course_list(self):
        '''我的页面--最近播放--课程列表'''

        try:
            po = HomePage(self.driver)
            po.clickbottom(3)
            po = MinePage(self.driver)
            po.recent_play_course_list()
            print('操作成功!')
        except:
            po = Operation(self.driver)
            po.screenShot()
            raise LocateError('定位失败,请核查原因!')
Example #20
0
 def test_AHomeTest_Search(self):
     '''test001验证首页搜索功能'''
     try:
         po = HomePage(self.driver)
         print('打开app,进入首页')
         mname = format(sys._getframe().f_code.co_name)  #获取当前的类名和方法名
         data = ReadData.readdata(mname)
         po.searchText(data[0])
         po = Operation(self.driver)
         time.sleep(1)
         po.swipeUp(500)
     except:
         po = Operation(self.driver)
         po.screenShot()
Example #21
0
    def test_Ebuyed_order(self):
        '''我的页面test005-已购买的--我的订单页面'''
        try:

            ho = HomePage(self.driver)
            ho.clickbottom(3)
            mo = MinePage(self.driver)
            mo.go_buyed()
            mo.go_buyed_order()
            print('操作成功!')
        except:
            po = Operation(self.driver)
            po.screenShot()
            raise LocateError('定位失败,请核查原因!')
Example #22
0
 def test_Bclick_Bottomicon(self):
     '''test002:验证首页底部按钮切换功能'''
     try:
         print('进入app首页')
         po = HomePage(self.driver)
         print('点击课程,进入课程页面')
         po.clickbottom(2)
         po = Operation(self.driver)
         time.sleep(1)
         po.swipeUp(500)
         print('查看成功')
     except:
         po = Operation(self.driver)
         po.screenShot()
Example #23
0
 def test_Hkcoin_rechare_record(self):
     '''我的页面test009-充值K币-充值记录'''
     try:
         po = HomePage(self.driver)
         po.clickbottom(3)
         po = MinePage(self.driver)
         po.Kcoin_record_list()
         print('操作成功!')
     except:
         po = Operation(self.driver)
         po.screenShot()
         raise LocateError('定位失败,请核查原因!')
Example #24
0
 def test_KGa_album_list(self):
     '''我的页面test014-我的专辑--查看列表'''
     try:
         po = HomePage(self.driver)
         po.clickbottom(3)
         po = MinePage(self.driver)
         po.Ga_album_list()
         print('操作成功!')
     except:
         po = Operation(self.driver)
         po.screenShot()
         raise LocateError('定位失败,请核查原因!')
Example #25
0
 def test_KGc_coupon(self):
     '''我的页面test013-优惠券-已失效'''
     try:
         po = HomePage(self.driver)
         po.clickbottom(3)
         po = MinePage(self.driver)
         po.Gc_coupon()
         print('操作成功!')
     except:
         po = Operation(self.driver)
         po.screenShot()
         raise LocateError('定位失败,请核查原因!')
Example #26
0
 def test_JLi_pin_card_shop(self):
     '''我的页面test012-礼品卡-商城-更多'''
     try:
         po = HomePage(self.driver)
         po.clickbottom(3)
         po = MinePage(self.driver)
         po.Li_pin_card_shop()
         print('操作成功!')
     except:
         po = Operation(self.driver)
         po.screenShot()
         raise LocateError('定位失败,请核查原因!')
Example #27
0
 def test_KGa_new_album(self):
     '''我的页面test015-我的专辑--新建专辑'''
     try:
         po = HomePage(self.driver)
         po.clickbottom(3)
         po = MinePage(self.driver)
         mname = format(sys._getframe().f_code.co_name)
         newname = ReadData.readdata(mname)
         po.Ga_album_new(newname)
         print('操作成功!')
     except:
         po = Operation(self.driver)
         po.screenShot()
         raise LocateError('定位失败,请核查原因!')
Example #28
0
 def test_IDh_code_test(self):
     '''我的页面test010-兑换码-兑换'''
     try:
         po = HomePage(self.driver)
         po.clickbottom(3)
         mname = format(sys._getframe().f_code.co_name)  # 获取当前的类名和方法名
         data = ReadData.readdata(mname)
         po = MinePage(self.driver)
         po.Dh_code_test(data[0])
         print('操作成功!')
     except:
         po = Operation(self.driver)
         po.screenShot()
         raise LocateError('定位失败,请核查原因!')
Example #29
0
    def test_IHomeTest_Search_None(self):
        '''test0018验证首页搜索功能'''
        try:
            po = HomePage(self.driver)
            po.searchNull()

        except:
            po = Operation(self.driver)
            po.screenShot()
Example #30
0
    def test_IHomeTest_Search_Back(self):
        '''test0019验证首页搜索返回功能'''
        try:
            po = HomePage(self.driver)
            po.searchBack()

        except:
            po = Operation(self.driver)
            po.screenShot()