def test_images_are_visible(self, mozwebqa): b2g_page = BootToGecko(mozwebqa) b2g_page.go_to_page() bad_images = [] for image in b2g_page.images_list: if not b2g_page.is_element_visible(*image.get('locator')): bad_images.append('The image at %s is not visible' % image.get('locator')[1:]) Assert.equal(0, len(bad_images), '%s bad images found: ' % len(bad_images) + ', '.join(bad_images))
def test_nav_links_are_visible(self, mozwebqa): b2g_page = BootToGecko(mozwebqa) b2g_page.go_to_page() bad_links = [] for link in b2g_page.b2g_nav_links_list: if not b2g_page.is_element_visible(*link.get('locator')): bad_links.append('The link at %s is not visible' % link.get('locator')[1:]) Assert.equal(0, len(bad_links), '%s bad links found: ' % len(bad_links) + ', '.join(bad_links))