Пример #1
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')
Пример #2
0
 def test_wp_pop_menu_text(self):
     logging.info('==========test_wp_pop_menu_text==========')
     cv = CreateView(self.driver)
     cv.create_file(self.file_type)
     gv = GeneralView(self.driver)
     time.sleep(1)
     gv.tap(700, 700)
     for i in range(100):
         self.driver.press_keycode(random.randint(29, 54))
     gv.drag_coordinate(300, 540, 300, 200)
     gv.pop_menu_click('copy')
     gv.tap(700, 700)
     time.sleep(1)
     gv.long_press(700, 700)
     gv.pop_menu_click('paste')
     gv.drag_coordinate(300, 540, 300, 200)
     gv.pop_menu_click('cut')
     gv.tap(700, 700)
     time.sleep(1)
     gv.long_press(700, 700)
     gv.pop_menu_click('paste')
Пример #3
0
    def test_pop_menu_shape(self, file_type='wp'):
        logging.info('==========test_pop_menu_shape==========')
        cv = CreateView(self.driver)
        cv.create_file(file_type)
        gv = GeneralView(self.driver)
        gv.group_button_click(' Insert ')
        gv.insert_shape(file_type)
        time.sleep(1)
        if file_type == 'pg':
            gv.tap(550, 450)
            gv.pop_menu_click('editText')
        else:
            gv.tap(700, 700, 2)
            gv.tap(700, 700, 3)

        for i in range(50):
            self.driver.press_keycode(random.randint(29, 54))

        if file_type == 'pg':
            gv.drag_coordinate(550, 830, 500, 800)
            gv.pop_menu_click('copy')
            gv.tap(550, 830)
            time.sleep(1)
            gv.long_press(550, 830)
            gv.pop_menu_click('paste')
            gv.drag_coordinate(550, 830, 500, 800)
            gv.pop_menu_click('cut')
            gv.tap(550, 830)
            time.sleep(1)
            gv.long_press(550, 830)
            gv.pop_menu_click('paste')
            gv.drag_coordinate(550, 830, 500, 800)
            gv.pop_menu_click('delete')
        else:
            gv.drag_coordinate(700, 700, 550, 550)
            gv.pop_menu_click('copy')
            gv.tap(700, 700)
            time.sleep(1)
            gv.long_press(700, 700)
            gv.pop_menu_click('paste')
            gv.drag_coordinate(700, 700, 550, 550)
            gv.pop_menu_click('cut')
            gv.tap(700, 700)
            time.sleep(1)
            gv.long_press(700, 700)
            gv.pop_menu_click('paste')
            gv.drag_coordinate(700, 700, 550, 550)
            gv.pop_menu_click('delete')