本文整理汇总了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')
示例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')
示例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)
示例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)