def test_wp_jump(self):  # 跳转页
     logging.info('==========test_wp_bookmark==========')
     ov = OpenView(self.driver)
     ov.open_file('欢迎使用永中Office.docx')
     wp = WPView(self.driver)
     wp.group_button_click('查看')
     wp.page_jump(7)
     time.sleep(2)
Beispiel #2
0
 def test_wp_jump(self):  # 跳转页
     logging.info('==========test_wp_bookmark==========')
     gv = GeneralView(self.driver)
     gv.jump_to_index('alldoc')
     gv.select_file_type('wp')
     gv.sort_files('size', 'down')
     eles = self.driver.find_elements(By.ID,
                                      'com.yozo.office.en:id/file_item')
     eles[0].click()
     wp = WPView(self.driver)
     wp.group_button_click(' File ')
     total_pages = self.driver.find_element(
         By.ID, 'com.yozo.office.en:id/yozo_id_print_wp_page_count').text
     str_list = total_pages.split(' ')
     total_pages = int(str_list[1])
     wp.group_button_click(' View ')
     wp.page_jump(total_pages)
     time.sleep(2)