예제 #1
0
 def test_ss_data_table(self):  # 数据排序,工作表格式
     logging.info('==========test_ss_data_table==========')
     cv = CreateView(self.driver)
     cv.create_file('ss')
     ss = SSView(self.driver)
     ss.cell_edit()
     x, y, width, height = ss.cell_location()
     for i in range(8):
         ss.tap(x + width * 0.5, y + height * (1.5 + i))
         ss.tap(x + width * 1.5, y + height * (1.5 + i))
         ss.cell_edit()
         self.driver.press_keycode(random.randint(7, 16))
     ss.group_button_click(' View ')
     ss.data_sort(' Sort Z to A ')
     ss.data_sort(' Sort A to Z ')
     ss.sheet_style(' Hide formula bar ')
     ss.sheet_style(' Hide formula bar ')
     ele = '//android.widget.ScrollView'
     ss.swipe_options(ele, 'up')
     ss.sheet_style(' Hide row and column headers ')
     ss.sheet_style(' Hide row and column headers ')
     ss.sheet_style(' Hide gridlines ')
     ss.sheet_style(' Hide gridlines ')
     ss.sheet_style(' Freeze Window ')
     self.driver.find_element(
         By.ID,
         'com.yozo.office.en:id/yozo_ui_ss_option_id_freeze_current').click(
         )
     self.driver.find_element(
         By.ID,
         'com.yozo.office.en:id/yozo_ui_ss_option_id_freeze_row').click()
     self.driver.find_element(
         By.ID,
         'com.yozo.office.en:id/yozo_ui_ss_option_id_freeze_column').click(
         )
     self.driver.find_element(
         By.ID, 'com.yozo.office.en:id/yozo_ui_option_back_button').click()
     ss.sheet_style(' Unfreeze ')
     ss.sheet_style('100%')
예제 #2
0
 def test_data_table(self):  # 数据排序,工作表格式
     logging.info('==========test_data_table==========')
     cv = CreateView(self.driver)
     cv.create_file('ss')
     time.sleep(1)
     for i in range(10):
         time.sleep(1)
         cv.tap(110 + 263 * 1.5, 295 + 55 * (1.5 + i))  # 双击进入编辑
         cv.tap(110 + 263 * 1.5, 295 + 55 * (1.5 + i))
         self.driver.press_keycode(random.randint(7, 16))
     ss = SSView(self.driver)
     ss.group_button_click('查看')
     time.sleep(1)
     ss.data_sort('降序')
     ss.data_sort('升序')
     ss.sheet_style('隐藏编辑栏')
     ss.sheet_style('隐藏编辑栏')
     ss.sheet_style('隐藏表头')
     ss.sheet_style('隐藏表头')
     ss.sheet_style('隐藏网格线')
     # ss.sheet_style('冻结窗口') 功能未完成
     # ss.sheet_style('取消冻结')
     ss.sheet_style('100%')
     time.sleep(3)