SeleniumBase/examples/translations/russian_test_1.py

22 lines
1.3 KiB
Python
Executable File
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

# Russian Language Test
from seleniumbase.translate.russian import ТестНаСелен # noqa
class МойТестовыйКласс(ТестНаСелен):
def test_пример_1(self):
self.открыть("https://ru.wikipedia.org/wiki/")
self.подтвердить_элемент('[title="Русский язык"]')
self.подтвердить_текст("Википедия", "h2.main-wikimedia-header")
self.введите("#searchInput", "МГУ")
self.нажмите("#searchButton")
self.подтвердить_текст("университет", "#firstHeading")
self.подтвердить_элемент('img[alt*="Главное здание МГУ"]')
self.введите("#searchInput", "приключения Шурика")
self.нажмите("#searchButton")
self.подтвердить_текст("Операция «Ы» и другие приключения Шурика")
self.подтвердить_элемент('img[alt="Постер фильма"]')
self.назад()
self.подтвердить_правду("университет" in self.получить_текущий_URL())
self.вперед()
self.подтвердить_правду("Шурика" in self.получить_текущий_URL())