def test_wp_font_attr(self): logging.info('==========test_wp_font_attr===========') cv = CreateView(self.driver) cv.create_file(self.file_type) time.sleep(1) wp = WPView(self.driver) wp.group_button_click(' Edit ') wp.font_size(16) wp.font_style(self.file_type, '倾斜') wp.font_color(self.file_type, 3) ele1 = '//*[@text=" Edit "]' ele2 = '//*[@text=" Font Color "]' ele3 = '//*[@text=" Highlight Color "]' ele4 = '//*[@text=" Columns "]' wp.swipe_ele(ele2, ele1) time.sleep(1) wp.tap(450, 450) for i in range(100): self.driver.press_keycode(random.randint(29, 54)) wp.group_button_click(' Edit ') wp.drag_coordinate(450, 500, 200, 500) wp.high_light_color(self.file_type, 3) wp.bullets_numbers(self.file_type, 6, 14) wp.text_align(self.file_type, '右对齐') wp.swipe_ele(ele3, ele1) wp.text_line_space(self.file_type, 2.5) wp.text_indent(self.file_type, '右缩进') wp.swipe_ele(ele4, ele1) wp.text_columns(4) wp.text_columns(3) wp.text_columns(2) time.sleep(3)
def test_wp_text_select(self): # 文本选取 logging.info('==========test_wp_text_select==========') ov = OpenView(self.driver) ov.open_file('欢迎使用永中Office.docx') wp = WPView(self.driver) wp.switch_write_read() x, y = wp.get_size() wp.drag_coordinate(x * 0.5, y * 0.4, x * 0.6, y * 0.5) time.sleep(3)
def test_wp_text_select(self): # 文本选取 logging.info('==========test_wp_text_select==========') 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.switch_write_read() x, y = wp.get_size() wp.drag_coordinate(x * 0.5, y * 0.4, x * 0.6, y * 0.5) time.sleep(3)