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: 6 additions & 2 deletions pages/base_page.py
Original file line number Diff line number Diff line change
Expand Up @@ -46,9 +46,13 @@ def element_is_visible(self, locator):
return Wait(self.driver, self.timeout).until(
EC.visibility_of_element_located(locator), message=f"Can't find element by locator {locator}")

def element_is_not_visible(self, locator):
def element_is_not_visible1(self, locator):
return Wait(self.driver, self.timeout).until(
EC.invisibility_of_element_located(locator), message=f"The element located by {locator} is invisible")
EC.invisibility_of_element_located(locator), message=f"The element located by {locator} is visible")

def element_is_not_visible(self, locator):
return Wait(self.driver, 10).until( # timeout has raised since self.timeout till 10 second
EC.invisibility_of_element_located(locator), message=f"The element located by {locator} is visible")

def elements_are_present(self, locator):
return Wait(self.driver, self.timeout).until(
Expand Down
3 changes: 0 additions & 3 deletions pages/footer_page.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
import time

import allure
import requests
from selenium.webdriver.support.wait import WebDriverWait as Wait
Expand All @@ -23,7 +21,6 @@ def check_footer_visibility(self):

@allure.step("Check the Footer is invisible")
def check_footer_invisibility(self):
time.sleep(5)
return self.element_is_not_visible(self.locators.FOOTER)

@allure.step("Get structure of the 1st level of nesting in the Footer")
Expand Down
Loading