Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 7 additions & 1 deletion pages/exercises_ru_similar_phrases_page.py
Original file line number Diff line number Diff line change
Expand Up @@ -216,5 +216,11 @@ def click_on_subgroup_links(self):
@allure.step("Get the list of attribute 'style' values of images in links")
def get_links_style(self):
style = [image.get_attribute('style') for image in self.get_list4_of_links()]
print(len(style), *style, sep='\n')
# print(len(style), *style, sep='\n')
return style

@allure.step("Get the list of sizes of background-images in links")
def get_images_sizes(self):
images_size = [image.size for image in self.get_list4_of_links()]
print(len(images_size), *images_size, sep='\n')
return images_size
6 changes: 6 additions & 0 deletions tests/exercises_ru_similar_phrases_page_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -168,3 +168,9 @@ def test_ersp_04_01_verify_images_attributes(self, driver, exercises_ru_similar_
assert links_style, "The 'style' attribute value of links is empty"
assert all(element in erspPD.subgroup_links_style for element in links_style), \
"The 'style' attribute value of links mismatches valid values"

@allure.title("Verify sizes of background-images in links on the page")
def test_ersp_04_02_verify_images_sizes(self, driver, exercises_ru_similar_phrases_page_open):
page = erspPage(driver)
images_size = page.get_images_sizes()
assert images_size != 0, "Background-images have not sizes"