Esempio n. 1
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)
Esempio n. 2
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)
Esempio n. 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)
Esempio n. 4
0
    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('水平居中', '下对齐')
Esempio n. 5
0
    def test_cell_insert_delete_fit(self):  # 插入删除行宽列高清除
        logging.info('==========test_cell_inser_delete_fit==========')
        cv = CreateView(self.driver)
        type = 'ss'
        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)
        for i in range(20):
            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('编辑')
        gv = GeneralView(self.driver)
        gv.font_style(type, '删除线')

        ele1 = '//*[@text="编辑"]'
        ele2 = '//*[@text="字体颜色"]'
        ele3 = '//*[@text="单元格填充"]'
        ele4 = '//*[@text="数字格式"]'
        ele5 = '//*[@text="插入单元格"]'
        ele6 = '//*[@text="删除单元格"]'
        ele7 = '//*[@text="设置行高列宽"]'
        ss.swipe_ele(ele2, ele1)
        ss.swipe_ele(ele3, ele1)
        ss.swipe_ele(ele4, ele1)
        ss.cell_insert('右移')
        ss.cell_insert('下移')
        ss.cell_insert('插入整行')
        ss.cell_insert('插入整列')
        ss.cell_delete('删除整列')
        ss.cell_delete('删除整行')
        ss.cell_delete('上移')
        ss.cell_delete('左移')
        ss.swipe_ele(ele5, ele1)
        ss.cell_set_size(5, 5)
        ss.group_button_click('编辑')
        ss.cell_clear('清除格式')
        gv.undo_option()
        ss.cell_clear('清除内容')
        gv.undo_option()
        ss.cell_clear('清除所有')
        gv.undo_option()
        ss.swipe_ele(ele6, ele7)
        ss.cell_fit_height()
        ss.cell_fit_width()
        time.sleep(3)
Esempio n. 6
0
    def test_ss_cell_options(self):  # 插入删除行宽列高清除
        logging.info('==========test_ss_cell_options==========')
        cv = CreateView(self.driver)
        cv.create_file('ss')
        ss = SSView(self.driver)
        ss.cell_edit()
        # x, y, width, height = ss.cell_location()
        # ss.tap(x - width * 2, y - height * 4)
        # ss.cell_edit()
        for i in range(20):
            self.driver.press_keycode(45)
        self.driver.find_element(
            By.ID, 'com.yozo.office.en:id/formulabar_ok').click()
        ss.group_button_click(' Edit ')
        gv = GeneralView(self.driver)
        gv.font_style(self.file_type, '删除线')

        ele = '//*[@resource-id="com.yozo.office.en:id/yozo_ui_option_content_container"]'
        ss.swipe_options(ele, 'up')
        ss.swipe_options(ele, 'up')
        ss.swipe_options(ele, 'up')
        ss.swipe_options(ele, 'up')

        ss.cell_insert('右移')
        ss.cell_insert('下移')
        ss.cell_insert('插入整行')
        ss.cell_insert('插入整列')
        ss.cell_delete('删除整列')
        ss.cell_delete('删除整行')
        ss.cell_delete('上移')
        ss.cell_delete('左移')

        ss.cell_clear('清除格式')
        gv.undo_option()
        ss.cell_clear('清除内容')
        gv.undo_option()
        ss.cell_clear('清除所有')
        gv.undo_option()

        ss.swipe_options(ele, 'up')
        ss.cell_set_size(5, 5)
        ss.group_button_click(' Edit ')

        ss.swipe_options(ele, 'down')
        ss.cell_fit_height()
        ss.cell_fit_width()
        time.sleep(1)
Esempio n. 7
0
    def test_font_attr(self):
        logging.info('==========test_font_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)
        for i in range(5):
            self.driver.press_keycode(45)
        self.driver.find_element(By.ID, 'com.yozo.office:id/formulabar_ok').click()

        gv = GeneralView(self.driver)
        gv.group_button_click('编辑')
        type = 'ss'
        gv.font_name(type)
        gv.font_size(23)
        gv.font_style(type, '加粗')
        gv.font_style(type, '倾斜')
        gv.font_style(type, '删除线')
        gv.font_style(type, '下划线')
        gv.font_color(type)
Esempio n. 8
0
    def test_ss_cell_edit(self):
        logging.info('==========test_ss_cell_edit==========')
        cv = CreateView(self.driver)
        ss = SSView(self.driver)
        cv.create_file('ss')
        ss.cell_edit()

        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)

        for i in range(5):
            self.driver.press_keycode(45)
        self.driver.find_element(
            By.ID, 'com.yozo.office.en:id/formulabar_ok').click()