Example #1
0
 def test_shape_text_attr_pg(self):  # 自选图形文本属性,仅WP和PG
     logging.info('==========test_shape_text_attr_pg==========')
     type = 'pg'
     cv = CreateView(self.driver)
     cv.create_file(type)
     gv = GeneralView(self.driver)
     gv.group_button_click('插入')
     gv.insert_shape(type, 1)
     gv.group_button_click('编辑')
     gv.font_name(type, 'AndroidClock')
     gv.font_size(15)
     gv.font_style(type, '倾斜')
     gv.font_color(type, 6, 29)
     gv.swipe_ele('//*[@text="字体颜色"]', '//*[@text="编辑"]')
     time.sleep(1)
     gv.tap(550, 450)
     time.sleep(1)
     gv.tap(550, 450, 6)
     time.sleep(1)
     for i in range(20):
         self.driver.press_keycode(random.randint(29, 54))
     time.sleep(1)
     gv.group_button_click('编辑')
     # gv.high_light_color(type,6,6)
     gv.bullets_numbers(type, 6, 10)
     gv.text_align(type, '分散对齐')
     gv.text_align(type, '右对齐')
     gv.text_line_space(type, 1.5)
     gv.text_line_space(type, 3)
     gv.text_indent(type, '右缩进')
     gv.text_indent(type, '右缩进')
     gv.text_indent(type, '左缩进')
     time.sleep(3)
Example #2
0
 def test_wp_shape_text_attr(self):  # 自选图形文本属性,仅WP和PG
     logging.info('==========test_wp_shape_text_attr==========')
     cv = CreateView(self.driver)
     cv.create_file(self.file_type)
     gv = GeneralView(self.driver)
     gv.group_button_click(' Insert ')
     gv.insert_shape(self.file_type, 1)
     gv.tap(680, 750)
     gv.pop_menu_click('editText')
     time.sleep(1)
     gv.group_button_click(' Edit ')
     gv.font_name(self.file_type, 'AndroidClock')
     gv.font_size(15)
     gv.font_style(self.file_type, '倾斜')
     gv.font_color(self.file_type, 6, 29)
     gv.swipe_ele('//*[@text=" Font Color "]', '//*[@text=" Edit "]')
     time.sleep(1)
     for i in range(20):
         self.driver.press_keycode(random.randint(29, 54))
     time.sleep(1)
     gv.swipe_ele('//*[@text=" Highlight Color "]', '//*[@text=" Edit "]')
     gv.drag_coordinate(680, 750, 680, 600)
     gv.high_light_color(self.file_type, 6, random.randint(1, 15))
     gv.bullets_numbers(self.file_type, 6, 10)
     gv.text_align(self.file_type, '分散对齐')
     gv.text_align(self.file_type, '右对齐')
     gv.text_line_space(self.file_type, 1.5)
     gv.text_line_space(self.file_type, 3)
     gv.text_indent(self.file_type, '右缩进')
     gv.text_indent(self.file_type, '右缩进')
     gv.text_indent(self.file_type, '左缩进')
     time.sleep(3)
Example #3
0
 def test_shape_text_attr_pg(self):  # 自选图形文本属性,仅WP和PG
     logging.info('==========test_shape_text_attr_pg==========')
     cv = CreateView(self.driver)
     cv.create_file(self.file_type)
     gv = GeneralView(self.driver)
     gv.group_button_click(' Insert ')
     gv.insert_shape(self.file_type, 1)
     gv.group_button_click(' Edit ')
     gv.font_name(self.file_type, 'AndroidClock')
     gv.font_size(15)
     gv.font_style(self.file_type, '倾斜')
     gv.font_color(self.file_type, 6, 29)
     gv.swipe_ele('//*[@text=" Font Color "]', '//*[@text=" Edit "]')
     gv.fold_expand()
     time.sleep(1)
     x, y = gv.find_pic_position('drag_all')
     gv.tap(x, y)  # 进入 Edit
     gv.pop_menu_click('editText')
     for i in range(20):
         self.driver.press_keycode(random.randint(29, 54))
     time.sleep(1)
     gv.group_button_click(' Edit ')
     gv.bullets_numbers('pg', 6, 10)
     gv.text_align(self.file_type, '分散对齐')
     gv.text_align(self.file_type, '右对齐')
     gv.text_line_space(self.file_type, 1.5)
     gv.text_line_space(self.file_type, 3)
     gv.text_indent(self.file_type, '右缩进')
     gv.text_indent(self.file_type, '右缩进')
     gv.text_indent(self.file_type, '左缩进')
     time.sleep(3)