Ejemplo n.º 1
0
    def test_move_file(self, driver):
        Actions.clickButtonXP(self, driver, Locators.MENU_BUTTON_XP)
        Actions.clickButtonXP(self, driver, Locators.PICTURES_BUTTON_XP)
        Actions.clickButtonXP(self, driver, Locators.SUBMENU_BUTTON_XP)
        Actions.clickButtonXP(self, driver, Locators.SELECT_ALL_BUTTON_XP)

        count_on_pictures_page_before = Actions.count_of_all_selected(self, driver)

        Actions.clickButtonXP(self, driver, Locators.BACK_BUTTON_IF_SELECTED_XP)
        Actions.clickButtonXP(self, driver, Locators.MENU_BUTTON_XP)
        Actions.clickButtonXP(self, driver, Locators.CAMERA_BUTTON_XP)

        Actions.longtap(self, driver, Locators.FIRST_FILE_FOLDER_XP)
        Actions.clickButtonXP(self, driver, Locators.SUBMENU_BUTTON_XP)
        Actions.clickButtonXP(self, driver, Locators.MOVE_BUTTON_XP)
        Actions.clickButtonID(self, driver, Locators.CANCEL_MOVE_BUTTON_ID)

        assert Actions.isObjectExistsID(self, driver, Locators.IS_SELECTED_FILE_ID) == False

        Actions.longtap(self, driver, Locators.FIRST_FILE_FOLDER_XP)
        Actions.clickButtonXP(self, driver, Locators.SUBMENU_BUTTON_XP)
        Actions.clickButtonXP(self, driver, Locators.MOVE_BUTTON_XP)
        Actions.clickButtonXP(self, driver, Locators.MENU_BUTTON_XP)
        Actions.clickButtonXP(self, driver, Locators.PICTURES_BUTTON_XP)
        Actions.clickButtonID(self, driver, Locators.OK_MOVE_BUTTON_ID)
        driver.lock()
        driver.unlock()
        Actions.clickButtonXP(self, driver, Locators.SUBMENU_BUTTON_XP)
        Actions.clickButtonXP(self, driver, Locators.SELECT_ALL_BUTTON_XP)

        count_on_pictures_page_after = Actions.count_of_all_selected(self, driver)

        assert count_on_pictures_page_before < count_on_pictures_page_after
Ejemplo n.º 2
0
    def test_delete_file(self, driver):
        Actions.clickButtonXP(self, driver, Locators.MENU_BUTTON_XP)
        Actions.clickButtonXP(self, driver, Locators.DOWNLOADS_BUTTON_XP)
        Actions.clickButtonXP(self, driver, Locators.SUBMENU_BUTTON_XP)
        Actions.clickButtonXP(self, driver, Locators.SELECT_ALL_BUTTON_XP)

        count_on_downloads_page_before = Actions.count_of_all_selected(self, driver)

        Actions.clickButtonXP(self, driver, Locators.BACK_BUTTON_IF_SELECTED_XP)
        Actions.longtap(self, driver, Locators.FIRST_FILE_FOLDER_XP)
        Actions.clickButtonID(self, driver, Locators.DELETE_BUTTON_IF_SELECTED_ID)

        assert Actions.getTextID(self, driver, Locators.POPUP_NAME_ID) == 'Delete files'

        Actions.clickButtonID(self, driver, Locators.POPUP_SAVE_BUTTON_ID)
        Actions.clickButtonXP(self, driver, Locators.SUBMENU_BUTTON_XP)
        Actions.clickButtonXP(self, driver, Locators.SELECT_ALL_BUTTON_XP)

        count_on_downloads_page_after = Actions.count_of_all_selected(self, driver)

        assert count_on_downloads_page_before > count_on_downloads_page_after