Exemplo n.º 1
0
 def searchMusic(self):
     driver = self.driver
     sleep(2)
     now = time.strftime('%Y-%m-%d %H_%M_%S')
     print('\n003:搜索添加乐谱库乐谱----开始:' + now)
     login(self)
     sleep(3)
     #ic upload1
     b = driver.find_elements_by_accessibility_id('上传乐谱')
     if len(b) != 0:
         driver.find_element_by_accessibility_id('上传乐谱').click()
     else:
         #ic Sheet music
         driver.find_element_by_accessibility_id('查看乐谱').click()
     sleep(2)
     aler = driver.find_elements_by_accessibility_id('好')
     if len(aler) != 0:
         driver.find_element_by_accessibility_id('好').click()
         sleep(3)
     driver.find_element_by_accessibility_id('上传乐谱').click()
     sleep(2)
     #hot search
     driver.find_element_by_accessibility_id('搜索书名或者曲目名').click()
     sleep(3)
     driver.find_element_by_accessibility_id('考级').click()
     sleep(3)
     driver.find_element_by_accessibility_id('钢琴').click()
     sleep(3)
     driver.find_element_by_accessibility_id('小提琴').click()
     sleep(3)
     driver.find_element_by_accessibility_id('手风琴').click()
     sleep(3)
     driver.find_element_by_accessibility_id('钢琴').click()
     sleep(3)
     #first music
     driver.find_elements_by_class_name('XCUIElementTypeCell')[0].click()
     sleep(3)
     #first item
     driver.find_elements_by_class_name('XCUIElementTypeCell')[0].click()
     sleep(3)
     now = time.strftime('%Y-%m-%d %H_%M_%S')
     sf2 = './' + now + '_003b_searchedMusicByHotDetail_R.png'
     driver.get_screenshot_as_file(sf2)
     sleep(2)
     turnpage_play(self)
     sleep(2)
     driver.find_element_by_accessibility_id('ic nav back').click()
     sleep(2)
     driver.find_element_by_accessibility_id('ic nav back').click()
     sleep(2)
     """
     driver.find_element_by_accessibility_id('取消').click()
     sleep(2)
     driver.find_element_by_accessibility_id('全部').click()
     sleep(2)
     """
     #whole music name
     s = driver.find_element_by_class_name('XCUIElementTypeTextField')
     s.click()
     s.set_value('车尔尼299 No.02')
     sleep(1)
     driver.find_element_by_accessibility_id('Search').click()
     sleep(4)
     driver.find_element_by_accessibility_id('包含该曲目').click()
     sleep(3)
     driver.find_element_by_class_name('XCUIElementTypeCell').click()
     sleep(3)
     now = time.strftime('%Y-%m-%d %H_%M_%S')
     sf1 = './' + now + '_003b_searchedMusicByWholenameDetail_R.png'
     driver.get_screenshot_as_file(sf1)
     sleep(2)
     turnpage_play(self)
     sleep(2)
     driver.find_element_by_accessibility_id('ic nav back').click()
     sleep(2)
     driver.find_element_by_accessibility_id('ic nav back').click()
     sleep(2)
     driver.find_element_by_accessibility_id('取消').click()
     sleep(2)
     driver.find_element_by_accessibility_id('全部').click()
     sleep(2)
     #keyword
     s = driver.find_element_by_class_name('XCUIElementTypeTextField')
     s.click()
     s.set_value('299 No.07')
     sleep(1)
     driver.find_element_by_accessibility_id('Search').click()
     sleep(4)
     driver.find_element_by_accessibility_id('包含该曲目').click()
     sleep(3)
     driver.find_element_by_class_name('XCUIElementTypeCell').click()
     sleep(3)
     now = time.strftime('%Y-%m-%d %H_%M_%S')
     sf1 = './' + now + '_003b_searchedMusicByKeywordDetail_R.png'
     driver.get_screenshot_as_file(sf1)
     sleep(2)
     turnpage_play(self)
     sleep(2)
     driver.find_element_by_accessibility_id('ic nav back').click()
     sleep(2)
     driver.find_element_by_accessibility_id('ic nav back').click()
     sleep(2)
     driver.find_element_by_accessibility_id('取消').click()
     sleep(2)
     driver.find_element_by_accessibility_id('ic nav back').click()
     sleep(2)
     driver.find_element_by_accessibility_id('ic nav back').click()
     sleep(3)
     logout(self)
     now = time.strftime('%Y-%m-%d %H_%M_%S')
     print('\n003:搜索添加乐谱库乐谱----结束:' + now)
