def test_merge_wrap(self): logging.info('==========test_merge_wrap==========') 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(20): self.driver.press_keycode(45) self.driver.find_element(By.ID, 'com.yozo.office:id/formulabar_ok').click() cv.drag_coordinate(110 + 263 * 2, 295 + 55 * 2, 110 + 263 * 3, 295 + 55 * 2) ss = SSView(self.driver) ss.group_button_click('编辑') ele1 = '//*[@text="编辑"]' ele2 = '//*[@text="字体颜色"]' ele3 = '//*[@text="单元格填充"]' ele4 = '//*[@text="数字格式"]' ss.swipe_ele(ele2, ele1) ss.swipe_ele(ele3, ele1) ss.swipe_ele(ele4, ele1) ss.cell_merge_split() ss.cell_merge_split() ss.cell_auto_wrap() ss.cell_auto_wrap() time.sleep(3)
def test_ss_merge_wrap(self): logging.info('==========test_ss_merge_wrap==========') gv = GeneralView(self.driver) cv = CreateView(self.driver) cv.create_file('ss') ss = SSView(self.driver) ss.cell_edit() x, y, width, height = ss.cell_location() 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.tap(x + width * 1.5, y + height * 2.5) x1, y1 = gv.find_pic_position("drag_point1") cv.drag_coordinate(x1, y1, x, y) ss.group_button_click(' Edit ') 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.cell_merge_split() ss.cell_merge_split() ss.cell_auto_wrap() ss.cell_auto_wrap() time.sleep(1)