예제 #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)
예제 #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
예제 #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)
예제 #4
0
 def _is_element_present(self, locator):
     try:
         find_element(self._driver, locator)
     except TimeoutException:
         return False
     return True
예제 #5
0
 def _click(self, locator):
     find_element(self._driver, locator).click()
예제 #6
0
 def __get__(self, obj, owner):
     """Получает значение элемента"""
     element = find_element(obj._driver, self.locator)
     return element.text
예제 #7
0
 def set(self, obj, value):
     element = find_element(obj._driver, self.locator)
     element.clear()
     element.send_keys(value)