Skip to content
Merged
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
18 changes: 6 additions & 12 deletions pages/exercises_ru_words_page.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
"""Methods for verifying web elements on the 'Exercises "Words"' page on the 'ru' local"""
import time
import allure
import requests
from selenium.webdriver.support import expected_conditions as EC
Expand Down Expand Up @@ -186,7 +185,7 @@ def click_on_breadcrumbs_links(self):
self.element_is_present_and_clickable(self.locators.PAGE_LIST1_3).click()
opened_pages.append(self.get_current_tab_url())

print(*opened_pages, sep='\n')
# print(*opened_pages, sep='\n')
return opened_pages

@allure.step("Click on group links and thereby open corresponding web pages in the same tab")
Expand All @@ -199,39 +198,34 @@ def click_on_group_links(self):
Wait(self.driver, self.timeout).until(EC.url_changes(self.get_current_tab_url()))
opened_pages.append(self.get_current_tab_url())

print(*opened_pages, sep='\n')
# print(*opened_pages, sep='\n')
return opened_pages

@allure.step("Click on subgroup link 'Family' and thereby open corresponding web pages in the same tab")
def click_on_subgroup_link_family(self):
self.element_is_present_and_clickable(self.locators.PAGE_LIST3_1).click()
time.sleep(2)
Wait(self.driver, self.timeout).until(EC.url_changes(self.get_current_tab_url()))
opened_page = self.get_current_tab_url()
self.driver.back()
time.sleep(1)
print(opened_page)
return opened_page

@allure.step("""Click on subgroup links 'Beloved Home', 'Food', 'Clothes'
and thereby open corresponding web pages in the same tab""")
def click_on_subgroup_link_beloved_home_food_clothes(self):
opened_pages = []
time.sleep(2)
self.element_is_present_and_clickable(self.locators.PAGE_LIST3_2).click()
time.sleep(2)
Wait(self.driver, self.timeout).until(EC.url_changes(self.get_current_tab_url()))
opened_pages.append(self.get_current_tab_url())
self.driver.back()
time.sleep(2)
self.element_is_present_and_clickable(self.locators.PAGE_LIST3_3).click()
time.sleep(2)
Wait(self.driver, self.timeout).until(EC.url_changes(self.get_current_tab_url()))
opened_pages.append(self.get_current_tab_url())
self.driver.back()
time.sleep(2)
self.element_is_present_and_clickable(self.locators.PAGE_LIST3_4).click()
time.sleep(2)
Wait(self.driver, self.timeout).until(EC.url_changes(self.get_current_tab_url()))
opened_pages.append(self.get_current_tab_url())
self.driver.back()
time.sleep(2)
print(*opened_pages, sep='\n')
return opened_pages

Expand Down