Exemplo n.º 2
0
 def bottomMusic(self):
     driver = self.driver
     sleep(2)
     now = time.strftime('%Y-%m-%d %H_%M_%S')
     print('\n003:搜索添加乐谱库乐谱----开始:' + now)
     login(self)
     sleep(2)
     lis1 = driver.find_elements_by_android_uiautomator(
         'new UiSelector().text("课程表")')
     if len(lis1) == 0:
         print('本周暂时没有课程安排!')
         sleep(2)
     else:
         b = driver.find_elements_by_android_uiautomator(
             'new UiSelector().text("上传乐谱")')
         if len(b) != 0:
             driver.find_element_by_android_uiautomator(
                 'new UiSelector().text("上传乐谱")').click()
         else:
             driver.find_element_by_android_uiautomator(
                 'new UiSelector().text("查看乐谱")').click()
         sleep(3)
         driver.find_element_by_android_uiautomator(
             'new UiSelector().text("上传乐谱")').click()
         sleep(2)
         driver.find_element_by_android_uiautomator(
             'new UiSelector().text("搜索书名或曲目名")').click()
         sleep(3)
         driver.find_element_by_android_uiautomator(
             'new UiSelector().text("考级")').click()
         sleep(3)
         driver.find_element_by_android_uiautomator(
             'new UiSelector().text("钢琴")').click()
         sleep(2)
         driver.find_element_by_android_uiautomator(
             'new UiSelector().text("小提琴")').click()
         sleep(2)
         driver.find_element_by_android_uiautomator(
             'new UiSelector().text("手风琴")').click()
         sleep(2)
         driver.find_element_by_android_uiautomator(
             'new UiSelector().text("古筝")').click()
         sleep(2)
         #com.pnlyy.pnlclass.pnlclass_student.ceshi:id/tvMusicBookName
         driver.find_elements_by_id(
             'com.pnlyy.pnlclass.pnlclass_student.ceshi:id/tvMusicBookName'
         )[0].click()
         sleep(3)
         driver.find_elements_by_id(
             'com.pnlyy.pnlclass.pnlclass_student.ceshi:id/tvName'
         )[0].click()
         sleep(3)
         now = time.strftime('%Y-%m-%d %H_%M_%S')
         sf2 = './' + now + '_003b_searchedMusicByHotDetail_R.png'
         driver.get_screenshot_as_file(sf2)
         sleep(2)
         turnpage_play(self)
         sleep(2)
         driver.find_element_by_android_uiautomator(
             'new UiSelector().text("返回")').click()
         sleep(2)
         driver.find_element_by_android_uiautomator(
             'new UiSelector().text("返回")').click()
         sleep(2)
         driver.find_element_by_android_uiautomator(
             'new UiSelector().text("取消")').click()
         sleep(2)
         driver.find_element_by_android_uiautomator(
             'new UiSelector().text("全部")').click()
         sleep(2)
         #keyword
         driver.find_element_by_android_uiautomator(
             'new UiSelector().text("搜索书名或曲目名")').click()
         sleep(2)
         #com.pnlyy.pnlclass.pnlclass_student.ceshi:id/etSearch2
         s = driver.find_element_by_id(
             'com.pnlyy.pnlclass.pnlclass_student.ceshi:id/etSearch2')
         s.click()
         s.set_value('299 No.07')
         sleep(1)
         #enter key=66
         driver.press_keycode(66)
         sleep(3)
         driver.find_element_by_android_uiautomator(
             'new UiSelector().text("包含该曲目")').click()
         sleep(2)
         #com.pnlyy.pnlclass.pnlclass_student.ceshi:id/tvName
         driver.find_elements_by_id(
             'com.pnlyy.pnlclass.pnlclass_student.ceshi:id/tvName'
         )[0].click()
         sleep(3)
         now = time.strftime('%Y-%m-%d %H_%M_%S')
         sf0 = './' + now + '_003b_searchedMusicByKeywordDetail_R.png'
         driver.get_screenshot_as_file(sf0)
         sleep(2)
         turnpage_play(self)
         sleep(2)
         driver.find_element_by_android_uiautomator(
             'new UiSelector().text("返回")').click()
         sleep(2)
         driver.find_element_by_android_uiautomator(
             'new UiSelector().text("返回")').click()
         sleep(2)
         driver.find_element_by_android_uiautomator(
             'new UiSelector().text("返回")').click()
         sleep(2)
         driver.find_element_by_android_uiautomator(
             'new UiSelector().text("返回")').click()
         sleep(3)
     logout(self)
     now = time.strftime('%Y-%m-%d %H_%M_%S')
     print('\n003:搜索添加乐谱库乐谱----结束:' + now)
 def uploadMusic(self):
     driver=self.driver
     sleep(2)
     now=time.strftime('%Y-%m-%d %H_%M_%S')
     print('\n005:上传乐谱----开始:'+now)
     login(self)
     sleep(2)
     #ic upload1
     b=driver.find_elements_by_accessibility_id('上传乐谱')
     if len(b)!=0:
         driver.find_element_by_accessibility_id('上传乐谱').click()
     else:
         #ic Sheet music
         driver.find_element_by_accessibility_id('查看乐谱').click()
     sleep(2)
     aler=driver.find_elements_by_accessibility_id('好')
     if len(aler)!=0:
         driver.find_element_by_accessibility_id('好').click()
         sleep(2)
     now=time.strftime('%Y-%m-%d %H_%M_%S')
     sf0='./'+now+'_005b_beforeAddMusic_R.png'
     driver.save_screenshot(sf0)
     sleep(2)
     driver.find_element_by_accessibility_id('上传乐谱').click()
     sleep(2)
     driver.find_element_by_accessibility_id('钢琴').click()
     sleep(2)
     driver.find_element_by_accessibility_id('小提琴').click()
     sleep(2)
     driver.find_element_by_accessibility_id('手风琴').click()
     sleep(2)
     driver.find_element_by_accessibility_id('钢琴').click()
     sleep(2)
     driver.find_element_by_accessibility_id('搜索书名或者曲目名').click()
     sleep(2)
     driver.find_element_by_accessibility_id('车尔尼').click()
     sleep(2)
     driver.find_element_by_accessibility_id('包含该曲目').click()
     sleep(2)
     #first music
     driver.find_element_by_class_name('XCUIElementTypeCell').click()
     sleep(3)
     turnpage_play(self)
     sleep(2)
     driver.find_element_by_accessibility_id('ic nav back').click()
     sleep(3)
     driver.find_element_by_accessibility_id('   添 加   ').click()
     sleep(2)
     driver.find_element_by_accessibility_id('ic nav back').click()
     sleep(2)
     driver.find_element_by_accessibility_id('ic nav back').click()
     sleep(2)
     now=time.strftime('%Y-%m-%d %H_%M_%S')
     sf1='./'+now+'_005b_afterAddMusic_R.png'
     driver.save_screenshot(sf1)
     sleep(2)
     driver.find_element_by_accessibility_id('ic nav back').click()
     sleep(3)
     logout(self)
     now=time.strftime('%Y-%m-%d %H_%M_%S')
     print('\n005:上传乐谱----结束:'+now)
    def uploadMusic(self):
        driver = self.driver
        sleep(2)
        now = time.strftime('%Y-%m-%d %H_%M_%S')
        print('\n024:上传乐谱----开始:' + now)
        login(self)
        sleep(2)
        lis1 = driver.find_elements_by_android_uiautomator(
            'new UiSelector().text("课程表")')
        if len(lis1) == 0:
            print('本周暂时没有课程安排!')
            sleep(2)
        else:
            flag = driver.find_element_by_id(
                'com.pnlyy.pnlclass.pnlclass_student.ceshi:id/tvLine2').text
            print('\n' + flag)
            print('\n已开始:' + str('已开始' in flag))
            print('\n已结束:' + str('已结束' in flag))
            sleep(2)
            b = driver.find_elements_by_android_uiautomator(
                'new UiSelector().text("上传乐谱")')
            if len(b) != 0:
                driver.find_element_by_android_uiautomator(
                    'new UiSelector().text("上传乐谱")').click()
            else:
                driver.find_element_by_android_uiautomator(
                    'new UiSelector().text("查看乐谱")').click()
            sleep(3)
            now = time.strftime('%Y-%m-%d %H_%M_%S')
            sf = './' + now + '_024b_classMuiscIni_R.png'
            driver.save_screenshot(sf)
            sleep(2)
            items = driver.find_elements_by_id(
                'com.pnlyy.pnlclass.pnlclass_student.ceshi:id/tvName')
            i = len(items)
            print('\nitems:' + str(i))
            sleep(1)

            #delete existing music
            if (i != 0 and (not ('已开始' in flag) and not ('已结束' in flag))):
                for j in range(i):
                    driver.find_element_by_android_uiautomator(
                        'new UiSelector().text("删除")').click()
                    sleep(3)
                    driver.find_element_by_id(
                        'com.pnlyy.pnlclass.pnlclass_student.ceshi:id/sureBtn'
                    ).click()
                    sleep(2)
                i = 0
            sleep(2)

            driver.find_element_by_android_uiautomator(
                'new UiSelector().text("上传乐谱")').click()
            sleep(2)
            driver.find_element_by_android_uiautomator(
                'new UiSelector().text("自主上传")').click()
            sleep(3)
            driver.find_element_by_android_uiautomator(
                'new UiSelector().text("取消")').click()
            sleep(3)
            driver.find_element_by_android_uiautomator(
                'new UiSelector().text("自主上传")').click()
            sleep(2)
            driver.find_element_by_android_uiautomator(
                'new UiSelector().text("最近上过的乐谱")').click()
            sleep(2)
            add = driver.find_elements_by_android_uiautomator(
                'new UiSelector().text("添加")')
            if len(add) != 0:
                driver.find_element_by_android_uiautomator(
                    'new UiSelector().text("添加")').click()
                sleep(2)
                #com.pnlyy.pnlclass.pnlclass_student.ceshi:id/tvMusicBookName
                driver.find_elements_by_id(
                    'com.pnlyy.pnlclass.pnlclass_student.ceshi:id/tvName'
                )[0].click()
                sleep(3)
                now = time.strftime('%Y-%m-%d %H_%M_%S')
                sf2 = './' + now + '_024b_uploadedMusicByBeforeDetail_R.png'
                driver.get_screenshot_as_file(sf2)
                sleep(2)
                turnpage_play(self)
                sleep(2)
                k = 1
                driver.find_element_by_android_uiautomator(
                    'new UiSelector().text("返回")').click()
                sleep(2)
            else:
                k = 0
            driver.find_element_by_android_uiautomator(
                'new UiSelector().text("返回")').click()
            sleep(2)
            driver.find_element_by_android_uiautomator(
                'new UiSelector().text("返回")').click()
            sleep(2)
            now = time.strftime('%Y-%m-%d %H_%M_%S')
            sf0 = './' + now + '_024b_uploadedMusicByBefore_R.png'
            driver.get_screenshot_as_file(sf0)
            sleep(2)
            driver.find_element_by_android_uiautomator(
                'new UiSelector().text("上传乐谱")').click()
            sleep(2)
            driver.find_element_by_android_uiautomator(
                'new UiSelector().text("自主上传")').click()
            sleep(2)
            driver.find_element_by_android_uiautomator(
                'new UiSelector().text("从相册选择")').click()
            sleep(2)
            driver.find_elements_by_id(
                'com.pnlyy.pnlclass.pnlclass_student.ceshi:id/indexTv'
            )[3].click()
            sleep(2)
            driver.find_element_by_android_uiautomator(
                'new UiSelector().text("完成")').click()
            sleep(8)
            now = time.strftime('%Y-%m-%d %H_%M_%S')
            sf2 = './' + now + '_024b_uploadedMusicByAlbum_R.png'
            driver.get_screenshot_as_file(sf2)
            sleep(2)
            #com.pnlyy.pnlclass.pnlclass_student.ceshi:id/tvName
            print('\ni=' + str(i) + '---k=' + str(k) + '---i+k=' + str(i + k))
            driver.find_elements_by_id(
                'com.pnlyy.pnlclass.pnlclass_student.ceshi:id/tvName')[
                    i + k].click()
            sleep(3)
            now = time.strftime('%Y-%m-%d %H_%M_%S')
            sf0 = './' + now + '_024b_searchedMusicByKeywordDetail_R.png'
            driver.get_screenshot_as_file(sf0)
            sleep(2)
            #turnpage_play(self)
            #sleep(2)
            driver.find_element_by_android_uiautomator(
                'new UiSelector().text("返回")').click()
            sleep(2)
            driver.find_element_by_android_uiautomator(
                'new UiSelector().text("上传乐谱")').click()
            sleep(2)
            driver.find_element_by_android_uiautomator(
                'new UiSelector().text("自主上传")').click()
            sleep(2)
            driver.find_element_by_android_uiautomator(
                'new UiSelector().text("拍照上传")').click()
            sleep(2)
            driver.find_element_by_android_uiautomator(
                'new UiSelector().text("始终允许")').click()
            sleep(4)
            driver.find_element_by_id(
                'com.huawei.camera:id/shutter_button').click()
            sleep(2)
            #com.huawei.camera:id/btn_review_confirm
            driver.find_element_by_id(
                'com.huawei.camera:id/btn_review_confirm').click()
            sleep(2)
            driver.find_element_by_android_uiautomator(
                'new UiSelector().text("完成")').click()
            sleep(10)
            now = time.strftime('%Y-%m-%d %H_%M_%S')
            sf1 = './' + now + '_024b_uploadedMusicBySelfie_R.png'
            driver.get_screenshot_as_file(sf1)
            sleep(2)
            #for selfie
            #add codes here
            driver.find_elements_by_id(
                'com.pnlyy.pnlclass.pnlclass_student.ceshi:id/tvName')[
                    i + k + 1].click()
            sleep(3)
            now = time.strftime('%Y-%m-%d %H_%M_%S')
            sf2 = './' + now + '_024b_uploadedMusicBySelfieDetail_R.png'
            driver.get_screenshot_as_file(sf2)
            sleep(2)
            #turnpage_play(self)
            #sleep(2)
            driver.find_element_by_android_uiautomator(
                'new UiSelector().text("返回")').click()
            sleep(3)
        driver.find_element_by_android_uiautomator(
            'new UiSelector().text("返回")').click()
        sleep(3)
        logout(self)
        now = time.strftime('%Y-%m-%d %H_%M_%S')
        print('\n024:上传乐谱----结束:' + now)
