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
7 changes: 7 additions & 0 deletions pages/exercises_ru_words_page.py
Original file line number Diff line number Diff line change
Expand Up @@ -219,6 +219,7 @@ def click_on_breadcrumbs_links(self):
opened_pages.append(self.get_current_tab_url())
self.driver.back()
self.element_is_present_and_clickable(self.locators.PAGE_LIST1_3).click()
time.sleep(1)
opened_pages.append(self.get_current_tab_url())
print(*opened_pages, sep='\n')
return opened_pages
Expand Down Expand Up @@ -271,3 +272,9 @@ def get_links_style(self):
style = [image.get_attribute('style') for image in self.get_list4_of_links()]
# 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_words_page_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -179,3 +179,9 @@ def test_erw_04_01_verify_images_attributes(self, driver, exercises_ru_words_pag
assert links_style, "The 'style' attribute value of links is empty"
assert all(element in ExRuWoPaData.subgroup_links_style for element in links_style), \
"The 'style' attribute value of links do not match the valid values"

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