more examples

This commit is contained in:
a.krasnov
2020-12-02 00:21:18 +03:00
parent 74a21c92a6
commit 6f53f11749
2 changed files with 18 additions and 5 deletions

View File

@@ -1,4 +1,5 @@
from screenshot_tests.utils.screenshots import TestCase
from selenium.webdriver.common.by import By
class TestExample(TestCase):
@@ -15,6 +16,14 @@ class TestExample(TestCase):
def test_main_page_flaky(self):
self.driver.get("https://go.mail.ru/")
# Чтобы посмотреть как выглядит сломанный тест в отчетеы
# Чтобы посмотреть как выглядит сломанный тест в отчетe
self.driver.find_element_by_xpath("//input[not(@type='hidden')]").send_keys("foo")
self.check_by_screenshot(None, full_page=True)
def test_search_result(self):
self.driver.get("https://go.mail.ru/")
def action():
self.driver.find_element_by_xpath("//span[contains(text(), 'Соцсети')]").click()
self.check_by_screenshot((By.CSS_SELECTOR, ".MainPage-verticalLinksWrapper"), action=action)