示例#1
0
    def test_insert_pic(self, file_type='ss'):
        logging.info('==========test_insert_pic==========')
        cv = CreateView(self.driver)
        gv = GeneralView(self.driver)
        cv.create_file(file_type)
        cv.group_button_click(' Insert ')

        gv.insert_pic()
        gv.pic_option(file_type, 5, 4, 4)
        gv.pic_option(file_type, 1)
        ele1 = '//*[@text=" Picture "]'
        ele2 = '//*[@text=" Outline "]'
        # ele3 = '//*[@text="文字环绕"]'
        # ele4 = '//*[@text="叠放次序"]'
        gv.swipe_ele(ele2, ele1)
        if file_type == 'wp':
            gv.text_wrap()

        x, y = gv.find_pic_position('rotate_free')
        gv.swipe(x, y, x + 100, y + 100)

        x, y = gv.find_pic_position('drag_all')
        gv.tap(x, y)
        gv.pop_menu_click('copy')
        gv.tap(x, y)
        gv.pop_menu_click('paste')
        gv.tap(x, y)
        gv.pop_menu_click('paste')
        gv.shape_layer(' Send Backward ')
        gv.shape_layer(' Send to Back ')
        gv.shape_layer(' Bring Forward ')
        gv.shape_layer(' Bring to Front ')
示例#2
0
    def test_insert_pic1(self, file_type='ss'):
        logging.info('==========test_insert_pic==========')
        suffix = SEARCH_DICT[file_type]
        ov = OpenView(self.driver)
        ov.open_random_file(suffix)
        gv = GeneralView(self.driver)
        gv.switch_write_read()
        gv.group_button_click(' Insert ')

        gv.insert_pic()
        gv.pic_option(file_type, 5, 4, 4)
        ele1 = '//*[@text=" Picture "]'
        ele2 = '//*[@text=" Outline "]'
        # ele3 = '//*[@text="文字环绕"]'
        # ele4 = '//*[@text="叠放次序"]'
        gv.swipe_ele(ele2, ele1)
        if file_type == 'wp':
            gv.text_wrap(' Square ')
            gv.text_wrap(' In Line with Text ')
            gv.text_wrap(' Tight ')
            gv.text_wrap(' Behind Text ')
            gv.text_wrap(' In Front of Text ')

        x, y = gv.find_pic_position('drag_pic')
        gv.tap(x, y)
        gv.pop_menu_click('cut')
        if file_type == 'wp':
            gv.long_press(x, y)
        else:
            gv.tap(x + 100, y)
            gv.tap(x + 100, y)
        gv.pop_menu_click('paste')

        x, y = gv.find_pic_position('drag_pic')
        gv.tap(x, y)
        x, y = gv.find_pic_position('rotate_90')
        gv.swipe(x, y, x - 50, y)

        gv.pop_menu_click('save_to_album')

        gv.pop_menu_click('delete')