Exemplo n.º 5
0
 def uploadMusicByOneself(self):
     driver=self.driver
     sleep(2)
     now=time.strftime('%Y-%m-%d %H_%M_%S')
     print('\n024:自主上传乐谱----开始:'+now)
     login(self)
     sleep(3)
     tt=driver.find_elements_by_accessibility_id('上节课程')
     if len(tt)!=0:
         driver.find_element_by_accessibility_id('上节课程').click()
         flag=driver.find_elements_by_class_name('XCUIElementTypeStaticText')[1].text
     else:
         flag=driver.find_elements_by_class_name('XCUIElementTypeStaticText')[2].text
     sleep(2)
     #ic upload1
     print('\n'+flag)
     print('\n已开始:'+str('已开始' in flag))
     print('\n已结束:'+str('已结束' in flag))
     sleep(1)
     b=driver.find_elements_by_accessibility_id('上传乐谱')
     if len(b)!=0:
         driver.find_element_by_accessibility_id('上传乐谱').click()
     else:
         #ic Sheet music
         driver.find_element_by_accessibility_id('查看乐谱').click()
     sleep(2)
     aler=driver.find_elements_by_accessibility_id('好')
     if len(aler)!=0:
         driver.find_element_by_accessibility_id('好').click()
         sleep(3)
     now=time.strftime('%Y-%m-%d %H_%M_%S')
     sf='./'+now+'_024b_uploadedMusicIni_R.png'
     driver.get_screenshot_as_file(sf)
     sleep(2)
     lis=driver.find_elements_by_class_name('XCUIElementTypeCell')
     i=len(lis)
     print('\ni:'+str(i)+'----实际已有乐谱数量:'+str(i-1))
     sleep(2)
     #delete existing music
     if (i!=1 and (not ('已开始' in flag) and not ('已结束' in flag))):
         for j in range(i-1):
             driver.find_element_by_accessibility_id('删除').click()
             sleep(3)
             driver.find_element_by_accessibility_id('确定').click()
             sleep(2)
         sleep(2)
         driver.find_element_by_accessibility_id('上传乐谱').click()
         sleep(2)
         """
         driver.find_element_by_accessibility_id('自主上传').click()
         sleep(2)
         driver.find_element_by_accessibility_id('取消').click()
         sleep(2)
         """
         driver.find_element_by_accessibility_id('自主上传').click()
         sleep(3)
         driver.find_element_by_accessibility_id('最近上过的乐谱').click()
         sleep(3)
         driver.find_element_by_accessibility_id('   添 加   ').click()
         #add=driver.find_elements_by_class_name('XCUIElementTypeButton')[1]
         #add.click()
         #print('S'+add.text+'S')
         sleep(3)
         driver.find_element_by_accessibility_id('ic nav back').click()
         sleep(2)
         now=time.strftime('%Y-%m-%d %H_%M_%S')
         sf0='./'+now+'_024b_uploadedMusicByBefore_R.png'
         driver.get_screenshot_as_file(sf0)
         sleep(2)
         #[i] for not deleting firstly
         driver.find_elements_by_class_name('XCUIElementTypeCell')[1].click()
         sleep(2)
         now=time.strftime('%Y-%m-%d %H_%M_%S')
         sf2='./'+now+'_024b_uploadedMusicByBeforeDetail_R.png'
         driver.get_screenshot_as_file(sf2)
         sleep(2)
         turnpage_play(self)
         sleep(2)
         driver.find_element_by_accessibility_id('ic nav back').click()
         sleep(2)
         driver.find_element_by_accessibility_id('上传乐谱').click()
         sleep(3)
         driver.find_element_by_accessibility_id('自主上传').click()
         sleep(3)
         driver.find_element_by_accessibility_id('从相册选择').click()
         sleep(2)
         driver.find_elements_by_class_name('XCUIElementTypeButton')[7].click()
         sleep(2)
         driver.find_element_by_accessibility_id('完成').click()
         sleep(8)
         now=time.strftime('%Y-%m-%d %H_%M_%S')
         sf2='./'+now+'_024b_uploadedMusicByAlbum_R.png'
         driver.get_screenshot_as_file(sf2)
         sleep(2)
         #[i+1] for not deleting firstly
         driver.find_elements_by_class_name('XCUIElementTypeCell')[2].click()
         sleep(8)
         now=time.strftime('%Y-%m-%d %H_%M_%S')
         sf2='./'+now+'_024b_uploadedMusicByAlbumDetail_R.png'
         driver.get_screenshot_as_file(sf2)
         sleep(2)
         driver.find_element_by_accessibility_id('ic nav back').click()
         sleep(2)
         driver.find_element_by_accessibility_id('上传乐谱').click()
         sleep(2)
         driver.find_element_by_accessibility_id('自主上传').click()
         sleep(3)
         driver.find_element_by_accessibility_id('拍照上传').click()
         sleep(2)
         driver.find_element_by_accessibility_id('ic_ photograph').click()
         sleep(2)
         aler2=driver.find_elements_by_accessibility_id('好')
         if len(aler2)!=0:
             driver.find_element_by_accessibility_id('好').click()
             sleep(3)
         driver.find_element_by_xpath('//XCUIElementTypeButton[@name="FrontBackFacingCameraChooser"]').click()
         #TouchAction(self.driver).press(x=343,y=619).wait(100).release().perform()
         sleep(3)
         #PhotoCapture
         driver.find_element_by_accessibility_id('PhotoCapture').click()
         sleep(2)
         driver.find_element_by_accessibility_id('使用照片').click()
         sleep(3)
         driver.find_element_by_accessibility_id('完成').click()
         sleep(10)
         now=time.strftime('%Y-%m-%d %H_%M_%S')
         sf1='./'+now+'_024b_uploadedMusicBySelfie_R.png'
         driver.get_screenshot_as_file(sf1)
         sleep(2)
         #[i+2] for not deleting firstly
         driver.find_elements_by_class_name('XCUIElementTypeCell')[3].click()
         sleep(8)
     else:
         driver.find_element_by_accessibility_id('上传乐谱').click()
         sleep(2)
         driver.find_element_by_accessibility_id('自主上传').click()
         sleep(2)
         driver.find_element_by_accessibility_id('取消').click()
         sleep(2)
         driver.find_element_by_accessibility_id('自主上传').click()
         sleep(3)
         driver.find_element_by_accessibility_id('最近上过的乐谱').click()
         sleep(3)
         driver.find_element_by_accessibility_id('   添 加   ').click()
         #add=driver.find_elements_by_class_name('XCUIElementTypeButton')[1]
         #add.click()
         #print('S'+add.text+'S')
         sleep(3)
         driver.find_element_by_accessibility_id('ic nav back').click()
         sleep(2)
         now=time.strftime('%Y-%m-%d %H_%M_%S')
         sf0='./'+now+'_024b_uploadedMusicByBefore_R.png'
         driver.get_screenshot_as_file(sf0)
         sleep(2)
         #[i] for not deleting firstly
         driver.find_elements_by_class_name('XCUIElementTypeCell')[i].click()
         sleep(2)
         now=time.strftime('%Y-%m-%d %H_%M_%S')
         sf2='./'+now+'_024b_uploadedMusicByBeforeDetail_R.png'
         driver.get_screenshot_as_file(sf2)
         sleep(2)
         turnpage_play(self)
         sleep(2)
         driver.find_element_by_accessibility_id('ic nav back').click()
         sleep(2)
         driver.find_element_by_accessibility_id('上传乐谱').click()
         sleep(3)
         driver.find_element_by_accessibility_id('自主上传').click()
         sleep(3)
         driver.find_element_by_accessibility_id('从相册选择').click()
         sleep(2)
         driver.find_elements_by_class_name('XCUIElementTypeButton')[4].click()
         sleep(2)
         driver.find_element_by_accessibility_id('完成').click()
         sleep(8)
         now=time.strftime('%Y-%m-%d %H_%M_%S')
         sf2='./'+now+'_024b_uploadedMusicByAlbum_R.png'
         driver.get_screenshot_as_file(sf2)
         sleep(2)
         #[i+1] for not deleting firstly
         driver.find_elements_by_class_name('XCUIElementTypeCell')[i+1].click()
         sleep(8)
         now=time.strftime('%Y-%m-%d %H_%M_%S')
         sf2='./'+now+'_024b_uploadedMusicByAlbumDetail_R.png'
         driver.get_screenshot_as_file(sf2)
         sleep(2)
         driver.find_element_by_accessibility_id('ic nav back').click()
         sleep(2)
         driver.find_element_by_accessibility_id('上传乐谱').click()
         sleep(2)
         driver.find_element_by_accessibility_id('自主上传').click()
         sleep(3)
         driver.find_element_by_accessibility_id('拍照上传').click()
         sleep(2)
         driver.find_element_by_accessibility_id('ic_ photograph').click()
         sleep(2)
         aler1=driver.find_elements_by_accessibility_id('好')
         if len(aler1)!=0:
             driver.find_element_by_accessibility_id('好').click()
             sleep(3)
         driver.find_element_by_xpath('//XCUIElementTypeButton[@name="FrontBackFacingCameraChooser"]').click()
         #TouchAction(self.driver).press(x=343,y=619).wait(100).release().perform()
         sleep(3)
         #PhotoCapture
         driver.find_element_by_accessibility_id('PhotoCapture').click()
         sleep(2)
         driver.find_element_by_accessibility_id('使用照片').click()
         sleep(3)
         driver.find_element_by_accessibility_id('完成').click()
         sleep(10)
         now=time.strftime('%Y-%m-%d %H_%M_%S')
         sf1='./'+now+'_024b_uploadedMusicBySelfie_R.png'
         driver.get_screenshot_as_file(sf1)
         sleep(2)
         #[i+2] for not deleting firstly
         driver.find_elements_by_class_name('XCUIElementTypeCell')[i+2].click()
         sleep(8)
     now=time.strftime('%Y-%m-%d %H_%M_%S')
     sf2='./'+now+'_024b_uploadedMusicBySelfieDetail_R.png'
     driver.get_screenshot_as_file(sf2)
     sleep(2)
     driver.find_element_by_accessibility_id('ic nav back').click()
     sleep(2)
     driver.find_element_by_accessibility_id('ic nav back').click()
     sleep(2)
     logout(self)
     now=time.strftime('%Y-%m-%d %H_%M_%S')
     print('\n024:自主上传乐谱----结束:'+now)