本文整理汇总了Python中addons_site.AddonsDetailsPage.click_additional_image方法的典型用法代码示例。如果您正苦于以下问题:Python AddonsDetailsPage.click_additional_image方法的具体用法?Python AddonsDetailsPage.click_additional_image怎么用?Python AddonsDetailsPage.click_additional_image使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类addons_site.AddonsDetailsPage
的用法示例。
在下文中一共展示了AddonsDetailsPage.click_additional_image方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: test_details_more_images
# 需要导入模块: from addons_site import AddonsDetailsPage [as 别名]
# 或者: from addons_site.AddonsDetailsPage import click_additional_image [as 别名]
def test_details_more_images(self, testsetup):
"""
Litmus 4846
https://litmus.mozilla.org/show_test.cgi?id=4846
"""
amo_detail_page = AddonsDetailsPage(testsetup, 'firebug')
image_viewer = amo_detail_page.click_addon_image()
Assert.true(image_viewer.is_visible)
image_viewer.close()
Assert.false(image_viewer.is_visible)
additional_images_count = amo_detail_page.additional_images_count
for i in range(1, additional_images_count):
image_viewer = amo_detail_page.click_additional_image(i)
Assert.equal(i + 1, image_viewer.current_image)
Assert.true(image_viewer.is_visible)
image_viewer.close()
Assert.false(image_viewer.is_visible)
image_viewer = amo_detail_page.click_additional_image(1)
Assert.true(image_viewer.is_visible)
for i in range(2, image_viewer.total_images_count + 1):
Assert.true(image_viewer.is_visible)
Assert.equal(i, image_viewer.current_image)
Assert.true(image_viewer.is_close_visible)
Assert.equal("Image %s of %s" % (i, additional_images_count + 1), image_viewer.current_number)
if not i == image_viewer.total_images_count:
image_viewer.click_next()
Assert.false(image_viewer.is_next_link_visible)
Assert.true(image_viewer.is_previous_link_visible)
for i in range(image_viewer.total_images_count, 0, -1):
Assert.true(image_viewer.is_visible)
Assert.equal(i, image_viewer.current_image)
Assert.true(image_viewer.is_close_visible)
Assert.equal("Image %s of %s" % (i, additional_images_count + 1), image_viewer.current_number)
if not i == 1:
image_viewer.click_previous()
Assert.true(image_viewer.is_next_link_visible)
Assert.false(image_viewer.is_previous_link_visible)
image_viewer.close()
Assert.false(image_viewer.is_visible)