def test_ss_cell_select(self): logging.info('==========test_ss_cell_select==========') cv = CreateView(self.driver) ss = SSView(self.driver) cv.create_file('ss') ss.cell_edit() self.driver.press_keycode(45) self.driver.press_keycode(45) self.driver.press_keycode(45) self.driver.press_keycode(45) self.driver.find_element( By.ID, 'com.yozo.office.en:id/formulabar_ok').click() gv = GeneralView(self.driver) gv.group_button_click(' Edit ') gv.font_name(self.file_type) gv.font_size(23) gv.font_style(self.file_type, '加粗') gv.font_style(self.file_type, '倾斜') gv.font_style(self.file_type, '删除线') gv.font_style(self.file_type, '下划线') gv.font_color(self.file_type) ele = '//*[@resource-id="com.yozo.office.en:id/yozo_ui_option_content_container"]' ss.swipe_options(ele, 'up') ss.cell_color() ss.cell_align('水平居中', '下对齐')
def test_cell_attr(self): logging.info('==========test_cell_attr==========') cv = CreateView(self.driver) cv.create_file('ss') time.sleep(1) cv.tap(110 + 263 * 1.5, 295 + 55 * 1.5) # 双击进入编辑 cv.tap(110 + 263 * 1.5, 295 + 55 * 1.5) self.driver.press_keycode(45) self.driver.press_keycode(45) self.driver.press_keycode(45) self.driver.press_keycode(45) self.driver.find_element(By.ID, 'com.yozo.office:id/formulabar_ok').click() ss = SSView(self.driver) ss.group_button_click('编辑') time.sleep(1) self.driver.swipe(200, 1856, 200, 1150, 2000) ss.cell_align('水平居中', '下对齐')