当前位置: 首页>>代码示例>>Python>>正文


Python Gallery.switch_to_multiple_selection_view方法代码示例

本文整理汇总了Python中gaiatest.apps.gallery.app.Gallery.switch_to_multiple_selection_view方法的典型用法代码示例。如果您正苦于以下问题:Python Gallery.switch_to_multiple_selection_view方法的具体用法?Python Gallery.switch_to_multiple_selection_view怎么用?Python Gallery.switch_to_multiple_selection_view使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在gaiatest.apps.gallery.app.Gallery的用法示例。


在下文中一共展示了Gallery.switch_to_multiple_selection_view方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。

示例1: test_gallery_delete_image

# 需要导入模块: from gaiatest.apps.gallery.app import Gallery [as 别名]
# 或者: from gaiatest.apps.gallery.app.Gallery import switch_to_multiple_selection_view [as 别名]
    def test_gallery_delete_image(self):
        gallery = Gallery(self.marionette)
        gallery.launch()
        gallery.wait_for_files_to_load(3)

        gallery_multi_view = gallery.switch_to_multiple_selection_view()
        gallery_multi_view.select_nth_picture(0)
        gallery_multi_view.select_nth_picture(1)
        gallery_multi_view.select_nth_picture(2)

        # Tap the delete button and confirm by default
        gallery_multi_view.tap_delete_button()
        gallery.wait_for_thumbnail_view_to_load()

        # Verify empty gallery title.
        Wait(self.marionette).until(lambda m: gallery.empty_gallery_title == 'No photos or videos')
开发者ID:anrao91,项目名称:gaia,代码行数:18,代码来源:test_gallery_delete_multiple_images.py

示例2: test_gallery_delete_image

# 需要导入模块: from gaiatest.apps.gallery.app import Gallery [as 别名]
# 或者: from gaiatest.apps.gallery.app.Gallery import switch_to_multiple_selection_view [as 别名]
    def test_gallery_delete_image(self):
        """
        https://moztrap.mozilla.org/manage/case/1533/
        """

        gallery = Gallery(self.marionette)
        gallery.launch()
        gallery.wait_for_files_to_load(3)

        gallery_multi_view = gallery.switch_to_multiple_selection_view()
        gallery_multi_view.select_nth_picture(0)
        gallery_multi_view.select_nth_picture(1)
        gallery_multi_view.select_nth_picture(2)

        # Tap the delete button and confirm by default
        gallery_multi_view.tap_delete_button()
        gallery.wait_for_overlay_to_show()

        self.assertEqual(gallery.empty_gallery_title, 'No photos or videos')
开发者ID:AaskaShah,项目名称:gaia,代码行数:21,代码来源:test_gallery_delete_multiple_images.py

示例3: test_gallery_delete_image

# 需要导入模块: from gaiatest.apps.gallery.app import Gallery [as 别名]
# 或者: from gaiatest.apps.gallery.app.Gallery import switch_to_multiple_selection_view [as 别名]
    def test_gallery_delete_image(self):
        """
        https://moztrap.mozilla.org/manage/case/1534/
        """

        gallery = Gallery(self.marionette)
        gallery.launch()
        gallery.wait_for_files_to_load(3)

        # Select 3 images
        gallery_multi_view = gallery.switch_to_multiple_selection_view()
        gallery_multi_view.select_nth_picture(0)
        gallery_multi_view.select_nth_picture(1)
        gallery_multi_view.select_nth_picture(2)

        # Tap the delete button and press cancel button
        gallery_multi_view.tap_delete_button(confirm=False)

        # Verify files still exist and still selected
        self.assertEqual(3, gallery_multi_view.number_of_selected_images)
        self.assertEqual(3, gallery.gallery_items_number)
开发者ID:AaskaShah,项目名称:gaia,代码行数:23,代码来源:test_gallery_cancel_delete_multiple_images.py

示例4: test_gallery_share_to_messages

# 需要导入模块: from gaiatest.apps.gallery.app import Gallery [as 别名]
# 或者: from gaiatest.apps.gallery.app.Gallery import switch_to_multiple_selection_view [as 别名]
    def test_gallery_share_to_messages(self):
        """
        https://moztrap.mozilla.org/manage/case/4008/
        """

        gallery = Gallery(self.marionette)
        gallery.launch()

        gallery.wait_for_files_to_load(self.image_count)
        self.assertEqual(gallery.gallery_items_number, self.image_count)

        # Enter multiple selection mode and select a picture
        multiple_selection_view = gallery.switch_to_multiple_selection_view()
        multiple_selection_view.select_first_picture()

        # Share the picture to messages
        activities = multiple_selection_view.tap_share_button()
        new_message = activities.share_to_messages()

        # Assert that the new message has an attachment
        new_message.wait_for_message_input_displayed()
        self.assertTrue(new_message.has_attachment)
开发者ID:AaskaShah,项目名称:gaia,代码行数:24,代码来源:test_gallery_share_picture.py


注:本文中的gaiatest.apps.gallery.app.Gallery.switch_to_multiple_selection_view方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。