diff --git a/pages/result.py b/pages/result.py index 0753a39..939a2a6 100644 --- a/pages/result.py +++ b/pages/result.py @@ -16,7 +16,7 @@ def __init__(self, browser: WebDriver, explicit_wait: float = 5): self._browser = browser self._explicit_wait = WebDriverWait(browser, explicit_wait) - def get_link_titles(self): + def get_link_titles(self) -> list[str]: links: list[WebElement] = self._explicit_wait.until( expected_conditions.visibility_of_all_elements_located(self._RESULT_LINKS) ) @@ -24,7 +24,7 @@ def get_link_titles(self): LOGGER.info('Result Titles', extra={'Titles': titles}) return titles - def get_search_input_text(self): + def get_search_input_text(self) -> str: search_input: WebElement = self._explicit_wait.until( expected_conditions.visibility_of_element_located(self._SEARCH_INPUT) ) @@ -32,7 +32,7 @@ def get_search_input_text(self): LOGGER.info('Search Input Data', extra={'Text': search_input_text}) return search_input_text - def get_page_title(self): + def get_page_title(self) -> str: page_title: str = self._browser.title LOGGER.info('Page Title', extra={'Title': page_title}) return page_title diff --git a/pages/search.py b/pages/search.py index 2f05933..cba3df2 100644 --- a/pages/search.py +++ b/pages/search.py @@ -19,7 +19,7 @@ def __init__(self, browser: WebDriver, explicit_wait: float = 5): def load_search_page(self) -> None: self._browser.get(self._URL) - def search_value(self, phrase: str): + def search_value(self, phrase: str) -> None: search_input: WebElement = self._explicit_wait.until( expected_conditions.visibility_of_element_located(self._SEARCH_INPUT_FIELD) )