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
14 changes: 1 addition & 13 deletions pages/groups_page.py
Original file line number Diff line number Diff line change
Expand Up @@ -172,46 +172,34 @@ def get_links_status_codes(self):
def click_on_links_on_ru_local(self):
opened_pages = []
starting_url = self.driver.current_url
print(starting_url)

link1 = self.element_is_present_and_clickable(self.locators.PAGE_LINK1)
# current_url = self.driver.current_url
link1.click()

# Waiting for the first URL change (intermediate page)
Wait(self.driver, 10).until(EC.url_changes(starting_url))
intermediate_url = self.driver.current_url
print(intermediate_url)

# Waiting for the second URL change (aimed page)
Wait(self.driver, 10).until(EC.url_changes(intermediate_url))
current_url = self.driver.current_url
print(current_url)

opened_pages.append(self.get_current_tab_url())

self.element_is_present_and_clickable(self.locators1.LOGO_LINK).click()
starting_url = self.driver.current_url
print(starting_url)

# Waiting for the starting page loading
Wait(self.driver, 10).until(EC.presence_of_element_located((By.TAG_NAME, "h3")))
starting_url = self.driver.current_url

link2 = self.element_is_present_and_clickable(self.locators.PAGE_LINK2)
# current_url = self.driver.current_url
link2.click()

# Waiting for the first URL change (intermediate page)
Wait(self.driver, 10).until(EC.url_changes(starting_url))
intermediate_url = self.driver.current_url
print(intermediate_url)

# Waiting for the second URL change (aimed page)
Wait(self.driver, 10).until(EC.url_changes(intermediate_url))
current_url = self.driver.current_url
print(current_url)

# Wait(self.driver, 10).until(EC.url_changes(current_url))

opened_pages.append(self.get_current_tab_url())
print(opened_pages)
Expand Down
4 changes: 2 additions & 2 deletions test_data/groups_page_data.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,8 @@ class GroupsPageData:

pages_urls = (f"{s}groups/1/series/18", f"{s}groups/2/series/1", f"{s}groups/3/series/14", f"{s}groups/4/series/10")

images_src = (f"{s}pictures/exercise-type/speech-exercises.svg",
f"{s}pictures/exercise-type/non-speech-exercises.svg")
images_src = (f"{s}pictures/exercise-type/speech-exercises.png",
f"{s}pictures/exercise-type/non-speech-exercises.png")

links_status_code = (200,)

Expand Down
1 change: 0 additions & 1 deletion tests/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,6 @@ def groups_ru_page_open(driver, auto_test_user_authorized):

def subtitle2(driver):
subtitle2 = driver.find_element(*GroupsPageLocators.PAGE_SUBTITLE2).text
print(subtitle2)
return subtitle2 in GroupsPageData.page_subtitles_ru

Wait(driver, 20).until(subtitle2)
Expand Down
Loading