Пример #1
0
    def test_title_page(self):
        """

        Проверка названия страницы

        """
        currency_page = CurrencyPage(self.driver)
        currency_page.navigate()
        self.list = currency_page.tab_from.get_all_list()
        assert currency_page.is_title_matches(), "title doesn't match. Title: " + str(self.driver.title)
Пример #2
0
    def test_search_ok(self):
        """

        Проверка поиска валюты, результат содержит искомую валюту

        """
        currency_from = 'CHF'

        currency_page = CurrencyPage(self.driver)
        currency_page.navigate()
        currency_page.search_text_element = currency_from
        if (currency_from not in currency_page.tab_from.get_all_list_names()):
            assert False, 'listnames:' + str(
                currency_page.tab_from.get_all_list_names())
Пример #3
0
    def test_top_currency(self):
        """

        Проверка популярных валют, ввод суммы в поле "из"

        """

        currency_from = 'AUD'
        currency_to = 'CAD'

        currency_page = CurrencyPage(self.driver)
        currency_page.navigate()
        # currency_page.search_text_element = "RUB"

        currency_page.tab_to.set_amount(100)
        currency_page.tab_to.select_top_currency(currency_to)
        currency_page.tab_from.select_top_currency(currency_from)

        assert currency_page.tab_from.get_amount(
        ) != '', 'amount_element: ' + str(currency_page.tab_from.get_amount())
Пример #4
0
    def test_all_currency(self):
        """

        Проверка валют из всего списка

        """

        currency_from = 'ARS'
        currency_to = 'RUB'

        currency_page = CurrencyPage(self.driver)
        currency_page.navigate()
        #currency_page.search_text_element = "RUB"

        currency_page.tab_to.set_amount(100)
        currency_page.tab_to.select_all_currency(currency_to)
        currency_page.tab_from.select_all_currency(currency_from)

        currency_page.tab_from.check_selected_currency(currency_from)
        currency_page.tab_to.check_selected_currency(currency_to)
        assert currency_page.tab_from.get_amount(
        ) != '', 'amount_element: ' + str(currency_page.tab_from.get_amount())
 def __init__(self, base_url: str, headless):
     setup("INFO")
     logger.setLevel("INFO")
     driver_path = ChromeDriverManager().install()
     options = Options()
     if headless:
         options.add_argument("--headless")
     self.wd = webdriver.Chrome(driver_path, options=options)
     self.base_url = base_url
     self.login = LoginPage(self)
     self.currency = CurrencyPage(self)
     self.deposits = DepositsPage(self)
     self.cards = CardsPage(self)
     self.credit = CreditPage(self)
Пример #6
0
    def test_check_clear_form(self):
        """

        Проверка кнопки очистики полей

        """
        currency_page = CurrencyPage(self.driver)
        currency_page.navigate()
        currency_page.tab_to.set_amount(100)
        currency_page.click_clear_button()
        assert currency_page.tab_to.get_amount(
        ) == '0', 'amount_element: ' + str(currency_page.tab_to.get_amount())
        currency_page.tab_from.set_amount(100)
        currency_page.click_clear_button()
        assert currency_page.tab_from.get_amount(
        ) == '0', 'amount_element: ' + str(currency_page.tab_from.get_amount())