Пример #1
0
    def add_to_my_library(self, content_folder_path):
        """ add contents in 'content_folder_path' to 'My Mac' """

        # switch to 'My Mac'
        helper.retry(self.switch_to_mymac_view)

        # use shortcut "CMD + L" to open file dialog
        type("l", Key.CMD)
        time.sleep(2)

        # change view to 'as icon'
        type("1", Key.CMD)
        time.sleep(2)

        # go to content_folder_path
        type("g", Key.CMD + Key.SHIFT)
        time.sleep(2)
        type(content_folder_path)

        # click 'Go' button
        time.sleep(2)
        type(Key.ENTER)

        # click 'Open' button
        time.sleep(2)
        type(Key.ENTER)

        return True
Пример #2
0
    def remove_all_from_cloud_view(self):
        """ remove all items from 'Cloud' view """

        # switch to 'Cloud'
        helper.log("switch to 'Cloud'")
        helper.retry(self.switch_to_cloud_view)
        time.sleep(2)
        # remove all from current view
        return self.remove_all()
Пример #3
0
    def remove_all_from_mymac_view(self):
        """ remove all items from ''My Mac' view """

        # switch to 'My Mac'
        helper.log("switch to 'My Mac'")
        helper.retry(self.switch_to_mymac_view)
        time.sleep(2)
        # remove all from current view
        return self.remove_all()
Пример #4
0
    def share_album(self, album_item, album_name='', share_to_account=account_username2):
        """ Share an album to another account, currently we use default account_username to share """

        helper.log("Switch to album")
        helper.retry(self.switch_to_albums_view)

        # Select an album to share
        helper.log("The created album will be shared")
        if self.region.exists(album_item, default_wait_long_time):
            self.region.click(album_item)
        elif helper.check_exist_by_cliclick(album_name):
            helper.click_item_by_cliclick(album_name)
        else:
            return False, "The album item doesn't exist"
        helper.assert_step(self.share_via_bottom_bar())
        time.sleep(20)
        return self.share_dialog(share_to_account)