Esempio n. 1
0
 def search_movie(self, value):
     """
     :type value: unicode
     """
     elem = find_element(self._driver,
                         HomePageLocators.SEARCH_MOVIE_LOCATOR)
     elem.clear()
     elem.send_keys(value)
     elem.send_keys(Keys.ENTER)
Esempio n. 2
0
 def movie_is_not_found(self):
     elem = find_element(self._driver,
                         HomePageLocators.NOT_FOUND_MESSAGE_LOCATOR)
     return elem.text == HomePageLocators.NOT_FOUND_MESSAGE_CONTENT
Esempio n. 3
0
 def click_login_button(self):
     elem = find_element(self._driver,
                         AuthPageLocators.LOGIN_BUTTON_LOCATOR)
     elem.click()
     from pages.home import HomePage
     return HomePage(self._driver)
Esempio n. 4
0
 def _is_element_present(self, locator):
     try:
         find_element(self._driver, locator)
     except TimeoutException:
         return False
     return True
Esempio n. 5
0
 def _click(self, locator):
     find_element(self._driver, locator).click()
Esempio n. 6
0
 def __get__(self, obj, owner):
     """Получает значение элемента"""
     element = find_element(obj._driver, self.locator)
     return element.text
Esempio n. 7
0
 def set(self, obj, value):
     element = find_element(obj._driver, self.locator)
     element.clear()
     element.send_keys(value)